This procedure will give the list of columns included in the primary key for a given table of given database on given server.
For. e.g.
Get_PrimaryKey 'vrs-118','Demo_StDB','IMAGEREPOSITORY'
2001-08-22
714 reads
vanaspati,
2007-02-14 (first published: 2006-08-25)
This procedure will give the list of columns included in the primary key for a given table of given database on given server.
For. e.g.
Get_PrimaryKey 'vrs-118','Demo_StDB','IMAGEREPOSITORY'
CREATE PROCEDURE Get_PrimaryKey @ServerName varchar(50), @CatalogName varchar(50), @TableName varchar(50) AS EXEC sp_serveroption @ServerName, 'data access', 'true' select COLUMN_NAME = COLUMN_NAME from master.dbo.SYSREMOTE_PRIMARY_KEYS ( @ServerName,@CatalogName, N'dbo',@TableName ) EXEC sp_serveroption @ServerName, 'data access', 'false' GO
You rated this post out of 5. Change rating
2001-08-22
714 reads
2001-08-22
366 reads
Very simple, how much space is free on the hard drives of the SQL Server you are connected to.
2001-08-22
652 reads
Get OLE Providers info I have found this useful in tracking down application driver/connection issues. I only had to use it 2 times. But it did help
2001-08-22
399 reads
2001-08-22
699 reads