Showing posts with label SSMS. Show all posts
Showing posts with label SSMS. Show all posts
Tuesday, November 17, 2015
Thursday, July 9, 2015
View dependencies
in ssms is not always correct because it depends on sysdepends
this is more accurate
select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn
from sys.foreign_key_columns as fk
inner join sys.tables as t on fk.parent_object_id = t.object_id
inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id
where fk.referenced_object_id = (select object_id from sys.tables where name = 'BLAH')
order by TableWithForeignKey, FK_PartNo
this is more accurate
select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn
from sys.foreign_key_columns as fk
inner join sys.tables as t on fk.parent_object_id = t.object_id
inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id
where fk.referenced_object_id = (select object_id from sys.tables where name = 'BLAH')
order by TableWithForeignKey, FK_PartNo
Monday, December 23, 2013
Index was outside the bounds of the array (Microsoft Sqlserver SMO)
happens when you connect 2005 ssms to 2012 DB
Thursday, October 24, 2013
export registered servers in ssms
do not include user names and pswds - otherwise the file is encrypted and the export file wont work on another machine
Monday, August 26, 2013
SSMS- get create index script from hint in execution plan
Monday, May 13, 2013
how to have updatable data from any query in SSMS
edit top 200-> right click on grid -> pane- > sql-> change the sql
Friday, February 17, 2012
how to script all stored procedures etc in a sql database
Subscribe to:
Comments (Atom)


