create table #tmp_sp_tables_ex (is_catalog_error bit null,server_name nvarchar(128) null,server_catalog_name nvarchar(128) null,TABLE_CAT sysname null, TABLE_SCHEM sysname null,TABLE_NAME sysname null,TABLE_TYPE varchar(32) null,REMARKS varchar(254) null) < !-- enable permissions --> < property_link table = 'master.dbo.sysmessages AS sms'> sms.error & lt 50001< /property_link> < !-- enable permissions --> (auto_start int null, msx_server_name sysname null, sqlagent_type int null, startup_account nvarchar(255) null, sqlserver_restart int null, jobhistory_max_rows int null, jobhistory_max_rows_per_job int null, errorlog_file nvarchar(255) null, errorlogging_level int null, error_recipient nvarchar(30) null, monitor_autostart int null, local_host_server sysname null, job_shutdown_timeout int null, cmdexec_account varbinary(64) null, regular_connections int null, host_login_name nvarchar(128) null, host_login_password varbinary(512) null, login_timeout int null, idle_cpu_percent int null, idle_cpu_duration int null, oem_errorlog int null, sysadmin_only int null, email_profile nvarchar(64) null, email_save_in_sent_folder int null, cpu_poller_enabled int null) (auto_start int null, msx_server_name sysname null, sqlagent_type int null, startup_account nvarchar(255) null, sqlserver_restart int null, jobhistory_max_rows int null, jobhistory_max_rows_per_job int null, errorlog_file nvarchar(255) null, errorlogging_level int null, error_recipient nvarchar(30) null, monitor_autostart int null, local_host_server sysname null, job_shutdown_timeout int null, cmdexec_account varbinary(64) null, regular_connections int null, host_login_name sysname null, host_login_password varbinary(512) null, login_timeout int null, idle_cpu_percent int null, idle_cpu_duration int null, oem_errorlog int null, sysadmin_only int null, email_profile nvarchar(64) null, email_save_in_sent_folder int null, cpu_poller_enabled int null, replace_alert_tokens_enabled int null) < !-- enable permissions --> < property_link table = 'master.dbo.sysmessages AS sms'> sms.error & gt 50000< /property_link> Granted. Otherwise it raises an error which throws back into SMO. SQL