Unix Technical Forum

SQL daily

This is a discussion on SQL daily within the SQL Server forums, part of the Microsoft SQL Server category; --> Coming from Oracle background: How do you carry thiese admin tasks in SQL 2000 Environment : Check instance availability ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 03:35 AM
Frank
 
Posts: n/a
Default SQL daily

Coming from Oracle background:

How do you carry thiese admin tasks in SQL 2000 Environment :

Check instance availability
Check listener availability
Check alert log files for error messages
Clean up old log files before log destination gets filled
Analyze tables and indexes for better performance
Check tablespace usage
Find out invalid objects
Monitor users and transactions


Thanks for help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 03:35 AM
Simon Hayes
 
Posts: n/a
Default Re: SQL daily


"Frank" <soal6570@yahoo.com> wrote in message
news:42601b2.0404230147.39de3b50@posting.google.co m...
> Coming from Oracle background:
>
> How do you carry thiese admin tasks in SQL 2000 Environment :
>
> Check instance availability


The easiest way is to try connecting, and if you can connect then the
instance is available. You could use osql.exe, or the SQLDMO or ADO COM
objects from your own script. Or if you already have a tool to monitor
Windows services, then you can use that to check the MSSQLServer and
SQLServerAgent services.

> Check listener availability


I'm not sure what a listener is, but there is no separate component in MSSQL
to handle connections - you connect directly to an instance.

> Check alert log files for error messages


The MSSQL error log is a text file, so any tool for parsing log files will
work. In addition, MSSQL writes to the Windows Application event log, so if
you already have a tool for reading those logs, then you could use that. Or
configure MSSQL alerts for the specific errors that you're interested in.

> Clean up old log files before log destination gets filled


This depends on your backup strategy. If you want to be able to do
point-in.time recovery, then you need log backups - backing up the log
trunctates it (ie frees up space in the log file). If you don't need that,
then you can use the simple recovery model, where the log is automatically
truncated. See "Selecting a Recovery Model" and "Truncating the Transaction
Log" in Books Online.

> Analyze tables and indexes for better performance


The Index Tuning Wizard might be the best place to start - you trace some
typical activity in the database (using Profiler), then the wizard analyzes
it and suggests changes to the current indexes.

> Check tablespace usage


Check out sp_spaceused, sp_helpfilegroup, sp_helpfile, and DBCC SQLPERF in
Books Online. You can also use the SQLDMO COM interface to get information
on files and filegroups.

> Find out invalid objects


I'm not sure what you mean by an "invalid" object - you might want to
explain some more.

> Monitor users and transactions


Profiler is probably the best general tool - you can view all commands sent
to the server, long.running queries, execution plans etc. In Query Analyzer,
you can use sp_who2 to see the current connections, sp_lock to view the
current locks, and fn_get_sql() to view the commands being executed by each
user.

Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com