cancel
Showing results for 
Search instead for 
Did you mean: 

How to add and remove a database from a running dbsrv

4,342

SQL Anywhere 11.0.1 EBF 2527

We are running several databases within the one SQL Anywhere Server instance (running as a windows service).

Is there anyway we can remove one of the databases from the server instance without stopping the server instance?

Additionally, is there anyway we can add a database from the server instance without stopping the server instance?

Accepted Solutions (1)

Accepted Solutions (1)

MCMartin
Participant

see the STOP DATABASE statement and START DATABASE statement.

VolkerBarth
Contributor
0 Kudos

Oh, I even wasn't aware that there's another SQL Anywhere online doc site besides the (more interactive) DocCommentXchange...

0 Kudos

@Martin - Thanks for that. START, STOP - The only two words I didn't search for in the documentation... sigh\x10.

MCMartin
Participant
0 Kudos

And I can never remember der DocCommentXchange website, I really have to bookmark it 😉

VolkerBarth
Contributor

I usually use the link at the bottom of the local help files:


Re How to add and remove a database from a running dbsrv

Answers (1)

Answers (1)

ian_mchardy
Product and Topic Expert
Product and Topic Expert

Additionally, (for completeness) you can automatically start a database on a running server as part of connecting by specifying ServerName and CommLinks as well as DatabaseFile (DBF - the path to the database filename), optionally DatabaseName (DBN), UID and PWD for the database being started. Once there are no connections to this database it will automatically stop unless you specify AutoStop=No on the connection that starts the database.

Note that this is only recommended for personal servers. For network servers you would need to use -gd all to automatically a start database, which is not recommended.