Forum Discussion

richv's avatar
richv
Occasional Contributor
12 years ago

Testcomplete does not disconnect from database

I am using DBtable compare at the a number of stages in my test.  After the DBtable compare i try to re instate my database for another test

When I try to overwrite the database just used for the DBcompare, Smartbear is still connected to the database.  It is not everytime, but randomly

Can I issue a command to force smartbear to disconnect from the database

1 Reply

  • paul_scroce's avatar
    paul_scroce
    Frequent Contributor
    If you are restoring an SQL database try this step to disconnect all users



    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=170474



    Step (3): Disconnect all users



    If you are restoring over an existing database make sure all currently connected users are disconnected

    (If you are restoring to create a brand new database skip this step)



    ALTER DATABASE MyTargetDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE