December 20, 2010 at 6:41 am
Hi,
I have my sqlsqlver2k5 installed in C: which consists 25 GB (12 GB free memory). while i try to restore a Database its show not enough memory as its it need 24 GB free space... i have F: 300 GB free space...
Now is it possible to store the data file(i dont know exact term) in F: having sql server installed path in C:... i want to achieve it without uninstalling SQL server2k5?
Can u pls help me out?
December 20, 2010 at 6:56 am
You can RESTORE the database WITH MOVE. With this you can move the data and log files to a new location. More details here
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
December 20, 2010 at 6:59 am
My db happens to have 3 files, you'll most likely only have 2.
RESTORE DATABASE [PROD-FORDIA_demo]
FROM DISK = N'Z:\PROD-FORDIA-FULL 2010-12-20 05H00.bak'
WITH FILE = 1, MOVE N'PROD-FORDIA_Data' TO N'Z:\NAVISION\PROD-FORDIA_demo.mdf',
MOVE N'PROD-FORDIA_1_Data' TO N'Z:\NAVISION\PROD-FORDIA_demo_1.ndf',
MOVE N'PROD-FORDIA_Log' TO N'Z:\NAVISION\PROD-FORDIA_demo_2.ldf', NOUNLOAD, STATS = 10
GO
December 20, 2010 at 7:38 am
Thanks a lot..............
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply