Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 reducing the size of the db

Author  Topic 

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-10 : 13:37:16
hi,

can you help me. i created the database with initial size 2gb.after that it show in my system low disk space in that drive.but i dont need that much of space for that database.can you tell me how i can reduce the size of the database which i have already created with out shrink.

Thanks,
Balakrishna.

good

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 12:44:02
You can use DBCC SHRINKFILE to shrink the size of the physical data file.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-11 : 13:22:20
tell me how i can reduce the size of the database which i have already created with out shrink
Shrink without shrink?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 13:58:57
Hi,
i tried that shirnking but it won't reflect to the size of the database
i got the solution for this issue.to reduce the initial size of the db we need to login with minimal congiguration and reduce the size what ever we want.

Thanks
Balakrishna.B

good
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 14:20:02
What does minimal configuration mean?

DBCC SHRINKFILE is how you shrink the files.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 14:33:21
hi,
i have already tried for shrinking of that db but it wont reduces the initial size of the db.sorry i made a mistake with that minimal configuration also we are unable to solve the issue just now i tried.
is there any chance to reduce the initial size of the dba witch i have already created.pls dont mistaken me because i don't no some thing about sqlserver just i started my carier with sqlserverdba

Thank
balakrishna.b

good
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 14:35:42
The only way to reduce it is to shrink it.

If it won't shrink, then perhaps the file is full. How full is it?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-11 : 14:44:24
make sure you're using SHRINKFILE and not SHRINKDB
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 14:50:16
hi,

shrinking na it will compress the data in that db but what i am asking is can we reduce the size of the db with out shrinking.already lot of space in that db.(it is in 2005 sqlserver)

thanks
balakrishna.b

good
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 14:51:41
You seem to be missing our point.

Run DBCC SHRINKFILE to shrink the size of the files. This has nothing to do with compression.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 15:13:57
hi,
in sqlserver2008 we will reduce the size of the db with out shrinking i got some information which i got one of my friend from Microsoft.may be i will try in 2008 sqlserver.he said to me that its a bug in sqlserver2005.if any information needed i will ask to you.thanks for your assistence.

thanks
balakrishna.b

here is the clear explanation

i have created a new database with 2gb memory in a drive.after that the disk shows 'low disk space'.
i.e no space in that drive.but space for that db is available up 1.9 gb.i thought that i need to reduce the size of the db.if i go for shrinking it show same space which i have created for the db.ok i will do the shrinking when the db is going beyond the limit or with the limit.but my question is that is there any way to reduce the size of the db with out going for srinking.if pls tell me the solution.please don't mind if i am geetting confued.but i need some clarification on that.

Thanks
Balakrishna.B

good
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 15:16:52
Your friend isn't very clear. What bug is he referring to in SQL Server 2005? I don't have any issues shrinking databases in SQL Server 2005.

You have to run DBCC SHRINKFILE to reduce the size of the files. There is no other way.

So why won't you run DBCC SHRINKFILE?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 15:22:02
hi,

but here no need to run dbcc shrink right.when we are going for shrink? if the db is growing beyond the limint we will run right. then how we will reduce the size of db?

Thanks
Balakrishna.B

good
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 15:23:25
If the database file is full, then you have to delete data if you want the file size to be reduced. There is no magic here.

If you want to use compression, then you'll need to upgrade to SQL Server 2008. It is not available in 2005.

So if your file 100% full?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-11 : 15:30:50
hi,
i dont have sqlserver2008 in my system tommorow i will check in my office and i will reply to that sorry if you get iritaion about my issue.it almost 2.00am here i need to go for sleep.i will catch you later bye tc

thanks
balakrishna.b

good
Go to Top of Page

balakrishnachow
Starting Member

24 Posts

Posted - 2010-10-12 : 09:02:44
hi tara,
can you give me any updates on this issue.

thanks
balakrishna

good
Go to Top of Page
   

- Advertisement -