Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restore fail

Status
Not open for further replies.

sssdexter

Programmer
Oct 7, 2003
29
MY
Hi,

I am using script to restore a database.

Script like "restore database database_name from disk file_name"

but it gave me an error message like "database in use"?

i run this script from my application, backup script run with no problem, but i just can't restore, i try to disconnect before execute the script, but hit "transaction not connected".

Can anyone help me with this? Thanks in advance
 
Well the message obviously means that the database is in use!

Have a look in enterprise manager, under Management, Current Activity, Process Info.

Are there any processes lingering there on that database? If there are then you will get this error because SQL thinks that the database is still in use.

Transcend
[gorgeous]
 
Hi,

I actually developed a utility that have backup and restore function. Once i start the utility, under Enterprise Manager already shown the database have a status of "sleeping" at current activity.

Is there anyway to do the restore job in the utility? Cause i must connect to database, but once connect, already got activity attached to it.

Thanks for the reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top