473,405 Members | 2,445 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,405 software developers and data experts.

Restore database in SQL 2005

Here is the Example to Restore database in SQL 2005

RESTORE DATABASE DBNAME
FROM DISK ='D:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup\DBNAME_db.bak'
WITH MOVE 'DBNAME_log' TO 'D:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\DBNAME.MDF',
MOVE 'DBNAME_data' TO 'D:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\DBNAME_log.LDF',
STATS = 1, REPLACE
GO
Apr 23 '07 #1
0 3237

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

Similar topics

2
by: DMAC | last post by:
The following failed in EM (or whatever it is called now management studio I think) and I scripted it out and ran it in a query window to get more info. This works fine in SQL 2000 but not in 2005....
3
by: t2581 | last post by:
Hi , I run restore with rollforward In job in output, last commited transaction time less then backup image time Is it normal ? RESTORE DATABASE PRICE_V8 FROM "E:\BACKUP" TAKEN AT...
1
by: ad | last post by:
I want to backup and restore a database in asp.net. The backup process is successful and fail when restore with message: User does not have permission to RESTORE database 'Health'. RESTORE...
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
2
by: phil2phil | last post by:
Hi, I have an old 2000 bak file for a db that I would now like restored onto sql server 2005. I keep erroring out though, this is what I'm doing: Went to Restore Database in sql 2005, selected...
1
by: Alvin | last post by:
Can someone put me on the right track? I have a .bak file from an MSSQL 7.0 database. I want to restore the database in SQL 2000 or 2005, but the restore fails with the error: "An exception...
1
by: Utahduck | last post by:
I posted this to another group but I must not be subscribed as nothing appeared. Sooo.... I've backed up a databse with the following command: BACKUP DATABASE Thomasville FILEGROUP =...
3
by: Bill E. | last post by:
I'm trying to restore a database backed up a production machine onto my development machine. I don't want to restore the transaction logs (there are two) because they are far too large and are...
5
by: Seguros Catatumbo | last post by:
Hi, i am using sql server 2000, and i make daily backups. I want to restore my backup to a test msde database i have. I don't know how i did it last time. -The database name is the same: "web"...
4
by: DL | last post by:
Background Info: Instance A: SQL Server 2005 on Windows Server 2003 OS Instance B: SQL Server 2005 on XP Prof w/ SP2 Process: backup a database on Instance A like this: step 1 -- Management...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.