SansSQL

Thursday, June 12, 2008

What is RDBMS?

Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers.This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.

Saturday, June 7, 2008

Stored Proc to list all object dependencies

EXEC sp_depends 'Object Name'
Go
sp_depends displays information about database object dependencies.
sp_depends displays two result sets. First One shows the objects on which the 'given
object' depends and the second shows the objects that depend on the 'given object'

Friday, June 6, 2008

Query to Check if a table is system table or User table

SELECT OBJECTPROPERTY(OBJECT_ID('TableName'), 'IsMSShipped')
0 --> Indicates User Table
1 --> Indicates System Table

Query to mark a user table as a system table

EXEC sp_ms_marksystemobject 'TableName' Go

dtproperties Table in SQL Server 2000

dtproperties is a system table that stores the information about the Database Diagrams created in a particular database. Whenever a Database diagram is created or modified this table
gets updated automatically.

Basically this is a system table but when we run the below query we will get the name of
dtproperties table in the result set, indicating that this is user table.Microsoft has
confirmed that this is a bug in the Microsoft SQL Server.

Select * from sysobjects where xtype='u'

Ads