Before some days my c: drive becomes full so I decided to move the all SharePoint content database files from c: drive to D: drive , how to do that?
Let us see step by step procedure
- Run DBCC CHECKDB command first to check there are no consistency errors on the content database or not.
- For safer side take the backup of content database before you start the moving process. You can take the backup of any SQL Database by following this method.
- Go to ->Microsoft SQL Server Management studio -> Databases->Content Database->Task->Backup
- Right click SharePoint database name, select Tasks -> Detach. Check Drop connection if there are active connections.
- Using Windows Explorer, copy the existing Primary Data File, Secondary Data File, and Transaction Log from location on C(old) drive and Paste these files into new folder on D(new) drive
- Run following command in query windows.
- use masterEXEC sp_attach_db @dbname = N'WSS_Content_DatabaseName',@filename1 = N'D:\MSSQL\Data\WSS_Content_DatabaseName.mdf',@filename2 = N'D:\MSSQL\Data\WSS_Content_DatabaseName.ldf'
- Run DBCC CHECKDB command again to check there are no consistency errors on the content database after moving. Query message should show 0 allocation errors and 0 consistency errors.
- Make sure that SharePoint application is running properly after content database move.
- Done.
Disha Shah
No comments:
Post a Comment