Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2003, 12:36 AM
Registered User
 
Join Date: Sep 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default database restore using sql command very argent!!

I tried to restore a database for which i have altready
created backup and backup device.
my device name is : fokaadd
my database backup name is: fokaadd.dat
my database log name is: fokaaddLog.dat

my code for restore is :

        RESTORE DATABASE test
        From fokaadd

It is not restoring and giving a message:

the message is :

Server: Msg 1834, Level 16, State 1, Line 1
The file 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\VBSettings_Data.MDF' cannot be overwritten. It is being used by database 'VBSettings'.

How can I restore my database from backup;
If nay one konws the solution pls send me .


my email address is :

         [email protected]








 
Old December 10th, 2003, 01:20 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

It looks like your trying to restore your data file, not your back up file.

using this example restores your database and move the file to a new location if necessary.

restore database Test
FROM DISK = 'C:\dbbackups\test_db_200310122203.bak'
with recovery, replace,
MOVE 'test_data' TO 'C:\sqldata\mssql\data\test.mdf',
MOVE 'test_log' TO 'C:\sqldata\mssql\data\test.ldf'

I hope this helps
 
Old December 10th, 2003, 01:25 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Also, If your are using the database you may be the culprit and it reports someone is blocking or using it. Use master and restore your database.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Restore/copy database from SQL 2005 to 2000 shillr SQL Server 2005 2 April 1st, 2008 11:14 AM
Problem to restore database in C#2005 database acmuralee MySQL 0 March 25th, 2008 04:42 AM
restore thePhile database with 2005 SQL Server ecarnews BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 4 July 2nd, 2007 12:58 PM
How i can Backup and Restore Sql Server Database hamor ASP.NET 2.0 Professional 1 April 24th, 2007 07:03 AM
Restore SQL 2000 .bak file into SQL 7.0 ?? mat41 SQL Server 2000 9 April 8th, 2005 04:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.