Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL 2005 - Database Restore Question

Posted on 2007-12-04
5
Medium Priority
?
419 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
5 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 2000 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

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 month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

971 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