cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dbcreate system tray icon

Former Member
4,762

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

View Entire Topic
johnsmirnios
Product and Topic Expert
Product and Topic Expert

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.

Former Member
0 Likes

Thanks John, we'll give that a go.

VolkerBarth
Contributor
0 Likes

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?

johnsmirnios
Product and Topic Expert
Product and Topic Expert

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.