Tuesday, October 16, 2012

Deadlock



Deadlock: When something happens as follows: Error 1205 is reported by SQL Server for deadlock.

Block



Block: When one process blocks the resources of another process then blocking happens. Blocking can be identified by using
SELECT * FROM sys.dm_exec_requests where blocked <> 0
SELECT * FROM master..sysprocesses where blocked <> 0


lock

Lock: DB engine locks the rows/page/table to access the data which is worked upon according to the query.

Friday, October 12, 2012

When a UNIQUE constraint is added to an existing column or columns in the table, by default, the Database Engine examines the existing data in the columns to make sure all values are unique. If a UNIQUE constraint is added to a column that has duplicated values, the Database Engine returns an error and does not add the constraint.

When a UNIQUE constraint is added to an existing column or columns in the table, by default, the Database Engine examines the existing data in the columns to make sure all values are unique. If a UNIQUE constraint is added to a column that has duplicated values, the Database Engine returns an error and does not add the constraint.
The Database Engine automatically creates a UNIQUE index to enforce the uniqueness requirement of the UNIQUE constraint. Therefore, if an attempt to insert a duplicate row is made, the Database Engine returns an error message that states the UNIQUE constraint has been violated and does not add the row to the table. Unless a clustered index is explicitly specified, a unique, nonclustered index is created by default to enforce the UNIQUE constraint.

SQL Sever System Table

SQL Sever System Table (Instance level scoped)

  • syslogins
  • sysdatabases
  • sysservers
  • sysperfinfo
  • sysconfigures
  • sysaltfiles
  • sysprocesses
  • syscacheobjects

Thursday, October 11, 2012

Update Statistics Task

Update Statistics Task: This task will update the statistics for one of many tables in one or many databases.

Rebuild Index Task


Rebuild Index Task: This task will rebuild an index or indexes on one or many databases.