Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道为服务器上的每个存储过程生成某种校验和的方法,以便能够将它们与不同服务器上的其他 SP 进行比较?
问候,
杰伦
你可以;
SELECT ROUTINE_NAME, HASHBYTES('SHA1', ROUTINE_DEFINITION) FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'PROCEDURE' AND OBJECTPROPERTY(OBJECT_ID(ROUTINE_NAME), 'IsMSShipped') = 0