How come SQL Prompt doesn't flag Invalid Synonyms in the 'Find Invalid Objects' routine
Ozzie
Posts: 51 Bronze 5
in SQL Prompt
It is easy enough
SQLOzzie
<div>SELECT DB_NAME() AS DBName, Name AS Synonym, base_object_name AS RefersTo, 'DROP SYNONYM ' + SCHEMA_NAME( schema_id) + '.' + Name + ';' AS Fix</div><div>FROM sys.synonyms</div><div>WHERE DB_ID( PARSENAME( base_object_name, 3 ) ) IS NULL</div><div>ORDER BY Name;</div>
SQLOzzie