Posted by John Bell on 12/29/06 18:06
Hi
"fireball" <fireball@onet.kropka.eu> wrote in message
news:en3dv5$6ce$1@atlantis.news.tpi.pl...
> I wihsh to discuss whether to use fully qualified names:
> [database].[schema].object
> of objects to operate (create, query..) on is good or not?
>
In general having at least two part names will reduce the need to work out
the schema and therefore be more efficient. Therefore using two part names
in stored procedure and other code is a good idea.
> If someone change order of sql code blocks in my script - this may cause
> lose of it's context (like: use master / use <mydb>..). I wish to have my
> sript independed on changes like this and always produce correct result.
>
This is assuming that the database name does not change! It may be better
just to organise the scripts so you have separate scripts for each database
and then you only need to worry about setting the database once when making
the connection (-d parameter for osql or SQLCMD ) and there would be no USE
statements at all.
> Does using full name make use of 'use <db>' statement unnecessary?
>
John
Navigation:
[Reply to this message]
|