Start / Stop named database

Ivor

New Member
I use:-

pccmd proservice start
and
pccmd proservice stop

to stop/start all the databases for backup.

Is there a method to stop individual named databases?
I currently do this manually using ProControl.
 
Code:
proshut <dbname>

this will give you an interactive menu to disconnect users/shutdown the db

Code:
proshut -b <dbname>

batch shutdown. you will be promtped to disconnect users

Code:
proshut -bn <dbname>

batch shutdown if no connected users

Code:
proshut -by <dbname>

batch shutdown and disconnect all users
 
Thanks for that

I now have a kixtart script to selectively start and stop individual databases (amongst many other related functions), but I can no longer "see" which databases are running/stopped as you do when using Procontrol.

Is there a way to interrogate which databases are running, or do I have to create registry keys when I start a DB and delete them when stopping?

Is the easiest way just to search for .lk files or is there a better way, as occasionally I get a .lk file left when a DB won't start.

Appreciate any thoughts.
 
Sorted it with the following kixtart functions:-

Code:
Function ListDBs($DBdir) 
 
$filename = dir( $DBdir + "\*.lk")
 
while $filename <> "" and @error = 0
 
? " " + left($filename,len($filename) - 3 )
 
$filename = dir() ; retrieve next file
 
loop
 
EndFunction


Code:
Function DBactive($DBdir,$DBname) 
 
if exist($DBdir + "\" + $DBname + ".lk")
 
$DBactive = "active"
 
else
 
$DBactive = "not active"
 
endif
 
EndFunction
 
Back
Top