Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Database Locking
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


Report this thread to moderator Post Follow-up to this message
Old Post
atif.aqeel@gmail.com
09-30-05 02:23 PM


Re: Database Locking
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.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
>



Report this thread to moderator Post Follow-up to this message
Old Post
Imtiaz Ullah
09-30-05 02:23 PM


Re: Database Locking
I 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
>


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
09-30-05 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 02:41 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006