patternsqlMinor
Restore database into new DB without replacing the file structure
Viewed 0 times
withoutthefilenewintodatabasereplacingstructurerestore
Problem
Our Network Admin has setup a MS SQL 2012 server and wants the DBs setup so the database files are located on 4 different drives.
My problem here is when I try to restore a DB from a different system that only uses a single database file, it wants to bring the old file structure over with it. In the restore options, I can see the file structure it wants to use (1 database file), but I cannot change it.
Is there a way to restore the database into a new database without losing the file structure?
Thanks in advance.
Richard
My problem here is when I try to restore a DB from a different system that only uses a single database file, it wants to bring the old file structure over with it. In the restore options, I can see the file structure it wants to use (1 database file), but I cannot change it.
Is there a way to restore the database into a new database without losing the file structure?
Thanks in advance.
Richard
Solution
If your current database is made up of one data file and one log file then that is how it will be restored.
What purpose does the network admin in doing this if the current database is one single data file already? Does network admin understand how file structure works in a database?
If you just wanted to split the tables and indexes between multiple files you would need to manually create each in their own file group, assigned to its own physical file. Then you could import the data into those tables. The other way is to do that same thing after you restore it.
Outside of that if you involve partitioning tables between files it becomes more cumbersome and involved.
What purpose does the network admin in doing this if the current database is one single data file already? Does network admin understand how file structure works in a database?
If you just wanted to split the tables and indexes between multiple files you would need to manually create each in their own file group, assigned to its own physical file. Then you could import the data into those tables. The other way is to do that same thing after you restore it.
Outside of that if you involve partitioning tables between files it becomes more cumbersome and involved.
Context
StackExchange Database Administrators Q#75943, answer score: 3
Revisions (0)
No revisions yet.