Paulo Jesus wrote:
2007/10/26, Stanley Bradbury <[EMAIL PROTECTED]>:
Paulo Jesus wrote:
I have two questions on create an drop databases.
Do I have a command to drop a database? Or do I need to "gently"
remove the directory of the database? I didn't find references to
this.
There is other way to create a database than the
'.../newDatabase;create=true' at the connection string.?
Thanks
PJ
Hi Paulo -
You are correct on both counts. ;create=true will cause an empty (no
user tables) database to be created if it does not already exist.
Removing the directory structure deletes the database and returns the
disk space to the filesystem.
If you are familiar with databases where you connect to the engine and
have multiple database to access you should consider using SCHEMAS. You
can create and drop schemas using standard SQL commands.
Ok.
If the scripts to start and stop the NetworkServer are called from the
host machine than the administrator has also access to database files.
But if i can remotely configure a new database (at connection string)
then, i think, it should be also possible to drop it.. with the
required validations first.
Thanks
PJ
Hi PJ -
You have a good point. Derby was designed to be a zero administration
system hence such validation was not available in earlier versions
within the SQL layer. The Administrator account is new with version
10.3 and now that one exists (when sqlAuthorization=true administration
is required) then there is a validation that can be used to as you
suggest. Would you please file a feature request in JIRA so this will
be considered for inclusion in a future release?
Info on filing defects and feature requests can be found at:
http://db.apache.org/derby/DerbyBugGuidelines.html