Re: Management Studio - Open File
- From: "Joe" <joe@xxxxxxx>
- Date: Wed, 9 Nov 2005 10:26:12 -0600
I think this is going to take a little getting used to.... Let me explain
what I do now and see if there are any suggestions.
I have development, QA, staging, and production databases. When I am
developing a new release I have Alter Table Sciprts, Stored Proc Changes,
some DML for added records or data fixes. When writing in dev I number all
the scripts with the filenames 01 - AlterTableCustomer.sql, 02 -
AlterTableOrder.sql, 03 - TableCustomerSprocs.sql. This way when I go to
QA I open script 1, run script 2, run, etc....
My dev and QA databases sit on the same server and have different names (so
I can't use the USE). My staging and production databases are on a hosted
server and also have different names.
I agree that Management Studio does not know what server or database I am
connecting to when I first open a script, but after I have selected it and I
am opening a script from the context of a connection I have already
established.... At the risk of sounding like I am harping on "the good
'ole days", Query Analyzer worked this way.
I guess I could have separate projects for dev, qa, staging, and prod... I
will have to experiment and try it out.
"William Stacey [MVP]" <william.stacey@xxxxxxxxx> wrote in message
news:%23vYQsdP5FHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
> If you use Solutions and projects, then the project will associate each
> script with the connection info you requested when you created the new
> script. So each time you open the script in the project, it knows what
> connection to use. I would always use "USE <DB>" on all scripts and not
> rely on default DB as you can burn yourself if you don't, plus it make
> good code style. If you want the same code on another connection, then
> create a new script and copy/paste the code in (update the USE statement
> if needed.)
>
> If you just open a .sql file without opening a project first, it has no
> idea what connection to use, so it prompts you for it. Does that help?
>
> --
> William Stacey [MVP]
>
> "Joe" <joe@xxxxxxx> wrote in message
> news:uwJBWw93FHA.3628@xxxxxxxxxxxxxxxxxxxxxxx
>>I was hoping this would be worked out with RTM, but it does not look like
>>it.
>>
>> I want to open a .sql file from disk in my current window. Whenever I
>> try to open a file managment studio opens it into a new tab, prompts me
>> for my connection info, and then opens it to my default database (usually
>> Master).
>>
>> I want it to behave like Query Analyzer (good 'ole QA) and open the file
>> into my current window without changing all my connection info. Am I
>> missing something?
>>
>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Management Studio - Open File
- From: William Stacey [MVP]
- Re: Management Studio - Open File
- References:
- Management Studio - Open File
- From: Joe
- Re: Management Studio - Open File
- From: William Stacey [MVP]
- Management Studio - Open File
- Prev by Date: Re: DELETING 100 million from a table weekly SQl SERVER 2000
- Next by Date: Re: tool for stored proc. (written in oracle/sql) execution?
- Previous by thread: Re: Management Studio - Open File
- Next by thread: Re: Management Studio - Open File
- Index(es):
Relevant Pages
|