Monday, July 2, 2012

Get All Stored Procedures, Tables : Database Comparision

[code language="sql"]
Select name,type_desc from database1.sys.objects where name not in
(Select name From database1.sys.objects)
and type in( 'U', 'V', 'FN', 'IF', 'P')
order by type
[/code]

C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table--
UQ = UNIQUE constraint (type is K)
V = View--
X = Extended stored procedure

[/code]

No comments: