SQL Server >> with move query

by una clancy » Tue, 14 Sep 2004 17:15:32 GMT

Hi all

i have a backup from a customers site of a database there on sql7 were
trying to restore it into sql 2000

heres the query im using

restore database aib from disk 'c:\aib.bak'
with move 'aib' to c:\aib.mdf

it parses ok

heres the error
Server: Msg 3234, Level 16, State 2, Line 1
Logical file 'aib' is not part of database 'aib'. Use RESTORE FILELISTONLY
to list the logical file names.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

help
una




SQL Server >> with move query

by Peter Yeoh » Tue, 14 Sep 2004 17:40:17 GMT


Look up Books Online. The syntax for WITH MOVE is

MOVE 'logical_file_name' TO 'operating_system_file_name' ]

You need to find out the logical file names of the data and log files. To
do this, use the RESTORE FILELISTONLY command, as suggested.

--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!









SQL Server >> with move query

by Wayne Snyder » Tue, 14 Sep 2004 20:10:24 GMT

To add to Uri's comments, when you create a database each of the files gets
a logical (or friendly ) name.
The logical name of the file you are trying to move is 'aib'.
The error is telling you that there is no file in the backup with that
friendly name.
the way to find out the friendly names of the files in the backup is to use
RESTORE FILELISTONLY... The details of the command are in books on line


--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org







Similar Threads

1. Unable to move designer objects in query window - ADP:Access

2. Moving mdb Queries to SQL Server or adp

The title on my previous post was misleading. Sorry.

Is there an easy way to "upsize" mdb QBE queries to SQL Server? Thanks.

3. Access Sql query to move data

4. Need DTS query to move table objects

I need a query to use with the DTS Import/Export Wizard that can be used to 
export tables from one database which can then be imported into a different 
database on the same server. The table data is not needed at this time. I 
assume this is how to make a set of tables in a database that functions as a 
design model - to enable table objects to be copied to other databases for 
various implementations.
Comments?

<%= Clinton Gallagher 


5. Moving Access Cross Tab Query to SQL Cross Tab - SQL Server

6. Query problem moving from mysql 4 to 5

7. After moving database queries are very slow

8. Database metadata queries (WAS Moving from MySQL to PGSQL....some questions)