Advertisement
Guest User

Untitled

a guest
May 31st, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. %isql -U abc -P abc -S support
  2. 1> sp_configure 'number of open partitions'
  3. 2> go
  4. Parameter Name Default Memory Used Config Value Run Value Unit Type
  5. ------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
  6. number of open partitions 500 5201 5000 5000 number dynamic
  7.  
  8. (1 row affected)
  9. (return status = 0)
  10. 1>
  11.  
  12. def sql = Sql.newInstance("jdbc:abc:sybase://harley:6011;DatabaseName=support;",dbuname,dbpassword,Driver)
  13. sql.eachRow("sp_configure 'number of open partitions'"){ row ->
  14. println row.run_value
  15. }
  16.  
  17. Exception in thread "main" java.sql.SQLSyntaxErrorException: [abc][Sybase JDBC Driver]Invalid column name: run_value
  18.  
  19. sql.eachRow("sp_configure 'number of open partitions'"){ row ->
  20. println row
  21. }
  22.  
  23. [Parameter Name:number of open partitions , Default: 500, Memory Used: 5201, Config Value: 5000, Run Value: 5000, Unit:number , Type:dynamic ]
  24.  
  25. sql.eachRow("sp_configure 'number of open partitions'"){ row ->
  26. (1..row.getMetaData().columnCount).each {
  27. println "${row.metaData().getColumnName( it )} = ${row[ it ]}"
  28. }
  29. }
  30.  
  31. row.'Run Value'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement