Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Friday, March 23, 2012

Help with an error message

I keep getting this error message when I try to restore a database backup that I have made.

System.Data.SqlClient.SqlError: Directory lookup for the file "D:\Databases\GTT_Data.MDF" failed with the operating system error 5(error not found). (Microsoft.SqlServer.Express.Smo)

What I have done is created a backup of my sql sever database and I am now trying to restore it into sql server express for someone to play around with without it affecting my actual database. This is where the error messages are coming from.

Please help

Are you getting this during the restore ? If the machines are not the same for backup and restore you might not have the drives / folders available as they are on the original system. If so you either have to create those folders or Restore the database with the WITH MOVE option to specify a new destination. (thats because the original location is tored in the backup file).

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Yes its during the restore. Yes the machines are not the same. Please could you give me further details on how to restore the databse with the WITH MOVE option.

Thanks for your help

|||Hi,

look in your BOL (Books online, the Online help of SQL Server)

There is a point Restore a database and move Files which will help you

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/877ecd57-3f2e-4237-890a-08f16e944ef1.htm

RESTORE DATABASE MyAdvWorks
FROM MyAdvWorks_1
WITH NORECOVERY,
MOVE 'MyAdvWorks' TO
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\NewAdvWorks.mdf',
MOVE 'MyAdvWorksLog1'
TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\NewAdvWorks.ldf'
RESTORE LOG MyAdvWorks
FROM MyAdvWorksLog1
WITH RECOVERY

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

help with a restore problem please

I have a problem and I believe is very simple but is something missing in my knoledgments.
I migrate an sql server database to db2.
I start working with db2 for about 2-3 months and I am very new in administering problems.
I installed another server in another location. IN the old location I have my database which I intented to move in the new location (the new server).
I made a backup.
Now I want to restore using this backup in the new location (and the new server). I don't know how.
In SQL Server if I have a backup I can restore everywhere I want. Generally i create a new empty database and restore the backup into the new empty database. Another possibility is to restore the database and the database will be restored with the original name.
I try the same in Control Center but I don't know what is my mistake. If I try to to use create database from backup the "database being restored" give me the possibility to choose among the existing databases. But all I have is a full backup.
Can you tell me please what to do?
Thanks in advanced.have you tried copying the database between the two servers using DTS? it's easy to do. simply back up the database you want to copy, right click on the database and select export. change the exporting database to the one you just backed up, and set the export to database as the one you want to populate on the other box. follow the rest of the instructions and all should go well.

the other method is to copy the backup of the original database, put it on the new box and do a restore from file (simply put the link to the backup copy).

hope this helps.sql

Friday, February 24, 2012

Help Restore Database

The drive where my SQL backup were being backed up had filled up last
wednesday. The drive that the MDF was on crashed but I still have the LDF on
a different drive and wednesday's backup on it. Will it still be possible to
get the data back if I restore its last complete backup and then some how
restore the current LDF?
> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
|||Did the transaction log contain all transactions since the last full
database backup? If not, is the database set to FULL or BULK LOAD RECOVERY
or SIMPLE RECOVERY? Have there been transaction log backups?
Do as Dejan says and attempt a BACKUP LOG ... WITH NO_TRUNCATE to get all
committed transactions out.
You will need the database to NOT be in SIMPLE RECOVERY. You will need the
full transaction log and all log backups from the time of the last GOOD FULL
DATABASE backup.
You might be able to use a tool like Lumigent's Log Explorer to rewrite
transactions from the transaction log and replay against a restored
database.
Sincerely,
Anthony Thomas

"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
message news:O6fE$$SAFHA.2676@.TK2MSFTNGP12.phx.gbl...
> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Help Restore Database

The drive where my SQL backup were being backed up had filled up last
wednesday. The drive that the MDF was on crashed but I still have the LDF on
a different drive and wednesday's backup on it. Will it still be possible to
get the data back if I restore its last complete backup and then some how
restore the current LDF?> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Did the transaction log contain all transactions since the last full
database backup? If not, is the database set to FULL or BULK LOAD RECOVERY
or SIMPLE RECOVERY? Have there been transaction log backups?
Do as Dejan says and attempt a BACKUP LOG ... WITH NO_TRUNCATE to get all
committed transactions out.
You will need the database to NOT be in SIMPLE RECOVERY. You will need the
full transaction log and all log backups from the time of the last GOOD FULL
DATABASE backup.
You might be able to use a tool like Lumigent's Log Explorer to rewrite
transactions from the transaction log and replay against a restored
database.
Sincerely,
Anthony Thomas
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:O6fE$$SAFHA.2676@.TK2MSFTNGP12.phx.gbl...
> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Help Restore Database

The drive where my SQL backup were being backed up had filled up last
wednesday. The drive that the MDF was on crashed but I still have the LDF o
n
a different drive and wednesday's backup on it. Will it still be possible t
o
get the data back if I restore its last complete backup and then some how
restore the current LDF?> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Did the transaction log contain all transactions since the last full
database backup? If not, is the database set to FULL or BULK LOAD RECOVERY
or SIMPLE RECOVERY? Have there been transaction log backups?
Do as Dejan says and attempt a BACKUP LOG ... WITH NO_TRUNCATE to get all
committed transactions out.
You will need the database to NOT be in SIMPLE RECOVERY. You will need the
full transaction log and all log backups from the time of the last GOOD FULL
DATABASE backup.
You might be able to use a tool like Lumigent's Log Explorer to rewrite
transactions from the transaction log and replay against a restored
database.
Sincerely,
Anthony Thomas
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:O6fE$$SAFHA.2676@.TK2MSFTNGP12.phx.gbl...
> The drive where my SQL backup were being backed up had filled up last
> wednesday. The drive that the MDF was on crashed but I still have the LDF
on
> a different drive and wednesday's backup on it. Will it still be possible
to
> get the data back if I restore its last complete backup and then some how
> restore the current LDF?
Try to backup the last log with NO_TRUNCATE option first, and then do the
restore, including the last log backup. This way you might be able to
restore everything up to crash. Check the option mentioned in Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Help restore a database!

Hi SQL gurus!
My PC crashed but was able to recover some of my data including the
directory and folder with SQL Server 2000. I bought a new PC and want
to restore some of my databases. I tried to create a new database with
the same name and then copy and paste data and log files to a Data
folder but the system wouldn't allow me to do that. Is there any other
way to use my data and log files to restore datbases on the new PC?

Many thanks!

Stan

suslishe@.mail.ruTry using sp_attach_db to attach the database files. For example:

EXEC sp_attach_db
'MyDatabase',
'C:\DataFiles\MyDatabase.mdf',
'C:\LogFiles\MyDatabase_Log.ldf'

Note that this may not work since your databases were not cleanly detached
using sp_detach_db. You may get lucky, though.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Suslishe" <suslishe@.netscape.net> wrote in message
news:d404c196.0312121220.20ef44be@.posting.google.c om...
> Hi SQL gurus!
> My PC crashed but was able to recover some of my data including the
> directory and folder with SQL Server 2000. I bought a new PC and want
> to restore some of my databases. I tried to create a new database with
> the same name and then copy and paste data and log files to a Data
> folder but the system wouldn't allow me to do that. Is there any other
> way to use my data and log files to restore datbases on the new PC?
> Many thanks!
> Stan
> suslishe@.mail.ru

Sunday, February 19, 2012

Help required to do backup/restore from a client app

Hi,
As part of a client application that we are building, we need to do database
backup and restore operations. The application could be run on a machine that
does not have SQL server.
Need clarification on:
1. How do we initiate the backup/restore operations from the client machine?
Should we be looking at SQL DMO objects?
If so, the client machine may not have SQL DMO objects and its dependent
files.
Are these files distributable so that they could be included along with our
application?
2. Our application is also 'localizable' and it should be able to work with
different language versions of SQL Server.
In this case, should we be using 'localized' versions of SQL DMO files?
3. Or is there an alternate way of achieving backup/restore and not be
concerned about 'redistributable' versions of SQL DMO files (and 'localized'
file set additionally, if it comes to requiring such files)?
Any help on these will be greatly appreciated.
Thanks.
Regards,
KK
DMO, ADO or any other type of connection that can execute TSQL commands is
all you need to initiate backups. DMO doesn't include any UI functionality
so AFAIK there is no localization setting in that API. As far as the server
is concerned the language is an option set in the connection (SET LANGUAGE).
DMO is redistributable (see the readme REDIST.TXT on your installation disc
for the actual file names) with the proviso that the client machine still
needs to be properly licensed as a client for SQL Server.
David Portas
SQL Server MVP

Help required to do backup/restore from a client app

Hi,
As part of a client application that we are building, we need to do database
backup and restore operations. The application could be run on a machine tha
t
does not have SQL server.
Need clarification on:
1. How do we initiate the backup/restore operations from the client machine?
Should we be looking at SQL DMO objects?
If so, the client machine may not have SQL DMO objects and its dependent
files.
Are these files distributable so that they could be included along with our
application?
2. Our application is also 'localizable' and it should be able to work with
different language versions of SQL Server.
In this case, should we be using 'localized' versions of SQL DMO files?
3. Or is there an alternate way of achieving backup/restore and not be
concerned about 'redistributable' versions of SQL DMO files (and 'localized'
file set additionally, if it comes to requiring such files)?
Any help on these will be greatly appreciated.
Thanks.
Regards,
KKDMO, ADO or any other type of connection that can execute TSQL commands is
all you need to initiate backups. DMO doesn't include any UI functionality
so AFAIK there is no localization setting in that API. As far as the server
is concerned the language is an option set in the connection (SET LANGUAGE).
DMO is redistributable (see the readme REDIST.TXT on your installation disc
for the actual file names) with the proviso that the client machine still
needs to be properly licensed as a client for SQL Server.
David Portas
SQL Server MVP
--

Help required to do backup/restore from a client app

Hi,
As part of a client application that we are building, we need to do database
backup and restore operations. The application could be run on a machine that
does not have SQL server.
Need clarification on:
1. How do we initiate the backup/restore operations from the client machine?
Should we be looking at SQL DMO objects?
If so, the client machine may not have SQL DMO objects and its dependent
files.
Are these files distributable so that they could be included along with our
application?
2. Our application is also 'localizable' and it should be able to work with
different language versions of SQL Server.
In this case, should we be using 'localized' versions of SQL DMO files?
3. Or is there an alternate way of achieving backup/restore and not be
concerned about 'redistributable' versions of SQL DMO files (and 'localized'
file set additionally, if it comes to requiring such files)?
Any help on these will be greatly appreciated.
Thanks.
Regards,
KKDMO, ADO or any other type of connection that can execute TSQL commands is
all you need to initiate backups. DMO doesn't include any UI functionality
so AFAIK there is no localization setting in that API. As far as the server
is concerned the language is an option set in the connection (SET LANGUAGE).
DMO is redistributable (see the readme REDIST.TXT on your installation disc
for the actual file names) with the proviso that the client machine still
needs to be properly licensed as a client for SQL Server.
--
David Portas
SQL Server MVP
--