I really like the v12 innovation that the Sybase Central Wizards have an additional page to display the generated tool command line.
But for the "Create Database Wizard", I would like to get the according DBINIT command (in addition to or instead of the CREATE DATABASE statement).
The same goes for the reload.sql script created by the "Unload Wizard" (and the DBUNLOAD utility): The reload.sql contains the according CREATE DATABASE statement as comment. Here, I would like to get the DBINIT command, too.
When migrating databases, the CREATE DATABASE statement is usually the only statement that has to be run against the utility_db or another database. When working on production servers, connecting to the utility_db or a SA demo database is not always available. (And it usually takes some time (at least for me) to find an appropriate dummy database just in order to run CREATE DATABASE...).
Here, a DBINIT command seems much easier to use.
It's not too hard to manually translate a CREATE DATABASE statement to the DBINIT syntax but in newer versions the number of options has significantly increased (say, just for the NCHAR stuff).
According to John's answer, DBINIT itself connects to the utility_db internally.
dbinit just starts a new engine, connects to the utility_db on it and sends it a CREATE DATABASE statement.
It connects with the following connection string: UID=DBA;PWD=SQL;AUTOSTOP=yes;DBN=utility_db;ENG=dbinit_engine;START=dbeng12 -gp 4096 -c 10M;LINKS=SharedMemory;IGNORESQLCONNECT=YES
The -gp value should match the page size of the database.
answered 17 Dec '10, 19:39