You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now 'create database' ddl statement has the only required parameter - the specification of primary database file, while many other database creation parameters can be specified using interactive sql command line switches.
I suggest to use value of '-database' isql switch in 'create database' statement, this will reduce 'create database ...' statement in create database scripts to just 'create database;' and simplify database creation sql scripts.
To explain a bit why I made this suggestion: at this time the database creation script of an application being installed must contain database connection parameters - i.e. server, port(?), database alias - and thus the script must be either modified or created for each system the application is being installed into, or database must be created manually. I want the database creation script to stay the same for each system it is being applied to, so I want to specify database connection parameters outside of the script (at first I event took '-database' switch as the switch that allows to do what I want, because it is described as 'database name to put in script creation' in isql help).
Now:
isql-fb < create_database.sql
create_database.sql:
create database "host/port:alias" user 'sysdba' -password 'masterkey' page_size=4096 default character set utf8 collation unicode_ci_ai;
<many more other statements creating domains, tables, triggers, etc...>
In the possible future:
isql-fb -database "host/port:alias" -user 'database-creator-account' -password 'database-creator-password' < create_database.sql
create_database.sql:
create database page_size=4096 default character set utf8 collation unicode_ci_ai;
<many more other statements creating domains, tables, triggers, etc...>
I think, since any application stores database connection parameters in its configuration, the better way is to provide these parameters to database tools called rather than inject these parameters into sql scripts.
I understand that the scheme I suggest doesn't allow to specify more than the primary database file, but I think that in most cases a database consists of the only file.
The text was updated successfully, but these errors were encountered:
In this case ISQL can complete the statement with missing database primary file specification using the specification given in the isql command line switch, in the same manner it goes with user name, and password, and, probably, with page size (I don't know what actually does 'pagelength' isql command line switch).
Submitted by: Konstantin Kuzvesov (kuzvesov)
Votes: 1
Now 'create database' ddl statement has the only required parameter - the specification of primary database file, while many other database creation parameters can be specified using interactive sql command line switches.
I suggest to use value of '-database' isql switch in 'create database' statement, this will reduce 'create database ...' statement in create database scripts to just 'create database;' and simplify database creation sql scripts.
To explain a bit why I made this suggestion: at this time the database creation script of an application being installed must contain database connection parameters - i.e. server, port(?), database alias - and thus the script must be either modified or created for each system the application is being installed into, or database must be created manually. I want the database creation script to stay the same for each system it is being applied to, so I want to specify database connection parameters outside of the script (at first I event took '-database' switch as the switch that allows to do what I want, because it is described as 'database name to put in script creation' in isql help).
Now:
isql-fb < create_database.sql
create_database.sql:
create database "host/port:alias" user 'sysdba' -password 'masterkey' page_size=4096 default character set utf8 collation unicode_ci_ai;
<many more other statements creating domains, tables, triggers, etc...>
In the possible future:
isql-fb -database "host/port:alias" -user 'database-creator-account' -password 'database-creator-password' < create_database.sql
create_database.sql:
create database page_size=4096 default character set utf8 collation unicode_ci_ai;
<many more other statements creating domains, tables, triggers, etc...>
I think, since any application stores database connection parameters in its configuration, the better way is to provide these parameters to database tools called rather than inject these parameters into sql scripts.
I understand that the scheme I suggest doesn't allow to specify more than the primary database file, but I think that in most cases a database consists of the only file.
The text was updated successfully, but these errors were encountered: