Showing posts with label filegroup. Show all posts
Showing posts with label filegroup. Show all posts

Sunday, March 25, 2012

adding a filegroup

when you add a filegroup to a existing server on a half full harddrive
does it take longer to add if the file group size is very large likje
over 100 gigs
*** Sent via Developersdex http://www.codecomments.com ***Is the question does it take longer to load a 100 gig database on a 1/2 full
hard drive then an empty one?
I would think that it would take longer depending on the fragmentation of
your hard drive, your speed of your new drives, your bus speed, your RAID
controller, what type of cabling you are using to connect to your RAID, the
list goes on and on...
Please clarify...
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Bill" <nospam@.devdex.com> wrote in message
news:%23THF5$K7GHA.3492@.TK2MSFTNGP06.phx.gbl...
>
> when you add a filegroup to a existing server on a half full harddrive
> does it take longer to add if the file group size is very large likje
> over 100 gigs
> *** Sent via Developersdex http://www.codecomments.com ***|||Mr Bruk:
What I meant was, does it take longer to add a small file group vs a
very large file group, on a drive that already has data on it.
Is adding a file group to a dataset set to a fixed amount of time with
no connection to the size of the filegroup.
In other words does it take longer to add a 100 gig file group vs a 20
gig filegeroup?
Bill
*** Sent via Developersdex http://www.codecomments.com ***|||A filegroup doesn't by itself have any size. It is the database files that b
elongs to a file group
that has size. Yes, adding a larger file will take longer than a small file.
You can test this for
yourself. Create a database with a data file of size 20 MB vs 20GB and you w
ill see this. Note that
in 2005, you have "instant file initialization" but only for database files
(see
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for a few comments on
instant file
initialization and what permission is needed). So in 2005, try both with a l
arge data file and a
large log file to see the difference.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bill" <nospam@.devdex.com> wrote in message news:%23%23wrYsT7GHA.4552@.TK2MSFTNGP05.phx.gbl..
.
> Mr Bruk:
> What I meant was, does it take longer to add a small file group vs a
> very large file group, on a drive that already has data on it.
> Is adding a file group to a dataset set to a fixed amount of time with
> no connection to the size of the filegroup.
> In other words does it take longer to add a 100 gig file group vs a 20
> gig filegeroup?
>
> Bill
> *** Sent via Developersdex http://www.codecomments.com ***|||this question is straightforward the filegroup is being added due to the
other filegroups being full.
My question is does it take four times longer to add (blank as of yet)a
80gig filegroup vs a 20gig filegroup... At this time there is no data in
there, this is being done to add hd space for more room for additional
data..
Bill
*** Sent via Developersdex http://www.codecomments.com ***|||See my reply from earlier today. Again, a filegroup doesn't have a size, the
files does. Depending
on whether you get instant file initialization is a big factor. If you don't
get instant file
initialization, then you look at create time for a file which proportional t
o the file size (windows
has to zero out the newly allocated hard drive space).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bill" <nospam@.devdex.com> wrote in message news:O0zUTjW7GHA.3812@.TK2MSFTNGP02.phx.gbl...[vb
col=seagreen]
>
> this question is straightforward the filegroup is being added due to the
> other filegroups being full.
> My question is does it take four times longer to add (blank as of yet)a
> 80gig filegroup vs a 20gig filegroup... At this time there is no data in
> there, this is being done to add hd space for more room for additional
> data..
> Bill
> *** Sent via Developersdex http://www.codecomments.com ***[/vbcol]

adding a filegroup

when you add a filegroup to a existing server on a half full harddrive
does it take longer to add if the file group size is very large likje
over 100 gigs
*** Sent via Developersdex http://www.codecomments.com ***
Is the question does it take longer to load a 100 gig database on a 1/2 full
hard drive then an empty one?
I would think that it would take longer depending on the fragmentation of
your hard drive, your speed of your new drives, your bus speed, your RAID
controller, what type of cabling you are using to connect to your RAID, the
list goes on and on...
Please clarify...
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Bill" <nospam@.devdex.com> wrote in message
news:%23THF5$K7GHA.3492@.TK2MSFTNGP06.phx.gbl...
>
> when you add a filegroup to a existing server on a half full harddrive
> does it take longer to add if the file group size is very large likje
> over 100 gigs
> *** Sent via Developersdex http://www.codecomments.com ***
|||Mr Bruk:
What I meant was, does it take longer to add a small file group vs a
very large file group, on a drive that already has data on it.
Is adding a file group to a dataset set to a fixed amount of time with
no connection to the size of the filegroup.
In other words does it take longer to add a 100 gig file group vs a 20
gig filegeroup?
Bill
*** Sent via Developersdex http://www.codecomments.com ***
|||A filegroup doesn't by itself have any size. It is the database files that belongs to a file group
that has size. Yes, adding a larger file will take longer than a small file. You can test this for
yourself. Create a database with a data file of size 20 MB vs 20GB and you will see this. Note that
in 2005, you have "instant file initialization" but only for database files (see
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for a few comments on instant file
initialization and what permission is needed). So in 2005, try both with a large data file and a
large log file to see the difference.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bill" <nospam@.devdex.com> wrote in message news:%23%23wrYsT7GHA.4552@.TK2MSFTNGP05.phx.gbl...
> Mr Bruk:
> What I meant was, does it take longer to add a small file group vs a
> very large file group, on a drive that already has data on it.
> Is adding a file group to a dataset set to a fixed amount of time with
> no connection to the size of the filegroup.
> In other words does it take longer to add a 100 gig file group vs a 20
> gig filegeroup?
>
> Bill
> *** Sent via Developersdex http://www.codecomments.com ***
|||this question is straightforward the filegroup is being added due to the
other filegroups being full.
My question is does it take four times longer to add (blank as of yet)a
80gig filegroup vs a 20gig filegroup... At this time there is no data in
there, this is being done to add hd space for more room for additional
data..
Bill
*** Sent via Developersdex http://www.codecomments.com ***
|||See my reply from earlier today. Again, a filegroup doesn't have a size, the files does. Depending
on whether you get instant file initialization is a big factor. If you don't get instant file
initialization, then you look at create time for a file which proportional to the file size (windows
has to zero out the newly allocated hard drive space).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bill" <nospam@.devdex.com> wrote in message news:O0zUTjW7GHA.3812@.TK2MSFTNGP02.phx.gbl...
>
> this question is straightforward the filegroup is being added due to the
> other filegroups being full.
> My question is does it take four times longer to add (blank as of yet)a
> 80gig filegroup vs a 20gig filegroup... At this time there is no data in
> there, this is being done to add hd space for more room for additional
> data..
> Bill
> *** Sent via Developersdex http://www.codecomments.com ***

adding a filegroup

when you add a filegroup to a existing server on a half full harddrive
does it take longer to add if the file group size is very large likje
over 100 gigs
*** Sent via Developersdex http://www.developersdex.com ***Is the question does it take longer to load a 100 gig database on a 1/2 full
hard drive then an empty one?
I would think that it would take longer depending on the fragmentation of
your hard drive, your speed of your new drives, your bus speed, your RAID
controller, what type of cabling you are using to connect to your RAID, the
list goes on and on...
Please clarify...
--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Bill" <nospam@.devdex.com> wrote in message
news:%23THF5$K7GHA.3492@.TK2MSFTNGP06.phx.gbl...
>
> when you add a filegroup to a existing server on a half full harddrive
> does it take longer to add if the file group size is very large likje
> over 100 gigs
> *** Sent via Developersdex http://www.developersdex.com ***

Saturday, February 25, 2012

Add Foreign Key Constraint in filegroup

Hi,
I'd like to create a foreign key constraint and store it in a different
filegroup than "PRIMARY"
For this, I've created a new filegroup named "INDEX"
This is my script :
ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
CONSTRAINT [FK_T_FILE_IDFOL_T_FOLDER] FOREIGN KEY
(
[FIL_IDFOLDER]
) REFERENCES [dbo].[T_FOLDER] (
[FOL_IDFOLDER]
) ON DELETE CASCADE
ON [INDEX]
GO
And it doesn't work !
But what is very strange, is that I can create a primary key constraint
correctly on this filegroup :
ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
CONSTRAINT [PK_T_FILE] PRIMARY KEY CLUSTERED
(
[FIL_IDFILE]
) ON [INDEX]
GO
And this works !
It would be great if someone can telle me where my error is !
ThanxFilegroups are containers for storing data. Data are either data pages or in
dex pages. The reason
you can specify a filegroup when you define a primary key is that it automat
ically creates an index
for you,. so the file group you specify defines where that index will be sto
red. A foreign key
doesn't come with an index.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<jerome.avoustin@.gmail.com> wrote in message
news:1137404237.380973.84080@.g43g2000cwa.googlegroups.com...
> Hi,
> I'd like to create a foreign key constraint and store it in a different
> filegroup than "PRIMARY"
> For this, I've created a new filegroup named "INDEX"
> This is my script :
> ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
> CONSTRAINT [FK_T_FILE_IDFOL_T_FOLDER] FOREIGN KEY
> (
> [FIL_IDFOLDER]
> ) REFERENCES [dbo].[T_FOLDER] (
> [FOL_IDFOLDER]
> ) ON DELETE CASCADE
> ON [INDEX]
> GO
> And it doesn't work !
> But what is very strange, is that I can create a primary key constraint
> correctly on this filegroup :
> ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
> CONSTRAINT [PK_T_FILE] PRIMARY KEY CLUSTERED
> (
> [FIL_IDFILE]
> ) ON [INDEX]
> GO
> And this works !
> It would be great if someone can telle me where my error is !
> Thanx
>

ADD FILE __cannot be reused until after the next BACKUP LOG operation

Hi all,
I have a database containing a full text index, I am trying to add a file to
a filegroup but an exception occurred while execution.
the error:
File 'C:\FullTextCatalogs\CMS_sanayaFT_data.ndf' cannot be reused until
after the next BACKUP LOG operation.
File 'CMS_sanayaFT_data' cannot be reused until after the next BACKUP LOG
operation. (Microsoft SQL Server, Error: 1833)
Thanks in advanced
Backup the log and try to add the file.
relevantNoise - dedicated to mining blogs for business intelligence.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
news:%23LEiVZM3HHA.748@.TK2MSFTNGP04.phx.gbl...
> Hi all,
>
> I have a database containing a full text index, I am trying to add a file
> to a filegroup but an exception occurred while execution.
>
> the error:
>
> File 'C:\FullTextCatalogs\CMS_sanayaFT_data.ndf' cannot be reused until
> after the next BACKUP LOG operation.
> File 'CMS_sanayaFT_data' cannot be reused until after the next BACKUP LOG
> operation. (Microsoft SQL Server, Error: 1833)
>
> Thanks in advanced
>
|||thanks Hilary, the issue solved by taking a full backup then taking a log
back up.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23ziAf8h3HHA.5984@.TK2MSFTNGP04.phx.gbl...
> Backup the log and try to add the file.
> --
> relevantNoise - dedicated to mining blogs for business intelligence.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
> news:%23LEiVZM3HHA.748@.TK2MSFTNGP04.phx.gbl...
>

Friday, February 24, 2012

Add data file to filegroup

I tried to add new file to new filegroup:
Created a new database in ER, successful.
Then, right click this new database, select propertied.
Goto Data Files tab, add a new data file at the second row and select a new
Location. Set Space Allocated, BUT I cannot set Filegroup to Table, it has
the only option PRIMARY.
Alan
Here's a way I am doing
CREATE DATABASE test
GO
ALTER DATABASE test SET RECOVERY FULL
ALTER DATABASE test
ADD FILEGROUP ww_Group
GO
ALTER DATABASE test
ADD FILE
( NAME = ww,
FILENAME = 'D:\wwdat1.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGROUP ww_Group
create table test..test(id int identity) on [primary]
create table test..test_GR(id int identity) on ww_Group
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:uM8cNRqqEHA.3252@.TK2MSFTNGP14.phx.gbl...
> I tried to add new file to new filegroup:
> Created a new database in ER, successful.
> Then, right click this new database, select propertied.
> Goto Data Files tab, add a new data file at the second row and select a
new
> Location. Set Space Allocated, BUT I cannot set Filegroup to Table, it has
> the only option PRIMARY.
>

Add data file to filegroup

I tried to add new file to new filegroup:
Created a new database in ER, successful.
Then, right click this new database, select propertied.
Goto Data Files tab, add a new data file at the second row and select a new
Location. Set Space Allocated, BUT I cannot set Filegroup to Table, it has
the only option PRIMARY.Alan
Here's a way I am doing
CREATE DATABASE test
GO
ALTER DATABASE test SET RECOVERY FULL
ALTER DATABASE test
ADD FILEGROUP ww_Group
GO
ALTER DATABASE test
ADD FILE
( NAME = ww,
FILENAME = 'D:\wwdat1.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGROUP ww_Group
create table test..test(id int identity) on [primary]
create table test..test_GR(id int identity) on ww_Group
"Alan" <NOSPAMalan_pltse@.yahoo.com.au> wrote in message
news:uM8cNRqqEHA.3252@.TK2MSFTNGP14.phx.gbl...
> I tried to add new file to new filegroup:
> Created a new database in ER, successful.
> Then, right click this new database, select propertied.
> Goto Data Files tab, add a new data file at the second row and select a
new
> Location. Set Space Allocated, BUT I cannot set Filegroup to Table, it has
> the only option PRIMARY.
>