Showing posts with label restoring. Show all posts
Showing posts with label restoring. Show all posts

Thursday, March 29, 2012

Database status: Loading

After restoring my old transaction logs, the database
showing a status: 'Loading'. The database status still
remain 'Loading' even after 3 days.
Is there anyway I can stop the loading and will it cause
any problem to my data?Perhaps the last log was restored with NORECOVERY. In this case, you
can recover the database with the command below. This will not
introduce any data problems.
RESTORE DATABASE MyDatabase
WITH RECOVERY
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"TEO" <teo.yongjiew@.eonbank.com.my> wrote in message
news:067501c3a80b$73cf54e0$a401280a@.phx.gbl...
> After restoring my old transaction logs, the database
> showing a status: 'Loading'. The database status still
> remain 'Loading' even after 3 days.
> Is there anyway I can stop the loading and will it cause
> any problem to my data?sql

Database Status = Loading

A coworker is repeatedly experiencing problems restoring database backups on
a new sql virtual server (clustered). He has restored a database backup
using enterprise manager. Enterprise manager told him that the restore has
completed without giving any errors. We can not access the database and
enterprise manager shows the status of the database as "Loading". I ran the
command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
basically saying that the database was not completely loaded or the restore
did not complete. Can anyone tell me what the problem is or tell me how to
avoid this scenario?
-SJHi
Have you checked the SQL Server log and the System Event log to see if there
is any additional information in them?
It is usually a good idea to post the exact error numbers and messages.
John
"SJ" wrote:

> A coworker is repeatedly experiencing problems restoring database backups
on
> a new sql virtual server (clustered). He has restored a database backup
> using enterprise manager. Enterprise manager told him that the restore ha
s
> completed without giving any errors. We can not access the database and
> enterprise manager shows the status of the database as "Loading". I ran t
he
> command RESTORE DATABASE <databasename> WITH RECOVERY and received an erro
r
> basically saying that the database was not completely loaded or the restor
e
> did not complete. Can anyone tell me what the problem is or tell me how t
o
> avoid this scenario?
> --
> -SJ|||Here is the error:
File '<logical file name>' was only partially restored by a database or file
restore. The entire file must be successfully restored before applying the
log.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Enterprise manager told me "Restore of database '<databasename>' completed
successfully."
-SJ
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked the SQL Server log and the System Event log to see if the
re
> is any additional information in them?
> It is usually a good idea to post the exact error numbers and messages.
> John
> "SJ" wrote:
>|||Hi SJ
Check out:
http://groups.google.com/group/micr...27357de5278e8bd
John
"SJ" wrote:
[vbcol=seagreen]
> Here is the error:
> File '<logical file name>' was only partially restored by a database or fi
le
> restore. The entire file must be successfully restored before applying the
> log.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Enterprise manager told me "Restore of database '<databasename>' completed
> successfully."
> -SJ
> "John Bell" wrote:
>

Database Status = Loading

A coworker is repeatedly experiencing problems restoring database backups on
a new sql virtual server (clustered). He has restored a database backup
using enterprise manager. Enterprise manager told him that the restore has
completed without giving any errors. We can not access the database and
enterprise manager shows the status of the database as "Loading". I ran the
command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
basically saying that the database was not completely loaded or the restore
did not complete. Can anyone tell me what the problem is or tell me how to
avoid this scenario?
-SJ
Hi
Have you checked the SQL Server log and the System Event log to see if there
is any additional information in them?
It is usually a good idea to post the exact error numbers and messages.
John
"SJ" wrote:

> A coworker is repeatedly experiencing problems restoring database backups on
> a new sql virtual server (clustered). He has restored a database backup
> using enterprise manager. Enterprise manager told him that the restore has
> completed without giving any errors. We can not access the database and
> enterprise manager shows the status of the database as "Loading". I ran the
> command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
> basically saying that the database was not completely loaded or the restore
> did not complete. Can anyone tell me what the problem is or tell me how to
> avoid this scenario?
> --
> -SJ
|||Here is the error:
File '<logical file name>' was only partially restored by a database or file
restore. The entire file must be successfully restored before applying the
log.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Enterprise manager told me "Restore of database '<databasename>' completed
successfully."
-SJ
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked the SQL Server log and the System Event log to see if there
> is any additional information in them?
> It is usually a good idea to post the exact error numbers and messages.
> John
> "SJ" wrote:
|||Hi SJ
Check out:
http://groups.google.com/group/micro...7357de5278e8bd
John
"SJ" wrote:
[vbcol=seagreen]
> Here is the error:
> File '<logical file name>' was only partially restored by a database or file
> restore. The entire file must be successfully restored before applying the
> log.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Enterprise manager told me "Restore of database '<databasename>' completed
> successfully."
> -SJ
> "John Bell" wrote:

Database Status = Loading

A coworker is repeatedly experiencing problems restoring database backups on
a new sql virtual server (clustered). He has restored a database backup
using enterprise manager. Enterprise manager told him that the restore has
completed without giving any errors. We can not access the database and
enterprise manager shows the status of the database as "Loading". I ran the
command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
basically saying that the database was not completely loaded or the restore
did not complete. Can anyone tell me what the problem is or tell me how to
avoid this scenario?
--
-SJHi
Have you checked the SQL Server log and the System Event log to see if there
is any additional information in them?
It is usually a good idea to post the exact error numbers and messages.
John
"SJ" wrote:
> A coworker is repeatedly experiencing problems restoring database backups on
> a new sql virtual server (clustered). He has restored a database backup
> using enterprise manager. Enterprise manager told him that the restore has
> completed without giving any errors. We can not access the database and
> enterprise manager shows the status of the database as "Loading". I ran the
> command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
> basically saying that the database was not completely loaded or the restore
> did not complete. Can anyone tell me what the problem is or tell me how to
> avoid this scenario?
> --
> -SJ|||Here is the error:
File '<logical file name>' was only partially restored by a database or file
restore. The entire file must be successfully restored before applying the
log.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Enterprise manager told me "Restore of database '<databasename>' completed
successfully."
-SJ
"John Bell" wrote:
> Hi
> Have you checked the SQL Server log and the System Event log to see if there
> is any additional information in them?
> It is usually a good idea to post the exact error numbers and messages.
> John
> "SJ" wrote:
> > A coworker is repeatedly experiencing problems restoring database backups on
> > a new sql virtual server (clustered). He has restored a database backup
> > using enterprise manager. Enterprise manager told him that the restore has
> > completed without giving any errors. We can not access the database and
> > enterprise manager shows the status of the database as "Loading". I ran the
> > command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
> > basically saying that the database was not completely loaded or the restore
> > did not complete. Can anyone tell me what the problem is or tell me how to
> > avoid this scenario?
> >
> > --
> > -SJ|||Hi SJ
Check out:
http://groups.google.com/group/microsoft.public.sqlserver.clients/browse_frm/thread/b5447588fe32acf0/527357de5278e8bd#527357de5278e8bd
John
"SJ" wrote:
> Here is the error:
> File '<logical file name>' was only partially restored by a database or file
> restore. The entire file must be successfully restored before applying the
> log.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Enterprise manager told me "Restore of database '<databasename>' completed
> successfully."
> -SJ
> "John Bell" wrote:
> > Hi
> >
> > Have you checked the SQL Server log and the System Event log to see if there
> > is any additional information in them?
> >
> > It is usually a good idea to post the exact error numbers and messages.
> >
> > John
> >
> > "SJ" wrote:
> >
> > > A coworker is repeatedly experiencing problems restoring database backups on
> > > a new sql virtual server (clustered). He has restored a database backup
> > > using enterprise manager. Enterprise manager told him that the restore has
> > > completed without giving any errors. We can not access the database and
> > > enterprise manager shows the status of the database as "Loading". I ran the
> > > command RESTORE DATABASE <databasename> WITH RECOVERY and received an error
> > > basically saying that the database was not completely loaded or the restore
> > > did not complete. Can anyone tell me what the problem is or tell me how to
> > > avoid this scenario?
> > >
> > > --
> > > -SJ

Tuesday, March 27, 2012

database snapshot off of a restoring db

Say I establish log shipping between source A and dest B.
and Dest B is continuously restoring logs, can i perform a snapshot on Dest
B
I know if i do mirroring between the 2 servers than i can snapshot off of
the mirror but wanted to know how it works with log shipping destination
ThanksI have not tested myself but saw this on BOL
Limitations on Database Snapshots
"The source database must be online, unless the database is a mirror
database within a database mirroring session"
Ben Nevarez, MCDBA, OCP
Database Administrator
"Hassan" wrote:

> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on Des
t
> B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>
>|||No. This is not allowed
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Hassan" <Hassan@.hotmail.com> wrote in message
news:eBwaNwiPGHA.2628@.TK2MSFTNGP15.phx.gbl...
> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on
> Dest B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>

database snapshot off of a restoring db

Say I establish log shipping between source A and dest B.
and Dest B is continuously restoring logs, can i perform a snapshot on Dest
B
I know if i do mirroring between the 2 servers than i can snapshot off of
the mirror but wanted to know how it works with log shipping destination
Thanks
I have not tested myself but saw this on BOL
Limitations on Database Snapshots
"The source database must be online, unless the database is a mirror
database within a database mirroring session"
Ben Nevarez, MCDBA, OCP
Database Administrator
"Hassan" wrote:

> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on Dest
> B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>
>
|||No. This is not allowed
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Hassan" <Hassan@.hotmail.com> wrote in message
news:eBwaNwiPGHA.2628@.TK2MSFTNGP15.phx.gbl...
> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on
> Dest B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>

database snapshot off of a restoring db

Say I establish log shipping between source A and dest B.
and Dest B is continuously restoring logs, can i perform a snapshot on Dest
B
I know if i do mirroring between the 2 servers than i can snapshot off of
the mirror but wanted to know how it works with log shipping destination
ThanksI have not tested myself but saw this on BOL
Limitations on Database Snapshots
"The source database must be online, unless the database is a mirror
database within a database mirroring session"
Ben Nevarez, MCDBA, OCP
Database Administrator
"Hassan" wrote:
> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on Dest
> B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>
>|||No. This is not allowed
--
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Hassan" <Hassan@.hotmail.com> wrote in message
news:eBwaNwiPGHA.2628@.TK2MSFTNGP15.phx.gbl...
> Say I establish log shipping between source A and dest B.
> and Dest B is continuously restoring logs, can i perform a snapshot on
> Dest B
> I know if i do mirroring between the 2 servers than i can snapshot off of
> the mirror but wanted to know how it works with log shipping destination
> Thanks
>sql

Sunday, March 11, 2012

Database restoring problem..HELP!! SOS

I am a noob of SQL2005, when i try to restore my database, it jz doesn't work and i've got this error..any expert here please lend me your hand..thx!!

http://img.photobucket.com/albums/v617/mv2squall_sx/restoredberror.png"

You want to override an existing database which tail has not been yet backuped, which measn that you will lose any changes that were made after the last transaction backup. If you know about that you will either have to confirm it or use another database name.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Database restore.

Hi everyone,
We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy
database.
When Restoring I have trouble,because while I am killing current user
connections new connections are established and I cannot restore because the
database is in use.
What are my options to get round this issue ?
I connect remotely to the Server to restore.
Regards,Set the database to single user with the rollback option. See ALTER DATABASE in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
> Hi everyone,
> We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy database.
> When Restoring I have trouble,because while I am killing current user connections new connections
> are established and I cannot restore because the database is in use.
> What are my options to get round this issue ?
> I connect remotely to the Server to restore.
> Regards,
>|||Thanks.
I suppose it does not make any difference if done with ALTER DATABASE or
from Enterpise Manager - Options - Restrict Access - Single User.
Regards,
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
> Set the database to single user with the rollback option. See ALTER
> DATABASE in Books Online.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
> news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
>> Hi everyone,
>> We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy
>> database.
>> When Restoring I have trouble,because while I am killing current user
>> connections new connections are established and I cannot restore because
>> the database is in use.
>> What are my options to get round this issue ?
>> I connect remotely to the Server to restore.
>> Regards,
>|||EM doesn't have a rollback option. If users are connected, then the EM operation will fail.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:OqU%23JXt4GHA.4888@.TK2MSFTNGP03.phx.gbl...
> Thanks.
> I suppose it does not make any difference if done with ALTER DATABASE or from Enterpise Manager -
> Options - Restrict Access - Single User.
> Regards,
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
>> Set the database to single user with the rollback option. See ALTER DATABASE in Books Online.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
>> news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
>> Hi everyone,
>> We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy database.
>> When Restoring I have trouble,because while I am killing current user connections new
>> connections are established and I cannot restore because the database is in use.
>> What are my options to get round this issue ?
>> I connect remotely to the Server to restore.
>> Regards,
>>
>

Database restore.

Hi everyone,
We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy
database.
When Restoring I have trouble,because while I am killing current user
connections new connections are established and I cannot restore because the
database is in use.
What are my options to get round this issue ?
I connect remotely to the Server to restore.
Regards,
Set the database to single user with the rollback option. See ALTER DATABASE in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
> Hi everyone,
> We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy database.
> When Restoring I have trouble,because while I am killing current user connections new connections
> are established and I cannot restore because the database is in use.
> What are my options to get round this issue ?
> I connect remotely to the Server to restore.
> Regards,
>
|||Thanks.
I suppose it does not make any difference if done with ALTER DATABASE or
from Enterpise Manager - Options - Restrict Access - Single User.
Regards,
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
> Set the database to single user with the rollback option. See ALTER
> DATABASE in Books Online.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
> news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
>
|||EM doesn't have a rollback option. If users are connected, then the EM operation will fail.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:OqU%23JXt4GHA.4888@.TK2MSFTNGP03.phx.gbl...
> Thanks.
> I suppose it does not make any difference if done with ALTER DATABASE or from Enterpise Manager -
> Options - Restrict Access - Single User.
> Regards,
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
>

Database restore.

Hi everyone,
We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy
database.
When Restoring I have trouble,because while I am killing current user
connections new connections are established and I cannot restore because the
database is in use.
What are my options to get round this issue ?
I connect remotely to the Server to restore.
Regards,Set the database to single user with the rollback option. See ALTER DATABASE
in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
> Hi everyone,
> We have a SQL Server 2000 Enterprise Ed. SP3a Server hosting a busy databa
se.
> When Restoring I have trouble,because while I am killing current user conn
ections new connections
> are established and I cannot restore because the database is in use.
> What are my options to get round this issue ?
> I connect remotely to the Server to restore.
> Regards,
>|||Thanks.
I suppose it does not make any difference if done with ALTER DATABASE or
from Enterpise Manager - Options - Restrict Access - Single User.
Regards,
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
> Set the database to single user with the rollback option. See ALTER
> DATABASE in Books Online.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
> news:%23NKvABt4GHA.1012@.TK2MSFTNGP05.phx.gbl...
>|||EM doesn't have a rollback option. If users are connected, then the EM opera
tion will fail.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sezgin Rafet" <anonymous@.newsgroup.com> wrote in message
news:OqU%23JXt4GHA.4888@.TK2MSFTNGP03.phx.gbl...
> Thanks.
> I suppose it does not make any difference if done with ALTER DATABASE or f
rom Enterpise Manager -
> Options - Restrict Access - Single User.
> Regards,
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%23Dfd4Gt4GHA.4616@.TK2MSFTNGP05.phx.gbl...
>

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of the
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:
> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?
You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of the
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:

> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of th
e
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:

> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Thursday, March 8, 2012

Database Restore with NORECOVERY

Hi All,

im trying to set up database mirroring and in the initial phase of database restoring im getting some problem.

the scenario is .

1- i create a tempDB on server1(which will be principal server) and backup full and transaction logs.

2- create tempDB in server 2( going to be used as mirror) .

3- restore the full backup of "tempDB" from server1 with NORECOVERY option.

this step results in a message box showing that the restore was successfull...

but the database explorer( management studio) shows the tempDB in (restoring ...) state. and no more operations can be performed with this Database. ( because teh databse isin restoring mode).. please help what this issue is?

Thanks In Advance for any suggestions

hi amir,

1.you have a db in principal server and it shud be in full recovery mode to configure db mirroring

2.take a full a full backup and restore it with norecovery option in the mirror prior to configuring mirroring

3.take a tran log backup in principal and restore it with norecovery option in the mirror.

then start configuring db mirroring using the wizard............

norecovery option restores the db but it will be in restoring state i.e you can apply tran logs to it but you cant use it and no objects will be visible

normally there are 3 types while performing restoration,

1.Leave the database ready to use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY)
2.Leave the database non-operational, and do not roll back the uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH NORECOVERY)
3.Leave the database in read-only mode. Undo uncommitted transactions, but save the undo actions in a standby file so that recovery effects can be reverted. (RESTORE WITH STANDBY)

http://msdn2.microsoft.com/en-us/library/ms177429.aspx - refer this link for restoring options.........

refer ,

http://deepakinsql.blogspot.com/2007/07/how-to-configure-database-mirroring.html - for configuring dbmirroring

http://deepakinsql.blogspot.com/2007/07/prerequisites-for-database-mirroring.html - prerequisites for mirroring

revert if you have nay concerns

thanks

|||

Hi Amir,

What Deepak xplained is right.

Follow the steps and if want to see the objects in mirror database just force a failover. The new mirror will be in restoring... state

Its quite confusing, it should have been "dont worry continue..." rather than "restoring..."

Goodluck

Vj

Database Restore with NORECOVERY

Hi All,

im trying to set up database mirroring and in the initial phase of database restoring im getting some problem.

the scenario is .

1- i create a tempDB on server1(which will be principal server) and backup full and transaction logs.

2- create tempDB in server 2( going to be used as mirror) .

3- restore the full backup of "tempDB" from server1 with NORECOVERY option.

this step results in a message box showing that the restore was successfull...

but the database explorer( management studio) shows the tempDB in (restoring ...) state. and no more operations can be performed with this Database. ( because teh databse isin restoring mode).. please help what this issue is?

Thanks In Advance for any suggestions

hi amir,

1.you have a db in principal server and it shud be in full recovery mode to configure db mirroring

2.take a full a full backup and restore it with norecovery option in the mirror prior to configuring mirroring

3.take a tran log backup in principal and restore it with norecovery option in the mirror.

then start configuring db mirroring using the wizard............

norecovery option restores the db but it will be in restoring state i.e you can apply tran logs to it but you cant use it and no objects will be visible

normally there are 3 types while performing restoration,

1.Leave the database ready to use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY)
2.Leave the database non-operational, and do not roll back the uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH NORECOVERY)
3.Leave the database in read-only mode. Undo uncommitted transactions, but save the undo actions in a standby file so that recovery effects can be reverted. (RESTORE WITH STANDBY)

http://msdn2.microsoft.com/en-us/library/ms177429.aspx - refer this link for restoring options.........

refer ,

http://deepakinsql.blogspot.com/2007/07/how-to-configure-database-mirroring.html - for configuring dbmirroring

http://deepakinsql.blogspot.com/2007/07/prerequisites-for-database-mirroring.html - prerequisites for mirroring

revert if you have nay concerns

thanks

|||

Hi Amir,

What Deepak xplained is right.

Follow the steps and if want to see the objects in mirror database just force a failover. The new mirror will be in restoring... state

Its quite confusing, it should have been "dont worry continue..." rather than "restoring..."

Goodluck

Vj

Wednesday, March 7, 2012

Database Restore Error

I have a question about restoring a database using the GUI. If we log in as
the db_owner using an SQL account, click on databases and then restore we
get the message:
"RESTORE cannot process database 'XXX' because it is in use by this session.
It is recommended that the master database be used when performing this
operation."
We did not have any active connections and for the id we set the default
database to master database.
If I try doing the restore using transact-SQL it works but I am curious on
how to get it working using the GUI so our developers can do their own
restores.
Seems you have a bug in the GUI so it doesn't put the connection in the master database before
executing the RESTORE command. What GUI are you using? EM, SSMS, 3:rd party? Also, is it service
packed?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Loren Z" <anonymous@.discussions.microsoft.com> wrote in message
news:uTnOt3W7GHA.1012@.TK2MSFTNGP05.phx.gbl...
>I have a question about restoring a database using the GUI. If we log in as the db_owner using an
>SQL account, click on databases and then restore we get the message:
> "RESTORE cannot process database 'XXX' because it is in use by this session. It is recommended
> that the master database be used when performing this operation."
> We did not have any active connections and for the id we set the default database to master
> database.
> If I try doing the restore using transact-SQL it works but I am curious on how to get it working
> using the GUI so our developers can do their own restores.
>
|||We are using SSMS and it is patched with SQL Server 2005 SP1. The same
problem occurs on other servers here as well.
Thanks,
Loren Z
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3Mn9SX7GHA.1560@.TK2MSFTNGP04.phx.gbl...
> Seems you have a bug in the GUI so it doesn't put the connection in the
> master database before executing the RESTORE command. What GUI are you
> using? EM, SSMS, 3:rd party? Also, is it service packed?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Loren Z" <anonymous@.discussions.microsoft.com> wrote in message
> news:uTnOt3W7GHA.1012@.TK2MSFTNGP05.phx.gbl...
>
|||I just tired a couple of restores using SSMS on SP 1 and
didn't have any problems with the restore. The only time it
failed is if I had a connection in the database. Are you
sure you don't have any connections in the database you are
trying to restore?
Check all connections and make sure none are in the database
you want to restore. Open up SSMS. Right click on the
database, select Tasks, Restore, Database and restore from
there.
-Sue
On Wed, 11 Oct 2006 14:58:05 -0600, "Loren Z"
<anonymous@.discussions.microsoft.com> wrote:

>We are using SSMS and it is patched with SQL Server 2005 SP1. The same
>problem occurs on other servers here as well.
>Thanks,
>Loren Z
>
>"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
>message news:e3Mn9SX7GHA.1560@.TK2MSFTNGP04.phx.gbl...
>
|||Don't know if it relates to this, but we use a medical database program
called Misys. It uses a service. If I want to restore the database from
a backup, I first have to stop the Misys Homecare Server service.
Otherwise I get an "in-use" message...
Regards,
Hank Arnold
Loren Z wrote:
> I have a question about restoring a database using the GUI. If we log in as
> the db_owner using an SQL account, click on databases and then restore we
> get the message:
> "RESTORE cannot process database 'XXX' because it is in use by this session.
> It is recommended that the master database be used when performing this
> operation."
> We did not have any active connections and for the id we set the default
> database to master database.
> If I try doing the restore using transact-SQL it works but I am curious on
> how to get it working using the GUI so our developers can do their own
> restores.
>
|||I checked the properties of the SQL ID and the default database is the
database which this ID owns. As soon as I open the restore window a
connection to this database is established. I changed the default database
to master and then tried opening the restore window and the connection was
not there. A restore was then performed successfully.
Is this the way SQL should function by design? That when you open the
restore window a connection is automatically established to the default
database of the SQL ID? In order for our users to perform simple backups
should I set the default database to master?
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:fv9ri25n8b361pkvmsap0aaga96ujmgjug@.4ax.com...
>I just tired a couple of restores using SSMS on SP 1 and
> didn't have any problems with the restore. The only time it
> failed is if I had a connection in the database. Are you
> sure you don't have any connections in the database you are
> trying to restore?
> Check all connections and make sure none are in the database
> you want to restore. Open up SSMS. Right click on the
> database, select Tasks, Restore, Database and restore from
> there.
> -Sue
> On Wed, 11 Oct 2006 14:58:05 -0600, "Loren Z"
> <anonymous@.discussions.microsoft.com> wrote:
>
|||> Is this the way SQL should function by design?
Seems like an oversight in the tool (SSMS) you are using. Consider reporting it to
http://connect.microsoft.com/site/si...spx?SiteID=68.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Loren Z" <anonymous@.discussions.microsoft.com> wrote in message
news:ecN6VRh7GHA.728@.TK2MSFTNGP04.phx.gbl...
>I checked the properties of the SQL ID and the default database is the database which this ID owns.
>As soon as I open the restore window a connection to this database is established. I changed the
>default database to master and then tried opening the restore window and the connection was not
>there. A restore was then performed successfully.
> Is this the way SQL should function by design? That when you open the restore window a connection
> is automatically established to the default database of the SQL ID? In order for our users to
> perform simple backups should I set the default database to master?
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:fv9ri25n8b361pkvmsap0aaga96ujmgjug@.4ax.com...
>
|||Lines: 100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: n175en1.energy.gov.ab.ca 199.214.175.1
Xref: leafnode.mcse.ms microsoft.public.sqlserver.tools:1109
Thanks Tibor, have you confirmed this problem as well? If not would you be
able to replicate this behaviour?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e%23mW5jh7GHA.4996@.TK2MSFTNGP03.phx.gbl...
> Seems like an oversight in the tool (SSMS) you are using. Consider
> reporting it to http://connect.microsoft.com/site/si...spx?SiteID=68.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Loren Z" <anonymous@.discussions.microsoft.com> wrote in message
> news:ecN6VRh7GHA.728@.TK2MSFTNGP04.phx.gbl...
>
|||I just did.
So if a users default database is the same as the database
they are going to restore, they will get this error when
using SSMS.
-Sue
On Thu, 12 Oct 2006 10:29:30 -0600, "Loren Z"
<anonymous@.discussions.microsoft.com> wrote:

>Thanks Tibor, have you confirmed this problem as well? If not would you be
>able to replicate this behaviour?
>
>"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
>message news:e%23mW5jh7GHA.4996@.TK2MSFTNGP03.phx.gbl...
>
|||Chris Wood (anonymous@.discussions.microsoft.com) writes:
> Does anyone look at the Connect Site? I recorded the bug on October 12th
> and nobody appears to have even checked it out.
Patience, my dear friend!
The bugs you file there are sent to the internal bug database where the
developers deal with them. You may get a reply the next day, and it
may take several months. I can testify, as I have submitted quite a
few bugs.
It's a good idea to register a notification address so that you get
mail when the bug is changed. Not the least, because sometimes the
bug changes status without any comment. (Usually when this happens it
is due to that the developer forgot to fill in a crucial field in the
tool the devs are using. That is, they don't work directly against the
Connect site.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

DataBase Restoration Problem (SQL Server 7)

I'm restoring a database daily. However until last two days, I'm getting the following error (this happens in Enterprise Manager and also when I use the Query Analyzer):

Server: Msg 5149, Level 16, State 1, Line 1
MODIFY FILE encountered operating system error 112(There is not enough space on the disk.) while attempting to expand the physical file.
Server: Msg 3140, Level 16, State 1, Line 1
Could not adjust the space allocation for file 'corporate'.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.

The server has sufficient amount of space. Where data resides there is 13.5GB free and where the log resides there is 4.75BG free.
The backup file itself is 3.3GB.

When peaking into the backup file, it looks good:
data file being 4.4GB and the log 300MB

What could be the problem? The server is running Windows 2000 Server, RAID Solution and SQL Server 7.0 Service Pack #4I just want to also add, that on another server, where there is less space available, the backup restores fine. This is very strange.|||If you are restoring to the 'PRIMARY' filegroup, or another filegroup with lots of member files, it may be that the filegroup is 'full' (from the point of view of Sql Server).

Unfortunately this may correspond to different situations for which error messages are often not particularly helpful (the issue being due to some combination of the autogrowth algorithm, how auto growth may be constrained at a user level % / fixed increment, actual disk availability, etc., etc.). Such issues are more commonly seen in autogrow situations occurring during maintenence and / or production batching (but reasonably may occur in DB restore situations as well). Generally the error means that the disk(s) where the database(s) is / are located is / are full and /or the files of your database(s) cannot grow any more on their disk(s) (given the fixed increment or % setting constraint); or autogrowth of files may have been disabled. On DB creation (and hence mdf, ldf, sgf, etc. file creation) one either specifies or takes defaults for the initial size for each file. Similarly, one either specifies or takes defaults for how each file will increase via growth increment settings. Each time a file 'fills', it increases its size by the growth increment. When there are multiple files in a filegroup, (as is typically the case with the primary filegroup), filegroups do not autogrow until all the files are 'full'. Autogrowth then generally is initiated in a round robin type fashion. You may wish to manually check and increase the sizes of, and / or change the growth options of files that are members of the filegroup involved, as may be appropriate. If possible, I would be inclined to perform some experimentation on an identical (or very similarly configured) dev server to get a better idea of what the exact issue is in your case (before traumatizing the production server).|||Do you happen to be using fat32 as your file system (as opposed to ntfs) ? If so, fat32 has a 4 gb limit on file sizes.|||rnealejr>>FAT32 was the problem. I've checked and the drive was FAT32. The moment we converted to NTSF, the problem disappeared. Thanks a bunch.