473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

automatic restoration

any automated restoration script is available in sql server2000.
I want to do the restoration for 10 databases(full backup,latest differential backup) in other server.

Pls do the needful.
Jun 20 '07 #1
2 1903
Vidhura
99
any automated restoration script is available in sql server2000.
I want to do the restoration for 10 databases(full backup,latest differential backup) in other server.

Pls do the needful.

Try the following

use master
go
declare @file varchar(200)
select @file = 'c:\dbackup.backup'

declare @mdf varchar(500), @ldf varchar(500)
select @mdf = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\databasename.mdf'
select @ldf = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\databasename_log.ldf'

restore database <databasename>
from disk = @file
with
move 'databasename' to @mdf,
move 'databasename_Log' to @ldf
go
Jun 20 '07 #2
Thanks for ur reply.I will try it and let you know.
Bharat

Try the following

use master
go
declare @file varchar(200)
select @file = 'c:\dbackup.backup'

declare @mdf varchar(500), @ldf varchar(500)
select @mdf = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\databasename.mdf'
select @ldf = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\databasename_log.ldf'

restore database <databasename>
from disk = @file
with
move 'databasename' to @mdf,
move 'databasename_Log' to @ldf
go
Jun 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tommy.Vincent | last post by:
Hi, its newbie question. I have one production server(A) ,one backup server(B),additional server(C). my database backup are moved from A to C in regular basis. My problem is that when...
0
by: Richard | last post by:
hi, I am using SQL SERVER 2000. My query is, Can I restore my 60 transactional log file backup in one sql statement,giving condition where it is suppose to start and end.
1
by: Tommy.Vincent | last post by:
Hi, When i use to work on Windows 2000 advance server and Sql 2000 I was able to do network restoration by using a mapped drive where my backup use to be lying.What i did was I assigned...
1
by: Thyagu | last post by:
Hi, Does a database restoration perform any update-statistics/defragmentation by default. We observed a marked improvement in performance when we restored the a database from an high end...
0
by: bharadwaj | last post by:
Hi, I am trying to do restoration for n databases using automated script.The script is given below. it is not giving errors while job execution ,but restoration is not happening.(no record is in...
0
by: bharadwaj | last post by:
hi, i am trying to do master restoration using the following steps. 1.net stop MSSQLServer 2.sqlservr -m 3.use MASTER go RESTORE DATABASE master FROM disk='master.BAK' replace, MOVE...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I want to disable auto restoration of windows. Suppose if i delete a file say explorer.exe after a while it will create again by windows. If i change any registery it will restore...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
0
by: Now You Know | last post by:
Water Damage Restoration 24 hour open 7 Days Phone 1 877 364 5264 When disaster strikes such as a washing machine overflow, bath overflow, burst pipe, rainwater from balcony etc, water damage...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.