Got an error doing an online backup and don't know where to look
Got this error two nights in a row now while doing an online backup: [sql] Failed to execute: CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('/containe r1/backup/database/2011-11-28_00-15') [sql] java.sql.SQLException: Cannot backup the database, got an I/O Except ion while writing to the backup container file /container1/backup/database/2011- 11-28_00-15/csemdb/seg0/cf3a0.dat. I run the online backup through an ANT SQL task. The 'derby.log' does not show any errors, the server system log (Oracle M5000/Solaris 10) shows no errors either. I am stumped where to look and any help will be greatly appreciated.
Re: Error unning call syscs_util command
On 11/25/11 2:07 AM, Emanuel Chiavegato wrote: Hi all, I hav been given the task of exchanging our xls files with data used for test for a better tool and I believe derby is the ideal db for this task. I am using eclipse to handle this change, as the data needed for test is handled by java written applications. I have managed to create the tables i need and i use the derby nature of my project to run a select on ij and it shows my empty table. When i try to run the command: Call syscs_util.syscs_import_table(null,'tradeXl','tradexl.csv',',',null,null,0); Hi Emanuel, It is likely that you need to uppercase the second argument: 'TRADEX1'. For system procedures, the table and schema name arguments are case-sensitive strings. In most other usages, table names are SQL identifiers, not strings, and SQL identifiers are uppercased by the engine. The rules are described in the Reference Guide in the section titled SQL identifiers. Hope this helps, -Rick To import my excel data from a csv file into my derby db it comes up with the error message: table 'app.tradexl' does no exist I cant understand what is happening as i can run the select in the table therefore the table exist. Can u pls give some guidance on this subject? Many thanks for your help Emanuel Sent from my iPhone
Re: How to get Script of a stored procedure
On 11/22/11 11:21 PM, gopi krishna wrote: Hi This is Krishna , i need to edit an existing stored procedure from one of the client. So i need to get script of that stored procudure.How can i get that. Please can you help me here Thanks Krishna Hi Krishna, Derby stored procedures are just public static methods in user-supplied classes. The following code will show you what static method is bound to the procedure name you're interested in. Here's how you run this program: java z $connectionURL $schemaName $procedureName e.g.: java z jdbc:derby:db APP P Here is the program: import java.sql.*; import org.apache.derby.catalog.types.MethodAliasInfo; public class z { public static voidmain( String[] args ) throws Exception { String connectionURL = args[ 0 ]; String schemaName = args[ 1 ]; String procedureName = args[ 2 ]; Class.forName( org.apache.derby.jdbc.EmbeddedDriver ); Class.forName( org.apache.derby.jdbc.ClientDriver ); Connection conn = DriverManager.getConnection( connectionURL ); PreparedStatement ps = conn.prepareStatement ( select javaclassname, aliasinfo\n + from sys.sysaliases a, sys.sysschemas s\n + where s.schemaid = a.schemaid\n + and s.schemaname = ?\n + and a.alias = ?\n ); ps.setString( 1, schemaName ); ps.setString( 2, procedureName ); ResultSet rs = ps.executeQuery(); rs.next(); String className = rs.getString( 1 ); String methodName = ((MethodAliasInfo) rs.getObject( 2 )).getMethodName(); System.out.println( className + . + methodName ); } } Hope this helps, -Rick