Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Find Mismatched Views and Stored Procs


Find Mismatched Views and Stored Procs

Author
Message
Pratap Prabhu
Pratap Prabhu
SSC-Enthusiastic
SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)SSC-Enthusiastic (149 reputation)

Group: General Forum Members
Points: 149 Visits: 153
Comments posted to this topic are about the item Find Mismatched Views and Stored Procs
CAGreensfelder
CAGreensfelder
SSC Journeyman
SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)

Group: General Forum Members
Points: 79 Visits: 375
What version of SQL Server is the for? I'm using SQL2000 and I'm getting lots of odd syntax errors.
Rich.Gamble
Rich.Gamble
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 98
Provided script failed to create sp_utl_FindMisMatchedObjects in SQL Server 2005 with the following error:
Msg 4145, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 26
An expression of non-boolean type specified in a context where a condition is expected, near 'or'.
Msg 102, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 27
Incorrect syntax near ')'.

-- End of Post.
Roman Vinnik
Roman Vinnik
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 141
Rich.Gamble (7/15/2008)
Provided script failed to create sp_utl_FindMisMatchedObjects in SQL Server 2005 with the following error:
Msg 4145, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 26
An expression of non-boolean type specified in a context where a condition is expected, near 'or'.
Msg 102, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 27
Incorrect syntax near ')'.

-- End of Post.


Change
if(not (select * from sys.databases WHERE name =@strDBName1)
or not exists(select * from sys.databases WHERE name =@strDBName2)

to

if(not exists (select * from sys.databases WHERE name =@strDBName1)
or not exists(select * from sys.databases WHERE name =@strDBName2)

Otherwise, a handy procedure.

PS: it doesn't run in 2000, only in 2005.
Dr Paul Davis
Dr Paul Davis
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 47
Amazingly, I was starting to write something like this - select from sysobjects into temporary tables, etc, when my e-mail went boing and this arrived - excellent script, and PERFECT TIMEING thank you very much.
Iwas Bornready
Iwas Bornready
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11994 Visits: 885
Thanks for the script.
Iwas Bornready
Iwas Bornready
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11994 Visits: 885
This will be really helpful.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search