Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Import databases using backups v 2

By Lennart Gerdvall,

Import database from source server using full and transaction log backups as recorded in msdb. Use it to import one or more databases to your development environment, to test your backups regularly or to move databases to a new server.
To move to a new server, take a transaction log backup and put all in read only mode on the source server, then run this SP on the target server with the source server name as an input parameter.
Import one or all databases. Generate import scripts or run import at once. Existence or access to backup files will be verified.
Run your destination SQL Server with an NT-account with privileges on the server with the backup files.
Link source server using an account that is allowed to read msdb system tables on source server.
Run this SP on target server where dbs are to be imported.
This SP can be put in any DB, Filer is the DBA database at our site.
Works on SQL 7 and SQL 2000 with native and/or LiteSpeed full backups and native transaction log backup.
I added sp_updatestats for each database in version 2.

Total article views: 204 | Views in the last 30 days: 3
 
Related Articles
FORUM

Server Database Backup

Server Database Backup

FORUM

Backup BizTalk Server Databases

Backup of BizTalk Server Databases

BLOG

Script: Backup All your Databases

We all know the importance of taking regular backups of our SQL Server databases. This is a useful l...

FORUM

import data from excel file to sql server database

import data from excel file to sql server database

FORUM

Proper way to backup databases

backup databases

Tags
 
Contribute