June 18, 2013 at 9:05 am
Is it possible to restore a database's logical path to multiple physical files?
The following produces an expected file or id error message.
RESTORE DATABASE TestDB
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2012.bak'
WITH MOVE 'AdventureWorks2012_Data' TO 'C:\MySQLServer\testdb.mdf', 'C:\MySQLServer\testdb2.ndf',
MOVE 'AdventureWorks2012_Log' TO 'C:\MySQLServer\testdb.ldf';
GO
June 18, 2013 at 9:17 am
nope, logical and physical names are a one to one relationship
---------------------------------------------------------------------
June 18, 2013 at 9:17 am
Not possible. A restore recreates the DB as it was at the time of backup. If the database that was backed up had one data file then the restored database has one data file.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 18, 2013 at 10:27 am
If it is not possible to restore to multiple files, is it possible to automate moving the data to multiple ndf files after the restore?
June 18, 2013 at 10:41 am
only by scripting up exactly what you want to do.
---------------------------------------------------------------------
June 18, 2013 at 10:45 am
marks_262 (6/18/2013)
If it is not possible to restore to multiple files, is it possible to automate moving the data to multiple ndf files after the restore?
Depends what you want to do specifically (and why)
There's no ALTER DATABASE SPREAD DATA ACROSS FILES command.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply