How to move Enterprise Vault SQL databases to another drive on the same SQL Server
| Article:TECH129395 | | | Created: 2010-01-28 | | | Updated: 2010-01-20 | | | Article URL http://www.symantec.com/docs/TECH129395 |
Problem
How to move Enterprise Vault SQL databases to another drive on the same SQL Server
Solution
Overview:
Issues can occur that require moving a database from the drive that currently hosts its files to a larger drive in order to maintain database growth capabilities, or to improve database access due to disk operations efficiencies.
Solution:
1) Make a current backup of all databases, especially the master database, from their current location
2) Run this query to detach the database
use master
go
sp_detach_db 'EVVSGVaultStore1_1_1' ----> This database name should be replaced for the database name that you want to move.
go
3) Next, copy the data files and the log files from the current location (i.e., 'C:\Mssql\Data') to the new location (i.e., 'E:\Sql db').
4) Attach the new database running this query
use master
go
sp_attach_db 'EVVSGVaultStore1_1_1','E:\SQL Db\EVVSGVaultStore1_1_1.mdf','E:\SQL Db\EVVSGVaultStore1_1_1LOG.ldf' ----> Change the database name and the path for the new location for the data and logs files.
go
5) To move file groups for the fingerprint database only you should run follow the next steps.
USE master
GO
ALTER DATABASE EVVSGVaultStore1_1_1 ----> This database name should be replaced for the database name that you want to move
MODIFY FILE
(
NAME = EVVSGVaultStore1_1_1_data_000, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_000.ndf'
);
(
NAME = EVVSGVaultStore1_1_1_data_001, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_001.ndf'
);
(
NAME = EVVSGVaultStore1_1_1_data_002, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_002.ndf'
)
GO
6) Move the ndf files to the new location
7) Bring the database offline and then online.
Article:
How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server
http://support.microsoft.com/kb/224071
ALTER DATABASE File and Filegroup Options (Transact-SQL)
Issues can occur that require moving a database from the drive that currently hosts its files to a larger drive in order to maintain database growth capabilities, or to improve database access due to disk operations efficiencies.
Solution:
1) Make a current backup of all databases, especially the master database, from their current location
2) Run this query to detach the database
use master
go
sp_detach_db 'EVVSGVaultStore1_1_1' ----> This database name should be replaced for the database name that you want to move.
go
3) Next, copy the data files and the log files from the current location (i.e., 'C:\Mssql\Data') to the new location (i.e., 'E:\Sql db').
4) Attach the new database running this query
use master
go
sp_attach_db 'EVVSGVaultStore1_1_1','E:\SQL Db\EVVSGVaultStore1_1_1.mdf','E:\SQL Db\EVVSGVaultStore1_1_1LOG.ldf' ----> Change the database name and the path for the new location for the data and logs files.
go
5) To move file groups for the fingerprint database only you should run follow the next steps.
USE master
GO
ALTER DATABASE EVVSGVaultStore1_1_1 ----> This database name should be replaced for the database name that you want to move
MODIFY FILE
(
NAME = EVVSGVaultStore1_1_1_data_000, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_000.ndf'
);
(
NAME = EVVSGVaultStore1_1_1_data_001, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_001.ndf'
);
(
NAME = EVVSGVaultStore1_1_1_data_002, ----> This should be replaced with name of the file until 31 that is the default files created
FILENAME = N'E:\SQL Db\EVVSGVaultStore1_1_1_data_002.ndf'
)
GO
6) Move the ndf files to the new location
7) Bring the database offline and then online.
Article:
How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server
http://support.microsoft.com/kb/224071
ALTER DATABASE File and Filegroup Options (Transact-SQL)
http://msdn.microsoft.com/en-us/library/bb522469.aspx
|
|
Related Articles
Legacy ID
351649
Article URL http://www.symantec.com/docs/TECH129395
Terms of use for this information are found in Legal Notices









Thank you.