Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi I have to run EOD i.e End of Day, a VB 6.0 Application(ADO 2.6) with SQL Server 2000 I want to lock the Database, full/complete Database, there are more than 100 tables so locking them one by one would not be the ideal solution(i think) the requirement is i - all currently logged in users must automatically logged out ( all open connections should be closed ) ii - all transactions should automatically rolled back iii - no user can login while EOD is running solution plz Regards
Post Follow-up to this messageWow... You could start by looking into Pausing SQL server in BOL? Immy <atif.aqeel@gmail.com> wrote in message news:1128084372.490596.85200@z14g2000cwz.googlegroups.com... > Hi > > I have to run EOD i.e End of Day, a VB 6.0 Application(ADO 2.6) with > SQL Server 2000 > > I want to lock the Database, full/complete Database, > there are more than 100 tables so locking them one by one would not be > the ideal solution(i think) > > the requirement is > i - all currently logged in users must automatically logged out > ( all open connections should be closed ) > ii - all transactions should automatically rolled back > iii - no user can login while EOD is running > > solution plz > Regards >
Post Follow-up to this messageI assume you want to do this at the database level, not the SQL Server insta nce level. If so, use: USE dbname ALTER DATABASE dbname SET SINGLE_USER ROLLBACK IMMEDIATE Do your job, and then set back to MULTI_USER -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www. solidqualitylearning .com/ Blog: http:// solidqualitylearning .com/blogs/tibor/ <atif.aqeel@gmail.com> wrote in message news:1128084372.490596.85200@z14g2000cwz.googlegrou ps.com... > Hi > > I have to run EOD i.e End of Day, a VB 6.0 Application(ADO 2.6) with > SQL Server 2000 > > I want to lock the Database, full/complete Database, > there are more than 100 tables so locking them one by one would not be > the ideal solution(i think) > > the requirement is > i - all currently logged in users must automatically logged out > ( all open connections should be closed ) > ii - all transactions should automatically rolled back > iii - no user can login while EOD is running > > solution plz > Regards >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread