Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Database attach

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-02-09 : 01:43:08
Dear All,

I have .mdf and .ldf files which are taken by the backup and restore team.

I want to restore the DB from these file.

While attaching the DB to SQL server 2005 instance i am gettign the below error.Please help me to resolve this.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

CREATE FILE encountered operating system error 32(error not found) while attempting to open or create the physical file 'E:\DB\13th_jan\GG_13thJan.mdf'. (Microsoft SQL Server, Error: 5123)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4035&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Thanks,
Gangadhara MS
SQL Developer and DBA

sql_server_dba
Posting Yak Master

167 Posts

Posted - 2011-02-09 : 15:15:25
look into the below link..it might be helpful.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=48523
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-09 : 15:24:58
Restore using a backup, not the database files.

The database files are only good if the service was down when the files were copied. Your service was likely up at the time, and the files aren't valid. Your backup/restore team should not be touching those database files. Skip the database files and instead only sweep to tape SQL backups.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-02-09 : 22:55:57
Hi Tara,

Yes As you said these files back up are done when the SQL service is up and its regular full backup was taken by data protector software by server team.

If the back up taken by server backup team using the software then why there is an entry in the backup history for this database with Full backup ??

I have a full backup was taken by maintenance plan on 05-01-2011 and 14-01-2011.
Differential backup on 6,7,8,9,10,11,12,and 13-01-2011.

When i tried to apply diff back to 05th full backup says its not valid sequence.

So when i checked the backup history i found somebody is taking full backup.When i check the these full back with server backup team they given files of .mdf and.ldf .
How do i restore this DB ?

Thanks




Thanks,
Gangadhara MS
SQL Developer and DBA
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-10 : 04:46:38
As tara said the .mdf and .ldf files are useless and you can tell your server team to stop taking backup of them. It's just a waste of space.

As far as I can see you have 2 options:

1) If someone has done a full backup you must locate the backup file, restore it and then restore the log backups that were done after the latest full backup.

2) If you can't locate the latest full backup you can use the second latest, but then you need to restore all the log backups that were taken after that.

- Lumbago
My blog-> www.thefirstsql.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-10 : 20:16:20
You need to tell the backup team to provide whatever file it is that you need. Give them the exact path and file names, and they'll restore those files from tape. Don't just allow them to willy nilly pick random files from tape, lol.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -