Showing posts with label approximately. Show all posts
Showing posts with label approximately. Show all posts

Tuesday, March 20, 2012

Rebuild Index grew database .mdf files

Hello,

Overnight, I had a Rebuild Index job run and it grew the size of the database.mdf file approximately 4 times. 300MB to 1.2GB. It also changed the initial size of the database to 1.2GB. Is there any way to recover this space or to shrink the database?

I tried to shrink it with DBCC SHRINKDATABASE to no avail (only recovered 40MB).

Do I have any options to reclaim the space?

Any ideas?

Thanks.It turns out that the cause of the increase in size of database files was due to the fact that I had the Rebuild Index job set with a fill factor of 10%. I tested a bit and found that if I set it to reorganize pages with the default amount of free space that it didn't triple/quadruple/etc the size of the files.

Case Closed!

Rebooting SAN with SQL Data Files

Please help.
We are rebooting our SAN tonight and it has a lot of our Data and Log files
on it, including the master and msdb data files. Approximately 35 of our SQL
Servers are storing files on this SAN. Will SQL Server gracefully recover
from the reboot or will I need to stop the services prior to the reboot or is
there anything else I need to do? Thank you in advance for any help.
James
Are you asking if you can reboot the SAN while SQL Server is still running?
If so then I would not recommend that at all. You are likely to come up
with 35 db's in suspect mode. You should stop all the services to ensure no
one is writing to the data or log files when you reboot.
Andrew J. Kelly SQL MVP
"Hex Caliber" <hex@.caliber.com> wrote in message
news:C5EAC564-2231-46D2-BC59-B49627A757B6@.microsoft.com...
> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log
> files
> on it, including the master and msdb data files. Approximately 35 of our
> SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or
> is
> there anything else I need to do? Thank you in advance for any help.
> James
|||If at all possible I would recommend to shutdown any and all hosts
connected to your SAN before rebooting it. What kind of SAN is it? Do
you have multiple storage processors? Are you completely rebooting the
disk enclosures as well as the storage processors? You could consider
trespassing LUNs over and rebooting the storage processors in series
rather than all at once.
While I don't have any direct experience with yanking the drives out
from under SQL, I can't imagine it would be very good to do. You will
probably be facing data corruption lost transactions and serious data
inconsistency.
tM
Hex Caliber wrote:

> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log files
> on it, including the master and msdb data files. Approximately 35 of our SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or is
> there anything else I need to do? Thank you in advance for any help.
> James
|||Thank you, both of you. I'm not sure of the answers to TM's questions, but
it sounds like our plan will be to shut down the SQL Servers and then go
ahead with the SAN fix. Thanks again.
"Hex Caliber" wrote:

> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log files
> on it, including the master and msdb data files. Approximately 35 of our SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or is
> there anything else I need to do? Thank you in advance for any help.
> James
|||If I were you, shut the servers down, not just SQL Server.
The OS will not like it, and some NT Admins tend to put pagefiles on the
nice big SAN drives, resulting in your boxes blue screening when the drives
drop out from under the OS.
Rather safe than sorry....
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Hex Caliber" <hex@.caliber.com> wrote in message
news:21B570FA-8773-4994-9A81-465243F59286@.microsoft.com...
> Thank you, both of you. I'm not sure of the answers to TM's questions,
but[vbcol=seagreen]
> it sounds like our plan will be to shut down the SQL Servers and then go
> ahead with the SAN fix. Thanks again.
> "Hex Caliber" wrote:
files[vbcol=seagreen]
our SQL[vbcol=seagreen]
recover[vbcol=seagreen]
or is[vbcol=seagreen]

Rebooting SAN with SQL Data Files

Please help.
We are rebooting our SAN tonight and it has a lot of our Data and Log files
on it, including the master and msdb data files. Approximately 35 of our SQ
L
Servers are storing files on this SAN. Will SQL Server gracefully recover
from the reboot or will I need to stop the services prior to the reboot or i
s
there anything else I need to do? Thank you in advance for any help.
JamesAre you asking if you can reboot the SAN while SQL Server is still running?
If so then I would not recommend that at all. You are likely to come up
with 35 db's in suspect mode. You should stop all the services to ensure no
one is writing to the data or log files when you reboot.
Andrew J. Kelly SQL MVP
"Hex Caliber" <hex@.caliber.com> wrote in message
news:C5EAC564-2231-46D2-BC59-B49627A757B6@.microsoft.com...
> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log
> files
> on it, including the master and msdb data files. Approximately 35 of our
> SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or
> is
> there anything else I need to do? Thank you in advance for any help.
> James|||If at all possible I would recommend to shutdown any and all hosts
connected to your SAN before rebooting it. What kind of SAN is it? Do
you have multiple storage processors? Are you completely rebooting the
disk enclosures as well as the storage processors? You could consider
trespassing LUNs over and rebooting the storage processors in series
rather than all at once.
While I don't have any direct experience with yanking the drives out
from under SQL, I can't imagine it would be very good to do. You will
probably be facing data corruption lost transactions and serious data
inconsistency.
tM
Hex Caliber wrote:

> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log file
s
> on it, including the master and msdb data files. Approximately 35 of our
SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or
is
> there anything else I need to do? Thank you in advance for any help.
> James|||Thank you, both of you. I'm not sure of the answers to TM's questions, but
it sounds like our plan will be to shut down the SQL Servers and then go
ahead with the SAN fix. Thanks again.
"Hex Caliber" wrote:

> Please help.
> We are rebooting our SAN tonight and it has a lot of our Data and Log file
s
> on it, including the master and msdb data files. Approximately 35 of our
SQL
> Servers are storing files on this SAN. Will SQL Server gracefully recover
> from the reboot or will I need to stop the services prior to the reboot or
is
> there anything else I need to do? Thank you in advance for any help.
> James|||If I were you, shut the servers down, not just SQL Server.
The OS will not like it, and some NT Admins tend to put pagefiles on the
nice big SAN drives, resulting in your boxes blue screening when the drives
drop out from under the OS.
Rather safe than sorry....
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Hex Caliber" <hex@.caliber.com> wrote in message
news:21B570FA-8773-4994-9A81-465243F59286@.microsoft.com...
> Thank you, both of you. I'm not sure of the answers to TM's questions,
but[vbcol=seagreen]
> it sounds like our plan will be to shut down the SQL Servers and then go
> ahead with the SAN fix. Thanks again.
> "Hex Caliber" wrote:
>
files[vbcol=seagreen]
our SQL[vbcol=seagreen]
recover[vbcol=seagreen]
or is[vbcol=seagreen]