Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10473

Re: SQL Anywhere 12.0.1.3797 / Service

$
0
0

Hi Eric,

 

In SQL Anywhere single databases can be started and stopped using SQL commands.

For example you could start a server called "MyTestServer" (running no databases):

dbsrv12 -n MyTestServer -su SecretPassword

The -su option sets the password for the utility db. The utility db is a database that can be connected to on any server, even if its not running any normal databases.

 

You could then connect to the utility_db on the server and issue commands to start and stop individual databases:

dbisql -c "Server=MyTestServer;DBN=utility_db;UID=dba;PWD=SecretPassword" -nogui "START DATABASE C:\MyDB.db"

You could also put START DATABASE commands for all your databases in a SQL file and start them all using:

dbisql -c "Server=MyTestServer;DBN=utility_db;UID=dba;PWD=SecretPassword" -nogui StartAllDBs.sql

 

dbsvc.exe can be used to create a new service that starts the server with no databases running (and the custom utility_db password)

 

The online DCX contains more detail about these features:
http://dcx.sybase.com/index.html#1201/en/dbadmin/utility-db-dbfiles.html
http://dcx.sybase.com/index.html#1201/en/dbadmin/dbsvc-service-dbutilities.html

 

Hope this helps,
Mikel Rychliski


Viewing all articles
Browse latest Browse all 10473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>