SQL Server guide

Error message when you perform a full backup of a database in SQL Server 2005: “Backup failed for Server ‘ComputerName\SQLInstanceName’ ” or “The backup of the file or filegroup ’sysft_FullTextCatalog’ is not permitted because it is not online

October 16, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized

SQL Server 2005 WMI Provider Error

September 30, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized

Change Default Backup Location for SQL Server

September 18, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized

How to Track Down Deadlocks Using SQL Server 2005 Profiler

August 25, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized
Tagged: ,

Introduction to Locking in SQL Server

August 25, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized
Tagged:

Default Trace in SQL Server 2005

July 2, 2009 · Leave a Comment

Check to see if default trace is running and reconfigure to remove

http://www.mssqltips.com/tip.asp?tip=1111

→ Leave a CommentCategories: Uncategorized
Tagged: ,

Basics of C2 Auditing

July 1, 2009 · 1 Comment

Audit your Servers

What ever the system that we are taking about, whether it is an ERP system or CRM tool or any database system auditing has become essential part of that system.. Auditing will allow you to:

  1. Detect the misuse and prevent it being happened again.
  2. Take legal actions against the people who are responsible for the misuse.
  3. Take recovery action from the point where something has gone wrong.

 

There are many ways in which you can setup an auditing trail and many places in which to get it up. However, we SQL Server guys (sorry, gals as well) have a somewhat easy way of doing this thanks to a new feature of Microsoft SQL Server 2000, which is called the C2 audit mode option.

What is C2

The US Department of Defense has established a set of ratings applicable to security levels of computer systems, based on their capabilities in regard to auditing and discretionary access control. Accordance with this ratings Microsoft SQL Server 2000 has C2 audit mode option. Every version of SQL Server 2000 is C2-certified (provided it is run on a C2-certified computer and network). Accordingly, SQL Server guarantees that its auditing procedures satisfy C2 requirements — for example, storing generated data only on a NTFS partition.

C2 auditing records information goes beyond server-level events, such as shutdown or restart, successful and failed login attempts, extending it to successful and failed use of permissions when accessing individual database objects and executing all Data Definition, Data Access Control, and Data Manipulation Language statements.

The audit information contains the timestamp, identifier of the account that triggered the event, target server name, event type, its outcome (success or failure), name of the user’s application and Server process ID of the user’s connection and name of the database .

How it is done

I can’t believe why there is no UI is given to enable this option. However, Microsoft might have fair reason for doing this. There are some serious implications if you enable this option.

Anyway it can be done via my favorite tool, SQL Query Analyzer. Before you enable (or disable) this option you must be a member of sysadmin group. Before attempting to set the ‘c2 audit mode’ configuration option, you must enable the ’show advanced options’ configuration option. This is performed using the following command:

USE master
EXEC sp_configure 'show advanced option', '1'
RECONFIGURE

To enable the feature, set ‘c2 audit mode’ to 1 using the following command:

sp_configure 'c2 audit mode', 1
go

To disable the feature, set ‘c2 audit mode’ to 0 using the following command:

sp_configure 'c2 audit mode', 0
go

After setting the value, you must stop and restart the server for C2 audit mode to be take effect. Now whenever you perform an Insert, Select or anything other statement, it will log the event in the trace files. These files reside in the \mssql\data directory for default instances of SQL Server 2000, or the \mssql$instancename\data directory for named instances of SQL Server 2000 as AuditTrace_yyyymmddhhmmss.trc, where the second part of the name indicates date and time when the log file was created. For example, some file names on my system are audittrace_20041007153315.trc and audittrace_20041007163855.trc. The size of a log is limited to 200MB, but new traces files are generated whenever the old one is full. Also a new one is generated on the shutdown of SQL Server with another one on startup.

One thing to be aware of is that SQL Server will stop if it cannot write log entries, i.e. you log so much that you run out of disk space. In emergency situations, where no space can be immediately freed for new log files, you can restart SQL Server with the -f flag, which will disregard auditing settings.

How to View the Audit Records

There are two ways of displaying the auditing records. Easy method would be clicking on the trace file. It will open this in SQL Profiler.

The second method would be using T-SQL.

SELECT *
 FROM ::fn_trace_gettable(
   'C:\Program Files\Microsoft SQL Server\MSSQL\Data\audittrace_20041007153315.trc', default
	)
GO

Limitations

The main limitation of the auditing is that it reduces the performance of the SQL Server. This happens due to saving the every action to the file. Second limitation is the hard disk space. These auditing files grow rapidly, which will reduce the disk space. According to the C2 , if it is not able to write to the trace file, SQL Server will be shutdown.

Conclusion

If you need your server to maintain a detailed audit trail, then the C2 audit option may be a good choice. However, you might have to consider few things before configuring it to be sure that you don’t cause yourself some issues over time. Be sure that you read the documentation carefully before enabling this option.

→ 1 CommentCategories: Uncategorized
Tagged: ,

Auditing in SQL Server 2008

July 1, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized
Tagged: ,

Surface Area Configuration Using Policy Based Management

July 1, 2009 · Leave a Comment

→ Leave a CommentCategories: Uncategorized
Tagged: ,

Microsoft SQL Server 2008

June 29, 2009 · 1 Comment

MicrosoftSQL Server 2008 
SQL Server 2008 provides the highest levels of security, reliability, and scalability for your business-critical applications. To take advantage of new opportunities in today’s fast-moving business world, companies need the ability to create and deploy data-driven solutions quickly. SQL Server 2008 reduces time and cost of management and development of applications. 

SQL Server 2008 delivers a rich set of integrated services that enable you to do more with your data such as query, search, synchronize, report, and analyze.

 Useful Links:

 

SQL Server 2008 Overview

SQL Server 2008 R2

What’s New in SQL Server 2008

Why upgrade to SQL 2008?

SQL Server Blogs

SQL Server Forums on MSDN

SQL Server TechCenter on TechNet

SQL Server Developer Center on MSDN

SQL Server 2008 Downloads

Resources:

 

How-to guides for your upgrade to SQL 2008:

SQL Server 2000 to 2008 Upgrade Whitepaper

SQL Server 2005 to 2008 Upgrade Whitepaper

Version and Edition Upgrades

Using Upgrade Advisor to Prepare for Upgrades

Migrating to SQL Server 2008

Upgrading to SQL Server 2008

SQL Server 2008 Upgrade How-to Topics

Getting Assistance with SQL Server 2008

Check Parameters for the System Configuration Checker

Resources for Upgrading to SQL Server 2008

Assessment & Migration Tools

Solutions to Address your specific needs: 

Business Intelligence

Data Warehousing

OLTP

Application Development

Server Consolidation

Hosting Solutions

Solutions for the Web

Virtualization 

Training and Certification – Learning Resources:

SQL Server 2008 Learning Portal

SQL Server 2008 Books Online

SQL Server 2008 Learning Resources

Best Practices

Best Practices for Data Warehousing with SQL Server 2008

SQL ServerBest Practices  

SQL Server Best Practices – Implementation of Database Object Schemas

SQL Server 2008 – Integration Services

Replication Security Best Practices

Best Practices for Using Native XML Web Services

Best Practices for Replication Administration

 

White Papers

General:

Introducing Microsoft’s Platform for Complex Event Processing

SQL Server 2008 Sustainability

Auditing in SQL Server 2008

SQL Server 2008 Product Overview

Running SQL Server 2008 on Windows Server 2008

Troubleshooting Performance Problems in SQL Server 2008 Whitepaper

Geo-Replication Performance Gains with SQL Server 2008 on Windows Server 2008

SQL Server 2008 Licensing Overview

Server Consolidation with SQL Server 2008

 

Switching to SQL Server 2008:

A Competitive Review of Sybase ASE

Why SQL Server May Be More Suitable for You than Oracle RAC

Practical SQL Server 2008 for Oracle Professionals

SQL Server 2008 Compared to Oracle Database 11g

SQL Server Integration Services with Oracle Database 10g

 

Online Transaction Processing/Data Management:

Online Transaction Processing in SQL Server 2008

Enterprise Policy Management Framework with SQL Server 2008

SQL Server 2008 Performance and Scale

SQL Server 2008 Security Overview for Database Administrators

SQL Server 2008 Manageability

Microsoft SQL Server 2008 Data and Backup Compression

Database Encryption in SQL Server 2008 Enterprise Edition

Protecting SQL Server with System Center Data Protection Manager 2007

 

Business Intelligence and Data Warehousing:

An Introduction to SQL Server 2008 Integration Services

Connectivity Options for Microsoft® SQL Server® 2008 Integration Services

Introduction to New Data Warehouse Scalability Features in SQL Server 2008

Predictive Analysis with SQL Server 2008

Predictive Analysis for the Retail Industry 

 

Application Development/Data Programmability:

Microsoft SQL Server 2008 and Microsoft Data Platform Development

SQL Server 2008: Delivering Location Intelligence with Spatial Data

Managing Unstructured Data with SQL Server 2008

What’s New for XML in SQL Server 2008

→ 1 CommentCategories: Uncategorized
Tagged: , , ,