Thursday, October 3, 2013

BCP utility for data importing

With UserId/Pwd
bcp pubs.dbo.authors out c: emppubauthors.bcp –n –Sstevenw –Usa –P
bcp pubs2.dbo.authors in c: emppubauthors.bcp –n –Sstevenw –Usa –P

For Trusted
bcp pubs.dbo.authors out c: emppubauthors.bcp –n –Sstevenw –T
bcp pubs2.dbo.authors in c: emppubauthors.bcp –n –Sstevenw –T

*-S - Server Name -U - User Name -P Pwd

Tuesday, January 29, 2013

Get the list of Stored Procs related to a table

SELECT DISTINCT so.name FROM syscomments sc INNER JOIN sysobjects so ON sc.id=so.id WHERE sc.TEXT LIKE '%tablename%'