February 27, 2014 at 10:24 am
Any suggestions ???
February 27, 2014 at 12:28 pm
Are you saying you can add data to the partitions that are marked as read-only in the filegroups? It's possible there is a bug here wtih the partitions that doesn't respect the filegroup status.
However a trigger that rejects inserts into those ranges might help.
February 27, 2014 at 1:20 pm
Steve Jones - SSC Editor (2/27/2014)
Are you saying you can add data to the partitions that are marked as read-only in the filegroups? It's possible there is a bug here wtih the partitions that doesn't respect the filegroup status.However a trigger that rejects inserts into those ranges might help.
YES. I can insert data into read only files. Can you provide more information or any kb article details? Also I am not familiar on how to create triggers on ranges. Thanks...
February 27, 2014 at 1:42 pm
muthyala_51 (1/22/2014)
current size of the database is 2.36 TB. Monthly around 100 GB of data will be added to this partitioned table. We can increase the drive size by adding more space. But I am looking for options to reduce the data size by file compression or data compression.
My recommendation would be to make one of the file groups Read-Write, run REORGANIZE on all indexes, and then see how much free space (not data, not index) there is.
Also, when you set the individual file groups to Read-Only, are you seting the "SINGLE_USER" mode of the database?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2014 at 2:00 pm
i am not making the database into single user mode. I just leave the latest partition to read write and change the rest of the filegroups to read only. As paritions are based on date column, all new rows will be inserted into the latest file group.
February 27, 2014 at 3:47 pm
muthyala_51 (2/27/2014)
i am not making the database into single user mode. I just leave the latest partition to read write and change the rest of the filegroups to read only. As paritions are based on date column, all new rows will be inserted into the latest file group.
That part of what I'm talking about. Last I heard, you had to set a database to "Single User" in order to be able to set a related file group to Read Only unless, of course, you're the only one in the database to begin with. Yeah... you can change it back Multi-User but I was just wondering how you set file groups to read only only without going through a pass through "SINGLE_USER".
Shifting gears back to your partitioning problem... it sounds like your table is actually a type of audit table table because you're setting partitions to Read Only based on a date. Is the date column, by any chance, a part of your PK?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2014 at 4:15 pm
You don't write a trigger based on a range or partition. You write it based on the table.
If the read only groups are 3 months old, then your trigger just has something like
if datePKcolumn < dateadd( mm, -3, getdate()) then
rollback
February 27, 2014 at 5:49 pm
Jeff Moden (2/27/2014)
muthyala_51 (2/27/2014)
i am not making the database into single user mode. I just leave the latest partition to read write and change the rest of the filegroups to read only. As paritions are based on date column, all new rows will be inserted into the latest file group.That part of what I'm talking about. Last I heard, you had to set a database to "Single User" in order to be able to set a related file group to Read Only unless, of course, you're the only one in the database to begin with. Yeah... you can change it back Multi-User but I was just wondering how you set file groups to read only only without going through a pass through "SINGLE_USER".
Shifting gears back to your partitioning problem... it sounds like your table is actually a type of audit table table because you're setting partitions to Read Only based on a date. Is the date column, by any chance, a part of your PK?
Yes, that's kind of an audit table with datetime part of PK. I was only the one who was accessing the database at the time of converting filegroups to read only mode, so it was easy for me to convert them without any errors.
Viewing 8 posts - 16 through 22 (of 22 total)
You must be logged in to reply to this topic. Login to reply