Move SQL Database to new Drive

LibertyMountain
Member Posts: 94
What is the best way to do this? I have just installed a RAID 10 (8x136GB). It is Logical drive (E:\) is 546GB.
Currently Database is on Logical Drive
\.
Servername is PROD. DB name is PROD. I want all this to stay the same so that any DSNs I have developed on other machines don't need to be adjusted.
Thanks for your assistance.
Currently Database is on Logical Drive

Servername is PROD. DB name is PROD. I want all this to stay the same so that any DSNs I have developed on other machines don't need to be adjusted.
Thanks for your assistance.
0
Comments
-
Hi,
I used to following steps:
1. Log out all users (the best way is to switch database to single user mode)
2. Create database backup
3. Restore database - set appropriate drive and folders during restore.
4. Check restored database
5. Switch database to multiuser mode
6. Perform needed application tests
I don't know what needs your other applications, but all things based on database communication remains the same.0 -
LibertyMountain wrote:What is the best way to do this? I have just installed a RAID 10 (8x136GB). It is Logical drive (E:\) is 546GB.
Currently Database is on Logical Drive\.
Servername is PROD. DB name is PROD. I want all this to stay the same so that any DSNs I have developed on other machines don't need to be adjusted.
Thanks for your assistance.0 -
Ayhan06: And this is all done within MS SQL? (Just get everyone out of NAV, detach, move, re-attach, start NAV clients again.) there are replicated services also that I don't want to recreate. thanks.0
-
1) Add new DB file on the new disk
2) use "DBCC SHRINKFILE ( { file_name} , EMPTYFILE) on the old file to make it empty (data will be moved to the new file automatically, the file will be locked for new data). Take care of Transaction log, it can grow...
3) use ALTER DATABASE to remove the old file, which is now empty and can be removed...
FOr more info, see http://msdn.microsoft.com/en-us/library/ms189493.aspx example "D. Emptying a file"0 -
ayhan06 wrote:detach db. move db files to new drive. attach db.
[Topic moved from 'NAV/Navision' forum to 'SQL General' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kriki wrote:ayhan06 wrote:detach db. move db files to new drive. attach db.
[Topic moved from 'NAV/Navision' forum to 'SQL General' forum]
But not when you are replicating something etc. because it means "removing" and "creating" the db again an it means that you will loose the connections etc. Way I described can be done on-line and doesn't mean any lost functionality. It means that both ways are possible, it depends on requirements... 8)0 -
kine wrote:kriki wrote:ayhan06 wrote:detach db. move db files to new drive. attach db.
[Topic moved from 'NAV/Navision' forum to 'SQL General' forum]
But not when you are replicating something etc. because it means "removing" and "creating" the db again an it means that you will loose the connections etc. Way I described can be done on-line and doesn't mean any lost functionality. It means that both ways are possible, it depends on requirements... 8)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions