Re: SMSS SP2 Script Database objects error



Chuck Lathrope (computerguy_chuck@xxxxxxxxxxxxxxxx) writes:
I was trying to export all database objects to individual files as SQL
2005 Management studio SP2 allows, but got the following error:

Generate Script Progress
- Determining objects in database 'NameHost' that will be scripted.
(Error) Messages The query uses non-ANSI outer join operators ("*=" or
"=*"). To run this query without modification, please set the
compatibility level for current database to 80 or lower, using stored
procedure sp_dbcmptlevel. It is strongly recommended to rewrite the
query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER
JOIN). In the future versions of SQL Server, non-ANSI join operators
will not be supported even in backward-compatibility modes. (Microsoft
SQL Server, Error: 4147)

Is this a known issue?

That's one I've never seen before. And while there are some bugs with
scripting, I find it difficult to believe that it would be that bad. My
initial reaction was that must be a piece of your own code that causes
the error, but I can't see why scripting would invoke your code - and if
it does, that's a bug.

I would suggest that you set up a Profiler traces that traces for
SQL:BatchStarting and SQL:BatchCompleted and the Error:Exception event,
to see exactly how the offending statement looks like. If nothing else,
you should be able to track down the object this happening too. Maybe
it's a very uncommon sort of object which could explain why this slipped.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: SMSS SP2 Script Database objects error
    ... Determining objects in database 'NameHost' that will be scripted. ... query using ANSI outer join operators (LEFT OUTER JOIN, ... scripting, I find it difficult to believe that it would be that bad. ... I would suggest that you set up a Profiler traces that traces for ...
    (microsoft.public.sqlserver.tools)
  • Re: Query with left outer join all of a sudden wont work?
    ... can you check if the log file has enough room to accommodate ... the outer join? ... older MS SQL Server (I was on the impression you were using MS SQL Server ... database from March in our SQL 2005 server and it also doesn't work. ...
    (microsoft.public.access.queries)
  • Re: SMSS SP2 Script Database objects error
    ... Determining objects in database 'NameHost' that will be scripted. ... query using ANSI outer join operators (LEFT OUTER JOIN, ... scripting, I find it difficult to believe that it would be that bad. ... I would suggest that you set up a Profiler traces that traces for ...
    (microsoft.public.sqlserver.tools)
  • SQL 2000: scripting and ownership
    ... I've got an issue with scripting and object ownership. ... three logins/users of our database, and the main ASP application uses, ... Something in Windows 2003 where the scripting ... Something in the SQL Server settings on the 2003 ...
    (microsoft.public.sqlserver.server)
  • query against vldb
    ... 6GB of memory (5GB assigned to sql server). ... and after that database is being ... Below is the query. ... LEFT OUTER JOIN COMP B ...
    (microsoft.public.sqlserver.programming)