473,320 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

shrinking a table of database

Hi,

Can I shrink a table in a database?
If yes then how?

Thanks in advance.
Shubhangi
Jan 19 '07 #1
1 1072
iburyak
1,017 Expert 512MB
1. Create clustered index over one of columns. You can drop it after it shouldn't be unique just make sure it is clustered. This index will move all records together and release unused space to a database. Unfortunately you need some space available in a database to do this.

2. Use DBCC INDEXDEFRAG on existing indexes. I would recommend that your DBA do it if you have one.
Jan 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Mosey | last post by:
A huge (and never used) database log was taking up about 4 GB of HD space. We want the data for historical capacity, however, don't care about the transactions log. After a bit of research I ran...
2
by: Jaeger | last post by:
Hi all. I'm having trouble shrinking a database. In short, using the SQL Query Analyzer, I enter the following commands: DBCC SHRINKDATABASE (database, 80) GO The command returns the...
1
by: willie | last post by:
Hi all: I restored one backup database (7.9 GB mdf) on two diffrent servers. I shrunk them by clicking "Move pages to beginning of file before shrinking". After shrinking, one mdf file is 6.7...
6
by: Jens | last post by:
I have a database file LEAR_Index(yes, it hold index data) from a have have recently removed a bunch of data. It is about 120 Gb, 100Gb of which is not used. I wan´t to shrink the file to lean...
1
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by...
3
by: Bopolissimus Platypus Jr | last post by:
hello all, i've got a database that takes up 4G of space. when i run a script that deletes all rows and then vacuum, the data directory gets down to around 3-3.5G. what i'd like is to get a...
2
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients...
7
khickyphutz
by: khickyphutz | last post by:
Good day! I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database...
0
by: kazper | last post by:
Good day, I have some problems regarding my Hard disk space for my logs in SQL Server 2005. When I try shrinking the database it returns an error not letting me to do anything about the size of...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.