Monday, February 20, 2012

Reduce Data file Size

Hi,
Currently our data file size is near to 9GB. I need to reduce the data file
size.
Which one is the better way.
When i try to Shrink the Data file or Database its running for more than 1
hour so i stopped.
Please give me a solution as soon as Possible.
Thanks,
Herbertyou can reduce the size of the data file in small decrements
if there are un-used extents in the database
dbcc shrinkfile(logicalfile_name,targetsize,T
RUNCATEONLY)
pls check BOL for full details
--
HTH
Olu Adedeji
Deutsche Bank
"Herbert" wrote:

> Hi,
> Currently our data file size is near to 9GB. I need to reduce the data fil
e
> size.
> Which one is the better way.
> When i try to Shrink the Data file or Database its running for more than 1
> hour so i stopped.
> Please give me a solution as soon as Possible.
> Thanks,
> Herbert|||Take a look before doing it.
Why you want to be restrictive with shrink of database files
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
AMB
"Herbert" wrote:

> Hi,
> Currently our data file size is near to 9GB. I need to reduce the data fil
e
> size.
> Which one is the better way.
> When i try to Shrink the Data file or Database its running for more than 1
> hour so i stopped.
> Please give me a solution as soon as Possible.
> Thanks,
> Herbert|||Hi,
You can shrink the data (MDF) file only if you have free space. Execute the
below command to see the unallocated space.
sp_spaceused
If you have enough space left then use the suggestions mentioned by
Alejandro.
Thanks
Hari
SQL Server MVP
"Herbert" <Herbert@.discussions.microsoft.com> wrote in message
news:3D3C2310-7EAD-495C-A3EC-60F83319AD47@.microsoft.com...
> Hi,
> Currently our data file size is near to 9GB. I need to reduce the data
> file
> size.
> Which one is the better way.
> When i try to Shrink the Data file or Database its running for more than 1
> hour so i stopped.
> Please give me a solution as soon as Possible.
> Thanks,
> Herbert|||Thanks all for ur valid informations
Thanks,
Herbert
"Hari Prasad" wrote:

> Hi,
> You can shrink the data (MDF) file only if you have free space. Execute th
e
> below command to see the unallocated space.
> sp_spaceused
> If you have enough space left then use the suggestions mentioned by
> Alejandro.
> Thanks
> Hari
> SQL Server MVP
>
> "Herbert" <Herbert@.discussions.microsoft.com> wrote in message
> news:3D3C2310-7EAD-495C-A3EC-60F83319AD47@.microsoft.com...
>
>

No comments:

Post a Comment