?
Solved

SQL 2005 - Database Restore Question

Posted on 2007-12-04
5
Medium Priority
?
418 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

718 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