Hi all...
Is there any way to flush the connection pool through code?
I am trying to restore a DB from within Code and keep running into the fact that the restore cannot exclusively lock the DB.
I believe this is because there are some connections from the application that are pooled.
The app that I am working on accesses the DB to start up, so connections are maintained in the pool to the DB. Then from within the same application I want to suspend all users.. which I can do.. then restore a backup of the DB over the existing DB.
However even though there is no activity.. the connections are not released.. and I can find no way to force them to release...
Is it possible to force release??
I am using SQL server 2000.
Any and all suggestions or ideas are welcomed..
Thanks in advance,
Simon.Have you tried keeping database in DBO-Use only and make sure those connections have any ADMIN privilege on DB.
Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts
Sunday, March 25, 2012
Monday, March 19, 2012
connection issue
Created a script to restore db. it drops all connection first then it waits
for 5 minutes just incase there are jobs running.
problem is after it kills all the users and then it waits 5 minutes before
it drops the db another users can connect to the db. Any idea on what I can
do so no one connects to the db during its wait time of 5 minutes before it
drops the db
thxCheck out ALTER DATABASE and SET RESTRICTED_USER (or SINGLE_USER) with a rol
lback clause, like
ROLLBACK IMMEDIATE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:72A7EDA3-A421-45CB-80F8-97213E80A19F@.microsoft.com...
> Created a script to restore db. it drops all connection first then it wai
ts
> for 5 minutes just incase there are jobs running.
> problem is after it kills all the users and then it waits 5 minutes before
> it drops the db another users can connect to the db. Any idea on what I c
an
> do so no one connects to the db during its wait time of 5 minutes before i
t
> drops the db
> thx
for 5 minutes just incase there are jobs running.
problem is after it kills all the users and then it waits 5 minutes before
it drops the db another users can connect to the db. Any idea on what I can
do so no one connects to the db during its wait time of 5 minutes before it
drops the db
thxCheck out ALTER DATABASE and SET RESTRICTED_USER (or SINGLE_USER) with a rol
lback clause, like
ROLLBACK IMMEDIATE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:72A7EDA3-A421-45CB-80F8-97213E80A19F@.microsoft.com...
> Created a script to restore db. it drops all connection first then it wai
ts
> for 5 minutes just incase there are jobs running.
> problem is after it kills all the users and then it waits 5 minutes before
> it drops the db another users can connect to the db. Any idea on what I c
an
> do so no one connects to the db during its wait time of 5 minutes before i
t
> drops the db
> thx
connection issue
Created a script to restore db. it drops all connection first then it waits
for 5 minutes just incase there are jobs running.
problem is after it kills all the users and then it waits 5 minutes before
it drops the db another users can connect to the db. Any idea on what I can
do so no one connects to the db during its wait time of 5 minutes before it
drops the db
thxCheck out ALTER DATABASE and SET RESTRICTED_USER (or SINGLE_USER) with a rollback clause, like
ROLLBACK IMMEDIATE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:72A7EDA3-A421-45CB-80F8-97213E80A19F@.microsoft.com...
> Created a script to restore db. it drops all connection first then it waits
> for 5 minutes just incase there are jobs running.
> problem is after it kills all the users and then it waits 5 minutes before
> it drops the db another users can connect to the db. Any idea on what I can
> do so no one connects to the db during its wait time of 5 minutes before it
> drops the db
> thx
for 5 minutes just incase there are jobs running.
problem is after it kills all the users and then it waits 5 minutes before
it drops the db another users can connect to the db. Any idea on what I can
do so no one connects to the db during its wait time of 5 minutes before it
drops the db
thxCheck out ALTER DATABASE and SET RESTRICTED_USER (or SINGLE_USER) with a rollback clause, like
ROLLBACK IMMEDIATE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:72A7EDA3-A421-45CB-80F8-97213E80A19F@.microsoft.com...
> Created a script to restore db. it drops all connection first then it waits
> for 5 minutes just incase there are jobs running.
> problem is after it kills all the users and then it waits 5 minutes before
> it drops the db another users can connect to the db. Any idea on what I can
> do so no one connects to the db during its wait time of 5 minutes before it
> drops the db
> thx
Wednesday, March 7, 2012
Connection failed
Hi,
After I made a database restore, SQL Server show me a follow message:
Connection failed, check SQL Server Registration Properties.
Please help meWhat account are you attempting to use to log in? It sounds like you have either an invalid account, or some other erroneous information for your connection.|||Originally posted by bpdWork
What account are you attempting to use to log in? It sounds like you have either an invalid account, or some other erroneous information for your connection.
I try using XYZ/Scorpius (XYZ is my dominium), accidentally I erased this user, how I fix it, if is possible.
After I made a database restore, SQL Server show me a follow message:
Connection failed, check SQL Server Registration Properties.
Please help meWhat account are you attempting to use to log in? It sounds like you have either an invalid account, or some other erroneous information for your connection.|||Originally posted by bpdWork
What account are you attempting to use to log in? It sounds like you have either an invalid account, or some other erroneous information for your connection.
I try using XYZ/Scorpius (XYZ is my dominium), accidentally I erased this user, how I fix it, if is possible.
Labels:
connection,
database,
failed,
messageconnection,
microsoft,
mysql,
oracle,
properties,
registration,
restore,
server,
sql
Friday, February 24, 2012
Connection Broken - SQL 7.0 db migration to SQL 2000
Hi there,
I am trying to upgrade our sql server db from version 7.0
to version 2000. I was successly able to restore the sql
7.0 db into 2000 server. Everything seems to be working
fine except one important stored procedure.
When i execute this particular stored procedure,it works
fine for 2 attempts but crashes the server on the thrid
attempt. The error message i am getting is as follows:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]
ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
It will be great help if someone could shed some light on
this issue.
Thanks,
Savvy.
Hi
Rebuild all your indexes. I have seen this when the statistics get out of
date and you upgrade your DB.
Regards
Mike
"Savvy" wrote:
> Hi there,
> I am trying to upgrade our sql server db from version 7.0
> to version 2000. I was successly able to restore the sql
> 7.0 db into 2000 server. Everything seems to be working
> fine except one important stored procedure.
> When i execute this particular stored procedure,it works
> fine for 2 attempts but crashes the server on the thrid
> attempt. The error message i am getting is as follows:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]
> ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> It will be great help if someone could shed some light on
> this issue.
> Thanks,
> Savvy.
>
I am trying to upgrade our sql server db from version 7.0
to version 2000. I was successly able to restore the sql
7.0 db into 2000 server. Everything seems to be working
fine except one important stored procedure.
When i execute this particular stored procedure,it works
fine for 2 attempts but crashes the server on the thrid
attempt. The error message i am getting is as follows:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]
ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
It will be great help if someone could shed some light on
this issue.
Thanks,
Savvy.
Hi
Rebuild all your indexes. I have seen this when the statistics get out of
date and you upgrade your DB.
Regards
Mike
"Savvy" wrote:
> Hi there,
> I am trying to upgrade our sql server db from version 7.0
> to version 2000. I was successly able to restore the sql
> 7.0 db into 2000 server. Everything seems to be working
> fine except one important stored procedure.
> When i execute this particular stored procedure,it works
> fine for 2 attempts but crashes the server on the thrid
> attempt. The error message i am getting is as follows:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]
> ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> It will be great help if someone could shed some light on
> this issue.
> Thanks,
> Savvy.
>
Connection Broken - SQL 7.0 db migration to SQL 2000
Hi there,
I am trying to upgrade our sql server db from version 7.0
to version 2000. I was successly able to restore the sql
7.0 db into 2000 server. Everything seems to be working
fine except one important stored procedure.
When i execute this particular stored procedure,it works
fine for 2 attempts but crashes the server on the thrid
attempt. The error message i am getting is as follows:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]
ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
It will be great help if someone could shed some light on
this issue.
Thanks,
Savvy.Hi
Rebuild all your indexes. I have seen this when the statistics get out of
date and you upgrade your DB.
Regards
Mike
"Savvy" wrote:
> Hi there,
> I am trying to upgrade our sql server db from version 7.0
> to version 2000. I was successly able to restore the sql
> 7.0 db into 2000 server. Everything seems to be working
> fine except one important stored procedure.
> When i execute this particular stored procedure,it works
> fine for 2 attempts but crashes the server on the thrid
> attempt. The error message i am getting is as follows:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]
> ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> It will be great help if someone could shed some light on
> this issue.
> Thanks,
> Savvy.
>
I am trying to upgrade our sql server db from version 7.0
to version 2000. I was successly able to restore the sql
7.0 db into 2000 server. Everything seems to be working
fine except one important stored procedure.
When i execute this particular stored procedure,it works
fine for 2 attempts but crashes the server on the thrid
attempt. The error message i am getting is as follows:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]
ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
It will be great help if someone could shed some light on
this issue.
Thanks,
Savvy.Hi
Rebuild all your indexes. I have seen this when the statistics get out of
date and you upgrade your DB.
Regards
Mike
"Savvy" wrote:
> Hi there,
> I am trying to upgrade our sql server db from version 7.0
> to version 2000. I was successly able to restore the sql
> 7.0 db into 2000 server. Everything seems to be working
> fine except one important stored procedure.
> When i execute this particular stored procedure,it works
> fine for 2 attempts but crashes the server on the thrid
> attempt. The error message i am getting is as follows:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]
> ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> It will be great help if someone could shed some light on
> this issue.
> Thanks,
> Savvy.
>
Subscribe to:
Posts (Atom)