This is a multi-part message in MIME format.
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new database, but the .ndf filegroup = of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as Test2
DB 2 =3D TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under = filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just = delete the .NDF & recreate it in EM with the correct filegroup name, but = it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my restore? Is there T-Sql in the = restore that designates the .ndf filegroup name & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new = database, but the .ndf filegroup of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as = Test2
DB 2 =3D TestDB2.mdf = TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, = emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct = filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my = restore? Is there T-Sql in the restore that designates the .ndf filegroup name = & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960--Jude,
1 - You can change the name of the physical files during restore operation
using "with move" option.
2 - You can change the logical name of the files, using the statement "alter
database".
alter database northwind
modify file (name = 'northwind', newname = 'northwind1')
exec sp_helpdb northwind
go
See BOL for more info.
AMB
"Jude" wrote:
> How can I change the FILEGROUP on database properties?
> SQL Server 2000
> I restored one database to create a new database, but the .ndf filegroup of the restored db has the name of the restored db.
> For example;
> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
> Backup this db & restore as Test2
> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
> Where am I going wrong?
> Also, am I missing something in my restore? Is there T-Sql in the restore that designates the .ndf filegroup name & I am missing it?
> Any instruction/suggestions will be appreciated!!!
> thanx!
>|||"With Move", I'll look it up in BOL.
thanx!
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:509ED16F-2201-4D31-835E-B5EAE48C53B0@.microsoft.com...
> Jude,
> 1 - You can change the name of the physical files during restore operation
> using "with move" option.
> 2 - You can change the logical name of the files, using the statement
> "alter
> database".
> alter database northwind
> modify file (name = 'northwind', newname = 'northwind1')
> exec sp_helpdb northwind
> go
> See BOL for more info.
>
> AMB
> "Jude" wrote:
>> How can I change the FILEGROUP on database properties?
>> SQL Server 2000
>> I restored one database to create a new database, but the .ndf filegroup
>> of the restored db has the name of the restored db.
>> For example;
>> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
>> Backup this db & restore as Test2
>> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup
>> it has "TestINDX1"
>> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just
>> delete the .NDF & recreate it in EM with the correct filegroup name, but
>> it keeps telling me I can't drop the .ndf because it is NOT empty.
>> Where am I going wrong?
>> Also, am I missing something in my restore? Is there T-Sql in the
>> restore that designates the .ndf filegroup name & I am missing it?
>> Any instruction/suggestions will be appreciated!!!
>> thanx!
>>
Showing posts with label content-type. Show all posts
Showing posts with label content-type. Show all posts
Friday, March 9, 2012
Filegroup & .NDF Question
Labels:
_nextpart_000_0008_01c68efb,
3ff73960,
charset,
content-type,
database,
filegroup,
format,
iso-8859-1,
message,
microsoft,
mime,
multi-part,
mysql,
ndf,
oracle,
plain,
server,
sql,
text
Subscribe to:
Posts (Atom)