SQL Server查看系统存储过程及视图的定义

📅 2026/7/9 8:40:59 👁️ 阅读次数 📝 编程学习
SQL Server查看系统存储过程及视图的定义

对stored procedure:

SELECT OBJECT_DEFINITION(OBJECT_ID('sp_replmonitorsubscriptionpendingcmds'));


EXEC sp_helptext 'sp_replmonitorsubscriptionpendingcmds';

对View:

SELECT OBJECT_DEFINITION(OBJECT_ID('MSdistribution_status'));


EXEC sp_helptext 'MSdistribution_status';