RE: handling db connection error
- From: Linchi Shea <LinchiShea@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Jun 2009 12:31:01 -0700
is there a way not to close the transaction when restore is being made?
When a database is in standby, you can't do anything with it. Why do you
want to keep any transaction open?
From your post, however it looks like you are talking about keeping theconnection open (instead of transaction), and it looks like you are trying to
do this strictly in T-SQL. T-SQL is not the right language to handle
connections. In a T-SQL script, you assume there is already a connection open
to run that script. To handle connections robustly, you need to use a
different language/tool.
If you want to stick to T-SQL, you could make it so that the script will
check for the status of a database before trying to use it, and use a job
scheduler such as SQL Agent to keep ret-trying the script if the script is
aborted when it has already started using a database.
But handling connections should really be done in a 'real'
programming/scripting language that is built to deal with connections.
Linchi
"Roy Goldhammer" wrote:
Hello there.
I need to build a process which imports table from Standby database.
i can read data as long that restore is not occur.
when it occur the transaction is being closed, even if i set it with
Try..catch.
is there a way not to close the transaction when restore is being made?
- Follow-Ups:
- Re: handling db connection error
- From: Roy Goldhammer
- Re: handling db connection error
- References:
- handling db connection error
- From: Roy Goldhammer
- handling db connection error
- Prev by Date: Crosstab duplicate values and concatenate??
- Next by Date: Database name alias
- Previous by thread: handling db connection error
- Next by thread: Re: handling db connection error
- Index(es):
Relevant Pages
|