... and then, really it is just a matter of a find and replace in your
code editor (of choice) to get around the portability issues if you want
to keep with your precision and style... Please tell me where this
doesn't apply if I'm off on this one.
Thanks,
jj
-----Original Message-----
From: Jay Butler
[mailto:mssqldba-ezmlmshield-x15409488.[Email address protected]
Sent: Tuesday, March 20, 2007 10:52 AM
To: LazyDBA Discussion
Subject: RE: best practive TSQL question
I always specify owner and only the database name when necessary. As you
found, portability becomes an issue if you fully qualify object.
Specifying owner saves a catalog lookup because SQL Server will always
opt for objects owned by the current user before using ones owned by
dbo.
Jay
________________________________
From: Ligda John
Sent: Tue 20-Mar-07 13:27
To: LazyDBA Discussion
Subject: best practive TSQL question
What are some pros and cons to citing database.owner. before table names
in stored procedures, udfs, and views?
I used to always do this as a point of precision and style. But if
objects are migrated to another DB there is a lot of extra work.
Any feedback or thoughts?
John
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page