Solved

SQL 2005 - Database Restore Question

Posted on 2007-12-04
5
413 Views
Last Modified: 2010-05-18
Hi community. Please help.

Looking to restore SQL Server 2005 databases between DELL PowerEdge 1850 servers.

Hardware and SQL 2005 systems are all same build and release, service packs.

However, there are quite a few databases: see below
1  4 SystemDatabases (Master, model, msdb, tempdb)
5 Database Snapshots
DBA_Maint
6 ReportServer
7 ReportServerTempDB
8 STS_Config_TFS
9 STS_Content_TFS
TfsActivityLogging
10 TFsBuild
11 TfsIntegration
12 TfsVersionControl
13 TfsWarehouse
14 TfsWorkItemTracking
15 TfsWorkItemTrackingAttachments

I am just slightly confused here. Although all databases are being backed up to:

F:\SQL_Backups\<Server Name>\<DB Name Folder>...these files are present inside each folder and several of them.
EAHAHTFS01_2007.12.04_00.20.01.000_Trans_Log_Backup_LOG_TfsBuild.trn or
EAHAHTFS01_2007.12.01_04.30.00.347_Trans_Log_Backup_LOG_STS_Content_TFS.trn

Transaction log files maybe.

But think I also need the .mdf Files?  

All database files have .mdf and .ldf files @ location: "F:\Microsoft SQL Server\MSSQL.1\MSSQL\Data"

Can anybody recommend reading, how to screenshots or tips, comments on SQL Server 2005 restores?

The application to restore here is Team Foundation Server, but if necessary, I  will raise another question on that one.  The article found here:  http://msdn2.microsoft.com/en-us/library/ms404869(VS.80).aspx  states how to restore, but not how to backup.

 I've got server database here, just need to backup and restore in SQL Server 2005.
0
Comment
Question by:ActiveInfoSys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20402164
Ideally, you would not use the automated daily backups if you are transferring servers. Perform a proper backup of all databases at the point of moving. You can specify the backup file name+location then.  The TRN files are transaction log backups, which won't help you much here.

IF using backup/restore, you need to wait for the backup, then the restore.
The faster option in this case is to stop SQL Server completely, and then copy all .MDF+.LDF files across.  From the new SQL Server, attach the databases using Enterprise Manager (2000) or Management Studio (2005).  The UI is quite intuitive, right-click "Databases", task, attach.

Whether you backup/restore or attach, remember to either
a) create all the same nt users; or
b) issue sp_changedbowner on all the databases to a user on the new SQL Server
0
 

Author Comment

by:ActiveInfoSys
ID: 20402565
Wow. This is excellent.

Just please give me the full syntax for sp_changedbowner....having issues with this.  Not spelling. This is OK.

Can you give me some samples?  And where to run as well? In what window?
0
 
LVL 8

Expert Comment

by:i2mental
ID: 20402721
If you had an owner of dbo on the other server, you likely don't need to do this part, but the syntax for attaching the the system admin account is:

EXEC sp_changedbowner 'sa'

Just run it once for each database specified
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question