Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


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

asked 29 May '12, 19:45

Dan%20Cleyne's gravatar image

Dan Cleyne
accept rate: 25%

edited 31 May '12, 07:35

Volker%20Barth's gravatar image

Volker Barth

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.

permanent link

answered 30 May '12, 06:27

John%20Smirnios's gravatar image

John Smirnios
accept rate: 37%

Thanks John, we'll give that a go.

(30 May '12, 18:39) Dan Cleyne

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?

(31 May '12, 03:37) Volker Barth
Replies hidden

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.

(31 May '12, 07:12) John Smirnios

I assume you are refering to the DBCreate DBTools function.

From the docs, I would think that the startline parameter of the a_create_db should help, as you can specify the according database engine parameters here. And you can use the -n database server switch to name the database engine and the -qi switch (and possibly other -qX variants) to suppress the icon in the system tray.

So I would suggest (but have not tested) to use the startline to something like

a_create_db.startline = "dbeng12 -gp page_size -c 10M -n MyEngineXy -qi"
permanent link

answered 30 May '12, 04:26

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

We tried that Volker, it doesn't seem to suppress the icon, nor give the engine a specific name. Hence the bafflement.

We'll try what John has posted above.

Cheers, Dan

(30 May '12, 18:41) Dan Cleyne

@Dan: Thanks for the clarification!

@John: Am I reading the docs on a_create_db wrong? Or is this a topic that might be clarified in the docs (Confine my comment to your answer)?

(31 May '12, 03:33) Volker Barth
Replies hidden

As I read the docs, they are not "incorrect". We do use the provided start line; the docs just neglect to say that we use ENG=dbinit_engine as well. The docs could be improved.

(31 May '12, 07:18) John Smirnios

Yes, I agree on both points, given your profound explanation above (thanks!). So specifying "-n" is pointless.

Based on that, and back to the original question:

Shouldn't then specifying -qi (or any other of the -qX server options) have the desired effect?

(31 May '12, 07:34) Volker Barth

The -q options should work but it won't solve the problem of running multiple concurrent dbinit invocations. I was going for the bonus points! :)

(31 May '12, 16:46) John Smirnios
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 May '12, 19:45

question was seen: 2,713 times

last updated: 31 May '12, 16:46