Showing posts with label space. Show all posts
Showing posts with label space. Show all posts

Tuesday, March 27, 2012

DB and Log size Checking

Hi,
I am wondering what the best way is to go about getting data about
database size (free & used space). I have multiple servers that I
must keep an eye on so I am developing a little application that will
report on the DB and log size but I do not want to go to each server
with enterprise manager or query analyzer to check on them. As far as
log size information I have been using a stored procedure that retuns
results from DBCC SQLPERF(Logspace) but I have not been able to find a
similar function for the database stats. Any ideas?
Paul,
For whatever the current database is the system stored procedures:
sp_spaceused -- shows utilization
sp_helpfile -- shows the file sizes, e.g. the mdf and the ldf, etc.
I use these both to understand what is happening.
Russell Fields
"Paul T." <weluvpaul@.hotmail.com> wrote in message
news:1fe3e09e.0408231149.1aa9225a@.posting.google.c om...
> Hi,
> I am wondering what the best way is to go about getting data about
> database size (free & used space). I have multiple servers that I
> must keep an eye on so I am developing a little application that will
> report on the DB and log size but I do not want to go to each server
> with enterprise manager or query analyzer to check on them. As far as
> log size information I have been using a stored procedure that retuns
> results from DBCC SQLPERF(Logspace) but I have not been able to find a
> similar function for the database stats. Any ideas?
|||Thank you Russel!

DB and Log backup

Hello all,

We currently have disk space problem on our main SQL server (say server "A")
and I'l like to save DBs and logs backups on another server (say "B"). Is
that possible? I tried to set the backup path to point to B but it generate
an error. Serurity/Account issue? SS2K on A was running under the System
account. I tried to change it to an account that was created on both server.
Still an error.

Any help/suggestion would be appreciated.

Both server are running SS2000 SP3. Server A is W2K and B is NT4.

Thanks for your time.

Yannick"Yannick Turgeon" <nobody@.nowhere.com> wrote in message
news:U4cFd.34222$TN6.1120153@.news20.bellglobal.com ...
> Hello all,
> We currently have disk space problem on our main SQL server (say server
> "A") and I'l like to save DBs and logs backups on another server (say
> "B"). Is that possible? I tried to set the backup path to point to B but
> it generate an error. Serurity/Account issue? SS2K on A was running under
> the System account. I tried to change it to an account that was created on
> both server. Still an error.
> Any help/suggestion would be appreciated.
> Both server are running SS2000 SP3. Server A is W2K and B is NT4.
> Thanks for your time.
> Yannick

The MSSQL service account on server A needs to be a domain account with
access to the share on server B where you want to place the backups. Then a
command like this should work fine:

backup MyDB to disk = '\\serverB\share\folder\MyDB.bak

If you have a local account on each server with the same name and password,
then it will probably work too (I've never tried it myself), but using a
domain account would be easier anyway. There's more information about using
a domain account in Books Online under "Setting up Windows Services
Accounts" and "Changing Passwords and User Accounts".

If this doesn't help, it would be useful to know exactly what backup command
you're executing and what the error messages are.

Simon|||Hello Simon,

Your command worked. But I tried to make a backup from a Maintenance Plan
and it was this SQL command that was not working. After some comparaison
between both command I finally realised it was not working because I wrote
in the destination \\serverB\share instead of \\serverB\share\ (forgot the
trailing backslash).

Thanks for your help.

Yannick

"Simon Hayes" <sql@.hayes.ch> wrote in message
news:41e55501$1_1@.news.bluewin.ch...
> "Yannick Turgeon" <nobody@.nowhere.com> wrote in message
> news:U4cFd.34222$TN6.1120153@.news20.bellglobal.com ...
>> Hello all,
>>
>> We currently have disk space problem on our main SQL server (say server
>> "A") and I'l like to save DBs and logs backups on another server (say
>> "B"). Is that possible? I tried to set the backup path to point to B but
>> it generate an error. Serurity/Account issue? SS2K on A was running under
>> the System account. I tried to change it to an account that was created
>> on both server. Still an error.
>>
>> Any help/suggestion would be appreciated.
>>
>> Both server are running SS2000 SP3. Server A is W2K and B is NT4.
>>
>> Thanks for your time.
>>
>> Yannick
>>
> The MSSQL service account on server A needs to be a domain account with
> access to the share on server B where you want to place the backups. Then
> a command like this should work fine:
> backup MyDB to disk = '\\serverB\share\folder\MyDB.bak
> If you have a local account on each server with the same name and
> password, then it will probably work too (I've never tried it myself), but
> using a domain account would be easier anyway. There's more information
> about using a domain account in Books Online under "Setting up Windows
> Services Accounts" and "Changing Passwords and User Accounts".
> If this doesn't help, it would be useful to know exactly what backup
> command you're executing and what the error messages are.
> Simon