Showing posts with label logged. Show all posts
Showing posts with label logged. Show all posts

Tuesday, March 27, 2012

DBCC SHRINKDATABASE question

Can this be run on a database that's currently active (lots of people logged
on)?
Ideally, I'd run this out of office hours when no one's connected, but we've
got a serious disk space problem and I'd like to run this now. Any
suggestions/concerns?
Many thanks
GriffA second question if I may relating to truncation.
I have two machines each with SQLServer on it.
Machine 1 has the live databases A, B, C.
Machine 2 has the live databases D, E, F.
Everynight, the databases are backed up, copied onto the other machines and
restored. This is incase we lose a machine and can then switch everyone to
the remaining machine
So, in fact, I have the following
Machine 1 has A, B, C, D', E', F'
Machine 2 has A', B', C', D, E, F.
(where ' denotes the backup copy).
As the live databases are being written to (i.e. not read only), I presume
that the best strategy is to have the following shrink DB commands.
Machine 1
I run shrinkdatabase on A, B, C with the NOTRUNCATE option to prevent the
files from having to expand too much
I run shrinkdatabase on D', E', F' without the NOTRUNCATE option because
these won't be written to as they're not live.
Machine 2
I run shrinkdatabase on D, E, F with the NOTRUNCATE option to prevent the
files from having to expand too much
I run shrinkdatabase on A', B', C' without the NOTRUNCATE option because
these won't be written to as they're not live.
Does this make sense?
Thanks in advance
Griff|||Okay, think I found this answer now on MSDN:
The database being shrunk does not have to be in single user mode; other
users can be working in the database when it is shrunk. This includes system
databases.
Thanks for your time.
Griff

Tuesday, February 14, 2012

dbcc checkdatabase

I got a call from my manager because users were complaining about the server
being slow, and he said he found a lots of locks on the server.
I logged in and I see there is a process running DBCC CHECKDATABASE on
(DYNAMICS) the main Great Plains database.
I'm the DBA, there are many users that know the SA password, I don't think
any of them executed the command.
My question is: Anybody in this forum knows of a program that would execute
this command by itself?
Is there a reason for a program or the server to to do this by itself?
I have read the documentation and they advise to use it when the load is
light because it could impact disk I/O.
Thanks
Tim Bales
timbales@.bellsouth.netHave you checked to see if there is a scheduled job that might have run
this?
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Tim Bales" <timbales@.bellsouth.net> wrote in message
news:Oielg63YIHA.5612@.TK2MSFTNGP06.phx.gbl...
>I got a call from my manager because users were complaining about the
>server being slow, and he said he found a lots of locks on the server.
> I logged in and I see there is a process running DBCC CHECKDATABASE on
> (DYNAMICS) the main Great Plains database.
> I'm the DBA, there are many users that know the SA password, I don't think
> any of them executed the command.
> My question is: Anybody in this forum knows of a program that would
> execute this command by itself?
> Is there a reason for a program or the server to to do this by itself?
> I have read the documentation and they advise to use it when the load is
> light because it could impact disk I/O.
> Thanks
> Tim Bales
> timbales@.bellsouth.net
>|||Andrew is right. Great Plains creates a number of jobs for varying
purposes.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:epV4%23K4YIHA.4828@.TK2MSFTNGP05.phx.gbl...
> Have you checked to see if there is a scheduled job that might have run
> this?
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Tim Bales" <timbales@.bellsouth.net> wrote in message
> news:Oielg63YIHA.5612@.TK2MSFTNGP06.phx.gbl...
>>I got a call from my manager because users were complaining about the
>>server being slow, and he said he found a lots of locks on the server.
>> I logged in and I see there is a process running DBCC CHECKDATABASE on
>> (DYNAMICS) the main Great Plains database.
>> I'm the DBA, there are many users that know the SA password, I don't
>> think any of them executed the command.
>> My question is: Anybody in this forum knows of a program that would
>> execute this command by itself?
>> Is there a reason for a program or the server to to do this by itself?
>> I have read the documentation and they advise to use it when the load is
>> light because it could impact disk I/O.
>> Thanks
>> Tim Bales
>> timbales@.bellsouth.net
>|||I've just found GP to be a pain, in general. It opens a ton of
connections...it's slow, in general. Anyone else seeing this behavior?
Thanks.
Chris
"Tim Bales" wrote:
> I got a call from my manager because users were complaining about the server
> being slow, and he said he found a lots of locks on the server.
> I logged in and I see there is a process running DBCC CHECKDATABASE on
> (DYNAMICS) the main Great Plains database.
> I'm the DBA, there are many users that know the SA password, I don't think
> any of them executed the command.
> My question is: Anybody in this forum knows of a program that would execute
> this command by itself?
> Is there a reason for a program or the server to to do this by itself?
> I have read the documentation and they advise to use it when the load is
> light because it could impact disk I/O.
> Thanks
> Tim Bales
> timbales@.bellsouth.net
>
>