473,657 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DBCC commands stability

Hi all,

I have a server from which keeping clients off for maintenance is
difficult. They all have VPN connections and can be online any time
they want, and uptime as always is important.

Now I need to run dbcc shrinkdatabase, checkdb and of course
checkpoint right before backups, and when the log seems to grow. I
just tried dbcc checkdb on my home computer and apparently its really
io and CPU intensive on this dual P3. Can users be running queries and
the occasional update and insert while checkdb is doing its thing? Or
is it better to lock everyone out?

How about shrinkdatabase? Any benchmarks on the stability of these
commands while other clients are running? If tables are getting locked
during these commands, the log file will grow even if shrinkdatabase
is running...

Any commands to show which tables are locked, and by whom or what?

I just tried our 2.5GB database on my dual P3 with 256MB ram home
computer.. checkdb took 8 minutes and shrinkdb took 1.5 minutes. We've
a dualP3 server at work, IBM xSeries 232 with 1GB ram, but even 5
minutes of downtime can hurt if shrinkdb needs to be run during work
hours.

Any thoughts?
Jul 20 '05 #1
5 5015
"Ghazan Haider" <gh****@ghazan. haider.name> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
Hi all,

I have a server from which keeping clients off for maintenance is
difficult. They all have VPN connections and can be online any time
they want, and uptime as always is important.

Now I need to run dbcc shrinkdatabase, checkdb and of course
checkpoint right before backups, and when the log seems to grow. I
just tried dbcc checkdb on my home computer and apparently its really
io and CPU intensive on this dual P3. Can users be running queries and
the occasional update and insert while checkdb is doing its thing? Or
is it better to lock everyone out?

How about shrinkdatabase? Any benchmarks on the stability of these
commands while other clients are running? If tables are getting locked
during these commands, the log file will grow even if shrinkdatabase
is running...

Any commands to show which tables are locked, and by whom or what?

I just tried our 2.5GB database on my dual P3 with 256MB ram home
computer.. checkdb took 8 minutes and shrinkdb took 1.5 minutes. We've
a dualP3 server at work, IBM xSeries 232 with 1GB ram, but even 5
minutes of downtime can hurt if shrinkdb needs to be run during work
hours.

Any thoughts?

Yes, why should anyone contemplate running these things during
production hours when you have an automated task queue at your
disposal? Surely any realtime high volume transaction database
system has its natural cycles of usage and minimal usage?

Always move routine tasks into this window of opportunity via
automation and queuing of the task to the off-peak times.


--
Pete Brown
Winluck P/L
IT Managers & Engineers
Falls Creek
Australia
www.mountainman.com.au/software


Jul 20 '05 #2
> Yes, why should anyone contemplate running these things during
production hours when you have an automated task queue at your
disposal? Surely any realtime high volume transaction database
system has its natural cycles of usage and minimal usage?

Always move routine tasks into this window of opportunity via
automation and queuing of the task to the off-peak times.


The log file simply blows up at the wrongest of times, swallows all of
the 36GB disk in a matter of 12 minutes. Apparently something is
locked while some other heavy transaction or bulk upload is going on.
Some of the financial transactions are really heavy and update lots of
rows. I'd just like to have the flexibility to checkpoint and shrinkdb
the database, and know what is locked and why.
Jul 20 '05 #3
Why do you want to shrink the database? You've said it has very heavy
usage - if you shrink it, it'll grow again. That's because it needs all the
space for regular running - this is demonstrated by your (I'm assuming) need
to shrink every so often. Why cause the extra work for no gain? You'd be far
better off not shrinking the database at all.

You can run shrink and checkdb at any time, although they can cause up to a
20% drop (observed on a test system - YMMV) in transaction throughput.

Regards.

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

"Ghazan Haider" <gh****@ghazan. haider.name> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
Yes, why should anyone contemplate running these things during
production hours when you have an automated task queue at your
disposal? Surely any realtime high volume transaction database
system has its natural cycles of usage and minimal usage?

Always move routine tasks into this window of opportunity via
automation and queuing of the task to the off-peak times.


The log file simply blows up at the wrongest of times, swallows all of
the 36GB disk in a matter of 12 minutes. Apparently something is
locked while some other heavy transaction or bulk upload is going on.
Some of the financial transactions are really heavy and update lots of
rows. I'd just like to have the flexibility to checkpoint and shrinkdb
the database, and know what is locked and why.

Jul 20 '05 #4
"Paul S Randal [MS]" <pr*****@online .microsoft.com> wrote in message news:<40******* *@news.microsof t.com>...
Why do you want to shrink the database? You've said it has very heavy
usage - if you shrink it, it'll grow again. That's because it needs all the
space for regular running - this is demonstrated by your (I'm assuming) need
to shrink every so often. Why cause the extra work for no gain? You'd be far
better off not shrinking the database at all.

You can run shrink and checkdb at any time, although they can cause up to a
20% drop (observed on a test system - YMMV) in transaction throughput.


We've had the system freeze with the message transaction log full (no
more transactions or ERP system logins which inserts rows). That was
when the log file grew to several gigabytes and filled up the disk.

It'd be nice to be able to check what is locked and why, making the
logs grow. The shrink and checkdb are just an assurance after
unlocking whatever is locked, and running checkpoint to make sure
everything has been committed, so work can begin all over again. I
wouldnt need to really shrinkdb if theres a command to show the number
of uncommitted transactions in the log file, so I know everything has
been flushed.
Jul 20 '05 #5
"Ghazan Haider" <gh****@ghazan. haider.name> wrote:

....[trim]...
wouldnt need to really shrinkdb if theres a command to show the number
of uncommitted transactions in the log file, so I know everything has
been flushed.

Look up dbcc opentran

--
Pete Brown
Winluck P/L
IT Managers & Engineers
Falls Creek
Australia
www.mountainman.com.au/software

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4239
by: John Morris | last post by:
I'm running a simple DBCC DBREINDEX ('myTable') and I receive the following error: "Server: Msg 169, Level 15, State 2, Line 2 A column has been specified more than once in the order by list. Columns in the order by list must be unique. DBCC execution completed. If DBCC printed error messages, contact your system administrator." I can successfully reindex other tables in this database. I thought
2
6826
by: David Schwartz | last post by:
We are having quite a time since moving a large database to a new server (actually built new server, renamed as old to make seamless for users, etc.) Import 104 million row database (5 column) into table (CD_Assets_bad2) from existing (CD_Assets): Account(varchar(8)) TransactionDate(datetime(8) Flow(varchar(1)) Category(varchar(7))
2
5635
by: SR | last post by:
Can someone please help me interpret this result set below and suggest on way I can speed up my table? What changes should I make? DBCC SHOWCONTIG scanning 'tblListing' table... Table: 'tblListing' (1092914965); index ID: 1, database ID: 13 TABLE level scan performed. - Pages Scanned................................: 97044 - Extents Scanned..............................: 12177 - Extent Switches..............................: 13452 -...
1
6716
by: Kalvin | last post by:
I keep seeing this return from running a DBCC OpenTran: Transaction information for database 'Live_App'. Oldest active transaction: SPID (server process ID) : 92 UID (user ID) : 1 Name : DTCXact LSN : (12837:1924:1) Start time : Oct 4 2004 8:54:03:570AM
13
5118
by: Guillaume | last post by:
I have a table where I store around 1 million rows for 7 days. I run a DBCC SHOWCONTIG every week and I noticed that the number of Rows and the Average Free Bytes are stable but the number of Extents and the Average Record Size keeps increasing. Any idea how to explain this incrase? and how to stop it? Will DBCC DBREINDEX will help? Here is my data: Rows: 1166273 (same as last week) Extents: 147099 (+10% since last week)
2
2565
by: jon_brookins | last post by:
I have a stored proc that identifies indexes that need to be defragmented ( LogicalFragmentation > 20% ) using DBCC SHOWCONTIG. This works fine and shows me all of the candidate indexes to be defragged. I am using DBCC DBREINDEX to rebuild the indexes. What I noticed yesterday is that it seems that DBREINDEX is not actually doing anything. I would check the target indexes, run DBREINDEX, then check again. The same list of indexes came...
3
8061
by: Raziq Shekha | last post by:
Hi Folks, SQL Server 2000 SP3 on Windows 2000. I have a database on which I ran the command : dbcc dbreindex ('tablename') go for all tables in the database. Then I compared the dbcc showcontig with all_index output from before and after the reindex and on the
2
1503
by: sendmail | last post by:
What are the important DBCC commands I need to run regularly on my SQL server2000 database?
0
843
by: =?Utf-8?B?TWFyaw==?= | last post by:
Is it possible to get the output from SQL DBCC commands put into a SQLClient.SQLDataReader? I have tried unsuccessfully... If this is an impossibility, is there some other approach I can use? Thanks for you help, Mark
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.