Home > Archive > MS SQL Server > October 2006 > Best Practice Analyzer scan









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Best Practice Analyzer scan
dunleav1

2006-10-24, 6:38 pm

I have a scan that is returning an exception.

The exception is on a trigger.
The trigger does an insert and refers to another object and I don't
have the object prefixed with a user/schema within the trigger. My
application is deliveried as static ddl and the customer chooses what
user (2000) or schema (2005) to install it into. How can I code the
trigger to include the user/schema name when it can be different for
each customer?

Here's the scan - One or more objects are refencing tables/views
without specifying a schema! Performance and predictability of the
application may be improved by specifying schema names.

Hilary Cotter

2006-10-24, 6:38 pm

Can you use suser_name to give the login id and go from there?

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



"dunleav1" < jmd@dunleavyenterpri
ses.com> wrote in message
news:1161344508.902991.253770@m73g2000cwd.googlegroups.com...
>I have a scan that is returning an exception.
>
> The exception is on a trigger.
> The trigger does an insert and refers to another object and I don't
> have the object prefixed with a user/schema within the trigger. My
> application is deliveried as static ddl and the customer chooses what
> user (2000) or schema (2005) to install it into. How can I code the
> trigger to include the user/schema name when it can be different for
> each customer?
>
> Here's the scan - One or more objects are refencing tables/views
> without specifying a schema! Performance and predictability of the
> application may be improved by specifying schema names.
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com