Pretty much the worst thing you could do to a SQL Server database. In short: It sacrifices performance to gain space.

learn more… | top users | synonyms (1)

1
vote
2answers
1k views

Shrink a SQL Anywhere 12 database

Is there any way to shrink SQL Anywhere databases? With SQL Server, it was an easy task. Just do it, have a faster database again that has a size which can be transferred over a slow internet ...
3
votes
3answers
98 views

Need assistance shrinking MDF File

Verbose logging was accidentally left on for one of our database ballooning our database MDF file from roughly 90GB to 192GB. We've disabled verbose logging, truncated the logging table but now we ...
6
votes
1answer
14k views

Shrink Transaction Log While Using AlwaysOn Availability Group

We are using AlwaysOn Availability Group feature of SQL Server 2012. Regular full database backups and transaction log backups are done every day on the secondary database. I have read here doing the ...
4
votes
2answers
8k views

Set simple recovery mode and shrink log files for all user created databases

I hope you can point me in the right direction. I'm not a frequent user of T-SQL, but I did some googleing, and found the script below. I corrected the script a bit. I want the script to: To select ...
5
votes
3answers
234 views

Shrinking database which is not having any insert/update

We have a process of archiving wherein we take the backup of current database and restore it as xxx archive database. Now this database contains previous data and will not have any ...
0
votes
2answers
87 views

Reduce MDF file size [duplicate]

I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data. I tried re indexing, it's good the database has ...
1
vote
1answer
51 views

Optimising file shrink and index reorganization operations

I'm archiving my SQL tables. So I am shrinking my files (because I need the free space) and re-organising my indexes(to defragment them). I know shrinking a file causes the indexes to be fragmented. ...
1
vote
2answers
468 views

Switching to Simple Recovery - shrinking transaction logs

Standard disclaimer: I am an "involuntary DBA" (a nice phrase I saw in this article) and have done lots and lots and lots and lots and lots of reading on this subject, but am still ...
0
votes
1answer
22 views

Shrinking Database Task [duplicate]

I am new to the DBA Part. I had an 110 GB Database from which I deleted records from a 95GB sized table. Since the SQL Server Stores memory for the future, it still had 110 GB on the disc. I ran the ...
0
votes
1answer
58 views

SQL Server Shrink

When running the Maintenance Plan Wizard to shrink a DB ... I am selecting all databases, however I have it set to shrink only when it grows beyond a specific size. If a database grows beyond a ...
3
votes
3answers
6k views

Shrink the database only up to its initial size which is set after creating database

In SQL server every database has a property Initial Size (MB) which can be seen in properties of database in SSMS. By default it will be 3 MB for mdf and 1 MB for ldf file. So now if create a new ...
2
votes
2answers
146 views

SQL Server history of growth and shrink events

Is there a way to look at the complete history of growth and shrink events for the last weeks/months on SQL Server 2014 ? (New instances to support, noticed from the ticketing system that they have ...
1
vote
1answer
42 views

Copy database to a remote server on daily basis

I need to replace the copy of my PROD db in a DEV system on a daily basis. The problem is that I haven't enough space in my DEV system to restore the PROD db. Is there any way to create a shrinked ...
0
votes
0answers
28 views

How to shrink the .ldf(log) file of the particular live production database? [duplicate]

I would like to say that as one of my production database (.ldf) log file is growing larger than databse size. The size of database file (.mdf) and their log file (.ldf) is as follows:- 1)database ...
2
votes
2answers
325 views

Should I shrink this SQL Server data file?

I have read many articles describing how shrinking data files causes terrible things to happen floods, famine, fragmentation, and general mayhem. Here is the cliff notes of my situation: SSAS ...
1
vote
1answer
41 views

Delete query does not appear to open space on the SQL Server

Our SQL Server (version 2012) is housed on a cloud server, for which we pay whenever we need additional space. We determined that we could delete some of the data to prevent the need for continually ...
0
votes
1answer
34 views

One time database shrink catch-22 solution?

I am developing a plan for SQL Server 2012 EE to properly downsize and type (nchar to char types) some needlessly Unicode nvarchar(max) fields and would like to optimize the database size as part of ...
27
votes
5answers
32k views

When is it OK to shrink a Database?

I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming. The list goes on... That being said, say I have a 100 GB database and I ...
12
votes
4answers
842 views

Claiming disk space after removing table field

I am running sql 2008 r2 and the db was working fine and fast for last 3 years untill about 3 months ago we added ntext field on very active and used table. Now we are starting to get out of server ...
0
votes
0answers
91 views

Transactional Replication issue due to big Transaction Log in sql server 2008 r2

I want an answer of question and that would be highly appreciated Scenario: First of all i am an IT guy from Sports Field and using SQL Server 2008R2. I have 2 production servers server 1 and Server ...
3
votes
3answers
459 views

Shrink database after removing extra data [duplicate]

We have a need to fit a database in 4GB in order to use SQL Server Express Edition. I started from a 7GB database, and found a lot of unneeded records, and deleted them. After shrinking, the database ...
0
votes
1answer
31 views

Using SHRINKDATABASE to shrink a Database by a certain amount

I have a database which the users are going to do some data cleansing on. They should do this every 6 months but have left it for 18 months. After they have cleansed the data I want to shrink the ...
0
votes
3answers
1k views

Reclaiming space from a large partitioned database

We have a database where one of the business group decided to remove several millions of rows as part of their upgrade process. (we removed for them..).. This database is partitioned based on a date ...
7
votes
3answers
4k views

Will the transaction log shrink automagically in SQL Server?

When SQL Server database in a SIMPLE mode, you don't have to care about the transaction log bakcups. But in a SIMPLE mode, the transaction log seems to grow as it does in FULL mode. Does is truncate ...
7
votes
5answers
23k views

SQL Server Database Not Shrinking [duplicate]

I have an SQL Database with a lot of unused space. However when I run Tasks | Shrink | Database And Tasks | Shrink | Files from Management studio it isn't freeing up any space. Unfortunately the ...
3
votes
1answer
90 views

Shrinking Databases in a maintenance plan [duplicate]

Everything I've heard (including from Microsoft) says you should never shrink a database. Yet a software vendor (Symantec) is telling us to do DBCC SHRINKFILE on the SQL 2012 databases and logs ...
0
votes
2answers
38 views

Restoring Database to a smaller test envrionment [duplicate]

I don't believe this is possible but wanted to check. I've got a bi-weekly job running to restore the full backup to a test environment so the devs have something fresh to destroy without damaging ...
10
votes
6answers
47k views

Shrinking the log file does not reduce size

I have a database which had mdf size of 350 MB and ldf size 4.9 GB When i try to shrink the log file it's not shrinking. I know shrinking a database is not good and it should not be done. But still i ...
5
votes
2answers
137 views

Catch event of auto_shrink in SQL Server Log? [duplicate]

I am aware of the disadvantages of AUTO_SHRINK being configured on SQL Server databases. Recently, in a new environment, I discovered several production servers with the Auto Shrink option turned on. ...
4
votes
2answers
1k views

Database defragmentation and autogrowth settings

We do have some maintenance plan for our SQL Server 2008 r2 express. Every month we do de-fragmentation of the database if any table has page count more than 50 for any table and average fragmentation ...
7
votes
2answers
7k views

Database size - MDF too large?

I'm maintaining a SQL Server 2005 database which hosts approximately 2.9Tb of data (2 x 1.45Tb - I have a RAW schema and an ANALYSIS schema so basically two copies of the data ingested). The recovery ...
18
votes
3answers
3k views

I Need to Shrink My Database - I just freed a lot of space

This question is asked in various forms here but the question boils down to: I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again. How can I ...
-1
votes
2answers
105 views

how can I delete records when my disk drive is full?

My data folder of SQL as filled up the space of my local drive. I have 150KB free space left in the drive. So I have to delete some records to regain space. But when I run the delete query it says ...
0
votes
1answer
225 views

Why can't I get the available free space after shrinking?

My disk drive was full. So I deleted some records. Then I tried to shrink and it indicated available free space of around 5GB as indicated in the below image. Once I ran the shrink for data file, ...
0
votes
0answers
31 views

Shrinking SQL Server 2000 database [duplicate]

Possible Duplicate: Shrinking SQL Server 2000 database I have become the defacto SQL Server Admin and I have been tasked with moving a production database to a new server. I am trying to ...
3
votes
2answers
2k views

Shrinking SQL Server 2000 database

I apologize for the long question. I am trying to learn a lot on the fly as I have become the defacto SQL Admin. I have been tasked with moving a production database to a new server. My goal is to ...
4
votes
1answer
1k views

Truncate log file mirrored database

In SQL Server 2008, I have a mirrored database with a log file that has increased to 80GB, which is not normal and I have serious problem. I would like to decrease the log file size by truncating it. ...
5
votes
4answers
9k views

DBCC SHRINKFILE works with file_id but not with logical name

I am trying to shrink a database file but am running into errors. Using the file_id from sys.database_files works, but using the logical file name yields an error. The logical file name is the same ...
2
votes
1answer
322 views

Shrinking old partitions

I have a large partitioned time series table where each partition is stored in it's own file. Since it's time series based partitioning divided by week and I'm only storing data that is new I have ...
0
votes
1answer
8 views

Shrink configuration & content database in Sharepoint DBs

There was some argument between me and a college about for how we should shrink DBs. We knew that shrinking should be manual and only if required. We run in a case that configuration DBs reached to ...
1
vote
1answer
78 views

When Should You Shrink Your Database

I have read conflicting articles about shrinking a databases. Basically, our database grew 100% overnight from 150 gigs to 300 gigs b/c I believe it was with staging tables I put in. However, all the ...
0
votes
0answers
74 views

Relationship between file shrink and used memory in SQL Server

Some background info: this is a test SQL Server 2012, with restored databases from production servers, all of them with over 20% space available in the data file, up to even 50%. I'd rather restore as ...
6
votes
3answers
1k views

Get MS SQL Server to release disk space

A poorly managed database table has grown to be enormous. 48+gigs of orphan records. I am trying to clean it up and put my dangerously full hard drive back to a normal state. I will be deleting approx ...
3
votes
2answers
2k views

How to minimize log operations in SQL Server to avoid “log full” error

I have a database in production which constantly get log file filled, its a data warehouse and have many jobs/queries running for obvious. Below is the error which I am getting Msg 9002, Level 17, ...
1
vote
1answer
108 views

Dealing with non active transaction in log file and shrinking

I have posted the first part of my question here & I don't want to flood my question with a loads of information and would force people to alter their answers for my each question. I think I am ...
1
vote
1answer
232 views

How do I reduce SharePoint 2010 SQL server log files? [duplicate]

I have a work place portal built on SharePoint 2010 and the SQL Server drive space is full. I am using SQL Server 2008 R2. Of the 800 GB disk space, the log files have taken approximately 730 GB. ...
0
votes
0answers
27 views

Database Log Files Getting out of control [duplicate]

We have a database in which the transaction log file is blowing up to 100GB with the actual database being 1GB in size. It blows up pretty quick as this database is pulling data from another database ...
0
votes
2answers
166 views

What causes disk space growth from Informatica load onto SQL Server?

We've been dealing with huge disk growth on SQL Server from Informatica. After the load, the database grows to 2.4TB. After the database shrink, it goes to 1.05TB. What could likely cause this to ...
2
votes
3answers
5k views

How to do a one-time log shrink on a database with transactional replication

I have inherited a 10 GB database with an 80 GB log [only 3% in use according to DBCC SQLPERF(logspace)]. It seems safe to assume the extreme log growth was due to problems from long before I was ...
4
votes
2answers
5k views

TempDB will not shrink. No Open Transactions

I have a TempDB on SQL 2008 that has gotten very large (>40gb) and I want to shrink it down. I have used the dbcc shrinkdatabase, dbcc shrinkfile and the shrink command through Management Studio. I ...