Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Thursday, March 29, 2012

Draging and Droping scripts

I just upgraded from SQL2000 to SQL 2005. When I have a query opened for a database already and I want to drag and drop a script in, I get the login box. Is there anyway to get this to not happen? I would like it that when I drag and drop the script it is just loaded in a new query with the database connection that I was using already. (This is what it did in SQL2000) Thanks.

Right-click on the database in question in the object explorer and select "New Query".

Buck Woody

Draging and Droping scripts

I just upgraded from SQL2000 to SQL 2005. When I have a query opened for a database already and I want to drag and drop a script in, I get the login box. Is there anyway to get this to not happen? I would like it that when I drag and drop the script it is just loaded in a new query with the database connection that I was using already. (This is what it did in SQL2000) Thanks.

Right-click on the database in question in the object explorer and select "New Query".

Buck Woody

Drag and drop query onto Management Studio

Everytime I drag and drop a query file (.sql) from Windows Explorer onto
Management Studio, I am prompted to login. How do I get drag and drop to use
existing connection?
guy,
Install SP2 I believe. (At least it works for me.)
RLF
"guy" <guy@.hotmail.com> wrote in message
news:OiHKPyJqHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Everytime I drag and drop a query file (.sql) from Windows Explorer onto
> Management Studio, I am prompted to login. How do I get drag and drop to
> use existing connection?
>
|||That"s the ticket. Thank you.
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:OGnQpwRqHHA.3740@.TK2MSFTNGP02.phx.gbl...
> guy,
> Install SP2 I believe. (At least it works for me.)
> RLF
> "guy" <guy@.hotmail.com> wrote in message
> news:OiHKPyJqHHA.4872@.TK2MSFTNGP03.phx.gbl...
>

drag and drop .sql scripts problem

In SQL 2000 we used to be able to drop and drag one or more scripts into a
query window with being prompted for a separate connection for each script
file.
Is there any way do stop MSSQL 2005 from prompting for separate login
credentials for each and every script?
Thanks.D. Haber (DHaber@.discussions.microsoft.com) writes:
> In SQL 2000 we used to be able to drop and drag one or more scripts into a
> query window with being prompted for a separate connection for each script
> file.
> Is there any way do stop MSSQL 2005 from prompting for separate login
> credentials for each and every script?
This is certainly a request often heard about Mgmt Studio.
The best workaround is to use Ctrl-Shift-P or Edit->Insert->File from
with the tool.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Drag & Drop Multiple Query Files Into Management Studio

In SQL Server 2000, you could have a Query Analyzer (QA) query window open to a particular database, and drag and drop a group of query files from Windows Explorer on it. QA would then open a query window for each of the files, and automatically default it to that database.

I am trying to get the same functionality in SQL Server 2005 Management Studio, but it nags me with the "Connect to Database Engine" dialog box for every file. Worse still, it will not default to the same database being used by the query window on which it was dropped. And to add insult to injury, it makes you click the options button to change to other than the default database. The behavior is the same in both the tabbed and MDI environment.

I have looked for settings that would affect this behavior, but didn't notice any. Does anyone know if this behavior is possible with 2005? If so, how to you implement it? Thanks.

Kevin

Did you find an answer to your problem? I have just started using SQL Server 2005 and I am having the same problem.

Thanks

Danny

|||

Even if I use "open file" to open saved queries I get asked each time to connect to the database engine. What am I doing wrong?

Thanks

Danny

|||Unfortunately I still have not found a way around the problem. I assume it's something we will have to live with.|||

One of the solutions would be to create a SQL Project with connection info and the related query files as members of a the project. This is similar to the VS project model

You can have multiple projects with different connection settings in a solution.
You may also be able to leverage the new SQLCMD internal commands to embed the connect statement within your scripts.

Thanks,
Ramesh

|||There must be an easier solution to this. Shocking!|||

Please raise a suggestion at the product feedback centre

http://lab.msdn.microsoft.com/ProductFeedback

|||Added a suggestion - http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackId=FDBK48385

Drag & Drop Multiple Query Files Into Management Studio

In SQL Server 2000, you could have a Query Analyzer (QA) query window open to a particular database, and drag and drop a group of query files from Windows Explorer on it. QA would then open a query window for each of the files, and automatically default it to that database.

I am trying to get the same functionality in SQL Server 2005 Management Studio, but it nags me with the "Connect to Database Engine" dialog box for every file. Worse still, it will not default to the same database being used by the query window on which it was dropped. And to add insult to injury, it makes you click the options button to change to other than the default database. The behavior is the same in both the tabbed and MDI environment.

I have looked for settings that would affect this behavior, but didn't notice any. Does anyone know if this behavior is possible with 2005? If so, how to you implement it? Thanks.

Kevin

Did you find an answer to your problem? I have just started using SQL Server 2005 and I am having the same problem.

Thanks

Danny

|||

Even if I use "open file" to open saved queries I get asked each time to connect to the database engine. What am I doing wrong?

Thanks

Danny

|||Unfortunately I still have not found a way around the problem. I assume it's something we will have to live with.|||

One of the solutions would be to create a SQL Project with connection info and the related query files as members of a the project. This is similar to the VS project model

You can have multiple projects with different connection settings in a solution.
You may also be able to leverage the new SQLCMD internal commands to embed the connect statement within your scripts.

Thanks,
Ramesh

|||There must be an easier solution to this. Shocking!|||

Please raise a suggestion at the product feedback centre

http://lab.msdn.microsoft.com/ProductFeedback

|||Added a suggestion - http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackId=FDBK48385