Hello,
I'm trying to create backup plan for a replicated database. I can create
backup's - its easy. ( I'm using BULK_LOGGED recovery mode). I have
problems with the recovery process.
When I want to use RECOVERY DATABASE abc FROM DISK = '...' i get
"Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use."
When I want to take offline my DB i get :
" Server: Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database 'ABC'.
Try again later."
SP_dbremove and sp_detatch_db also failed :(
I found out that i can alter database to change db mode to SINGLE_USER but
when i execute this statemens it SQL Query Analize ALTER DATABASE abs SET
SINGLE_USER this program hangs itself.
What else can I do without droping publication and recreating it after DB is
recovered ?
--
Best Regards
Wojciech ZnanieckiTry,
ALTER DATABASE abs SET SINGLE_USER with ROLLBACK IMMEDIATE
AMB
"Wojtek Z" wrote:
> Hello,
> I'm trying to create backup plan for a replicated database. I can create
> backup's - its easy. ( I'm using BULK_LOGGED recovery mode). I have
> problems with the recovery process.
> When I want to use RECOVERY DATABASE abc FROM DISK = '...' i get
> "Server: Msg 3101, Level 16, State 2, Line 1
> Exclusive access could not be obtained because the database is in use."
> When I want to take offline my DB i get :
> " Server: Msg 5061, Level 16, State 1, Line 1
> ALTER DATABASE failed because a lock could not be placed on database 'ABC'.
> Try again later."
> SP_dbremove and sp_detatch_db also failed :(
> I found out that i can alter database to change db mode to SINGLE_USER but
> when i execute this statemens it SQL Query Analize ALTER DATABASE abs SET
> SINGLE_USER this program hangs itself.
> What else can I do without droping publication and recreating it after DB is
> recovered ?
>
> --
> Best Regards
> Wojciech Znaniecki
>
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment