Files and filegroups sql server 2005

Posted by Dhivagar on Stack Overflow See other posts from Stack Overflow or by Dhivagar
Published on 2010-06-16T13:24:51Z Indexed on 2010/06/16 14:02 UTC
Read the original article Hit count: 263

Filed under:
|

Can we move default file to another filegroup. sample code is given below

Sample code

create database EMPLOYEE
ON PRIMARY
(
NAME = 'PRIMARY_01',
FILENAME = 'C:\METADATA\PRIM01.MDF',
SIZE = 5 MB ,
MAXSIZE =50 MB,
FILEGROWTH = 2 MB),
(
NAME = 'SECONDARY_02',
FILENAME = 'C:\METADATA\SEC02.NDF'
),

FILEGROUP EMPLOYEE_dETAILS
(
NAME = 'EMPDETILS_01',
FILENAME = 'C:\METADATA\EMPDET01.NDF',
SIZE = 5 MB ,
MAXSIZE =50 MB,
FILEGROWTH = 2 MB),
(
NAME = 'EMPDETILS_02',
FILENAME = 'C:\METADATA\EMPDET02.NDF',
SIZE = 5 MB ,
MAXSIZE =50 MB,
FILEGROWTH = 2 MB)

LOG ON
(
NAME = 'TRANSACLOG',
FILENAME ='c:\METADATA\TRAS01.LDF',
SIZE = 5 MB ,
MAXSIZE =50 MB,
FILEGROWTH = 2 MB
)
now i want to move the
FILENAME = 'C:\METADATA\SEC02.NDF' from deault primary file to the
FILEGROUP EMPLOYEE_dETAILS ?

need assist ??

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server-2005