db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Steen Jakobsen" <...@logodata.dk>
Subject RE: Close Derby DB
Date Wed, 08 Jul 2009 06:11:19 GMT
Try the more secure way - I think I got it from documentation.
Create a properties object with the needed definitions (keys). 
Then Call drivermanager with (url,properties_obj)
(the properties way seems to be the less stony way to derby) 

            Properties sd = new Properties();
            sd.setProperty("shutdown", "true");  // extra properties
            try {
                DriverManager.getConnection(connectionURL, sd);
            } catch (SQLTransientConnectionException sex) {
                sex = null;
Logger.getLogger(Fetcher.class.getName()).log(Level.INFO, "SHUTDOWN",

Hope this helps.-)

-----Original Message-----
From: sivagururaja [mailto:sivagururaja@gmail.com] 
Sent: 8. juli 2009 07:01
To: derby-user@db.apache.org
Subject: Re: Close Derby DB

Thanks Dag,

I am giving the valid path. I can able to connect the database.
Only thing is, if i am using "shutdown=true", i got this error.

Dag H. Wanvik wrote:
> 'C:/MyDB' not found seems to indicate that the database hasn't been
> created yet. Are you using the exact same string as in the connect
> statement where you created the database?
> If you are running with sqlAuthorization enabled, only the database
> owner can shut down. The owner is the user name you provided when you
> created the database.

While i am creating the database through NetBeans 6.5, i mentioned the
database name, username and password. How i know whether i have enabled
sqlAuthorization or not.

View this message in context:
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message