Community
Showing results for 
Search instead for 
Do you mean 
Reply

Detaching SQL Server when closing database and exiting ACT!

Tuned Listener
Posts: 5
Country: USA

Detaching SQL Server when closing database and exiting ACT!

A few versions ago you used to be able to detach SQL Server from a database when exiting ACT! and closing the database.  That would allow you to copy the database (or sync it) without generating an error message.


Can that still be done in ACT! 2009?

Copper Elite Contributor
Posts: 124
Country: USA

Re: Detaching SQL Server when closing database and exiting ACT!

Put the following into a .bat file: NET STOP MSSQL$ACT7

Put a shortcut to the .bat file on your desktop and run it when you want to stop the ACT SQL instance.

It's not automatic but it works.

 

P.S. The start code is: NET START MSSQL$ACT7

Tuned Listener
Posts: 5
Country: USA

Re: Detaching SQL Server when closing database and exiting ACT!

So, could you create a batch file that would stop the ACT! SQL instance, copy the ACT! database(s) from the C: drive to a portable hard drive (for example), then restart the ACT! SQL?  For example:

 

NET STOP MSSQL$ACT7

copy C:\[ACT! database and its path] H:\[to portable hard drive]

NET START MSSQL$ACT7

 

Would someothing like that work?  If so, is there a switch to add at the end of the copy command to tell it to overwrite an existing file of the same name?

Copper Elite Contributor
Posts: 124
Country: USA

Re: Detaching SQL Server when closing database and exiting ACT!

Simply append "/Y" (without the quotes) to the end of your copy command and the notice to confirm an overwrite will be suppressed.
Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Detaching SQL Server when closing database and exiting ACT!

To sync it, the database needs to be attached.

 

Best to backup while attached with the ACT! Scheduler.

 

For some other options, see: http://blog.glcomputing.com.au/2009/09/automating-backups-for-act-by-sage.html