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
Wow... You could start by looking into Pausing SQL server in BOL?
Immy
<atif.aqeel@.gmail.com> wrote in message
news:1128084372.490596.85200@.z14g2000cwz.googlegro ups.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
>
|||I assume you want to do this at the database level, not the SQL Server instance 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.googlegro ups.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
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment