Go to content Go to navigation Go to search

System Databases in SQL Server

November 19th, 2008 by Gabriel

System Databases in SQL Server :-

A Database Administrator shold be aware of system databases which is an integral part of the SQL Server.

System Databases are essential for the operation of a server instance.

Following are System Database in SQL Server 2005 & 2008.

Master Database :-

Master database is the heart of SQL Server, it records all system-level information of a SQL Server which includes instance-wide metadata such as logon accounts, endpoints, linked servers, system configuration settings, System Level Stored Procedures, System level Functions, all other existing databases, their MDF/LDF data file location etc.
Each SQL instance have its own Master database.
Master database consists of two physical files, namely master.mdf (data file) and mastlog.ldf (log file).
SQL Service can not be started if there is any problem with master database or its database files.
There are some restrictions on Master Database, you are not allowed to perform all the operations that you perform with normal database like, you can not add files or file groups, you can not change the owner, you can not drop the database, you can not change the collation, you can not remove the filegroup, primary data file, or log file, you can not take the database offline…

Model Database :-

The model database is used as the template for all databases created on an instance of SQL Server.
While creating a new database, SQL Server create it by getting a template from Model Database. Hence any change that you make in Model Database will reflect in newly created database as well for e.g. if a user creates any tables, stored procedures, user defined data types in Model database then those objects will be available in every newly created database as well.
Model database consists of two physical files namely Model.mdf (data file) and ModelLog.ldf (log file).
If the Model database is damaged or corrupted then SQL Server Service will not start up as it will not be able to create the tempdb database as TempDB database is recreated on every restart of SQL service.
Restrictions on Model Database are the same as that on Master Database.

MSDB Database :-

MSDB is the database used by SQL server Agent to store configuration information, Agent Jobs, Job schedules, Alerts, Operators, Service Broker, Log Shipping, database backups and restore information, Maintenance Plan Configuration, Configuration of Database Mail etc.
MSDB database consists of two physical files namely MSDBData.mdf (data file) and MSDBLog.ldf (log file).
The scheduling information used by SQL Server Agent will be lost in case of any problem occured with MSDB database.
Restrictions on MSDB Database are the same as that on Master Database.

TempDB Database :-

The TempDB is the only database which is recreated every time when SQL Server restarts.
It is besically used to store all the temporary objects like temporary tables, temporary stored procedures, cursors, table variables etc.
TempDB database consists of two physical files namely tempdb.mdf (data file) and templog.ldf (log file).
A clean/new copy copy of TempDB is created on each restart of SQL server, there is never anything stored in tempdb from one session of SQL Server to another.

IIS 6.0 Compression in Windows Server 2003

October 13th, 2008 by Gabriel

Benefits -

# Improve the performance with faster files

# Reduce Bandwidth Costs with Immediate effect

# Save server resources and in turn save money :)

Very basic steps that you can easily implement for IIS compression are as follows(provided you have some basic knowledge of IIS :)  )

[Note : Do not forget to  backup your metabase before you proceed ]

You will have to create a temporary folder to cache static file compression with any familiar name or even you can use default folder “%windir%\IIS Temporary Compressed Files”. Make sure IUSR have read/write permissions on this folder.

# Now open your IIS, at the left pane right click on Web Sites and select Properties

# click on Service tab - Enable Compress application files

# enable Compress static files

# change temporary directory to the folder you have created or default temp folder

# set max size of temp folder depending on the size of your hard drive

# Save and close

# edit the metabase at C:\Windows\system32\inetsrv\metabase.xml in Notepad

# locate for IIsCompressionScheme

# There should be two of them, one for deflate and one for gzip.  Basically they are two means of compression that IIS supports.

# add aspx,  asmx, php and any other extension that you need to the list extensions in HcScriptFileExtensions.

# HcDynamicCompressionLevel has a default value of 0, which can vary 0 -10, set it as per the need

# restart the World Wide Web Publishing Service

That’s it :)

Basic security precautions

October 12th, 2008 by Gabriel

Some basic security policies that a Web Administrator should have to consider are -

1. who/which user is allowed to use the system
2. when the user is allowed to use it
3. which user granted which level of access
4. procedures for granting access to the system
5. remote and local access methods
6. system monitoring
7. suspected security breaches

If you don’t have a clear picture of what is permitted, you can never be sure when a violation has occurred.

General security precautions to take -

1. Limit the number of login accounts available on the machine and delete inactive users.
2. The Crack programs help to detect poorly chosen passwords hence force the people to use strong             passwords who have login privileges.
3. Unused services should be turned off. For e.g. if FTP is no longer needed then it should be stopped.
4. Check system regularly for suspicious activity.
5. Make sure that permissions are set correctly on system files.