on ‎2012 May 29 8:45 PM
Folks,
Just wondering if there is a way to prevent the sqlanywhere icon from appearing in the taskbar on windows when using the dbcreate capi function?
For bonus points (:P). Is there a way to specify the ENG parameter for the dbcreate call to specify a unique dbeng12 instance for the database creation. We have a bunch of unit tests that create databases and when there are multiple builds running the database creations get tangled up and fail. We have a workaround for this issue so it isn't critical, just annoying...
Cheers, Dan
Request clarification before answering.
The easiest way to direct database creation to a particular server is to connect to the server then use a CREATE DATABASE statement. The DBTools interface predates the existence of a CREATE DATABASE statement and nowadays just builds such a statement and sends it to a database engine. Remember that you can't ask a running server to create a database with a page size that is larger than the server's cache page size.
Alternatively, note that dbinit in the dbtools interface is hard-wired to talk to an engine named "dbinit_engine". You could start an engine by that name and it will end up servicing all calls to the dbtools interface.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dbinit in the dbtools interface is hard-wired to talk to an engine named "dbinit_engine"
With "dbinit": Do you mean the DBCreate() API? AFAIK, all those command line utilities is just using the basic DBTools API calls ... or is this different for DBINIT?
Does it mean you can't change the engine name DBCreate() will use?
Yes, I meant the DBCreate() API and, yes, the dbinit tool uses the DBCreate() API. Writing "dbinit in the dbtools interface" was sloppy nomenclature. I just meant "the part of the dbtools interface used by the dbinit tool".
If you set the a_create_db.start field, DBCreate() builds the following connection string:
UID=DBA;PWD=SQL;AUTOSTOP=yes;DBN=utility_db;ENG=dbinit_engine;START=[the start string you provided]
If you don't specify the start line, DBCreate() uses "dbeng12 -gp [pagesize] -c 10m"
I see no way to change the name of the engine used by the dbinit.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.