Using 'Copy Database' Wizard

  • Hello,

    I need to copy a database from one instance of SQL Server 2000 into another instance, and have a DTS package to do that.

    The source database may have lingering connections to it after 9:00pm, but since the particular application is only used in house during working hours, it is highly unlikely that there would be anyone doing any work with the data in the database after 9:00pm.

    I need to know how I can close any lingering connections to the source database before a job runs the DTS package to copy the database. Can this be done by some method other than restarting the source SQL Server?

    Thanks,

    CSDunn

  • Why do you need no connections during the database copy? You could kill the sessions what that would force a rollback in the user transaction

  • Exactly. You can do a select * from sysprocesses where db_name(dbid)='yourdbname', then use the kill command to end the spids. If you have problems with connections being re-established, you can work around it by changing the db to dbo only, or more heavy handed, pause the server while you kill the connections.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply