May 16, 2011 at 8:41 am
My boss is taking the summer off for some internship he's working on, so I've got to cover for him. One of the many things he does is runs reports. He's written several SQL reports, and some of these are in SQL Server projects. He's given me the locations, etc. I've got documentation as to how to run them.
OK, so far, so good. One thing I really hate about these SQL projects is that whwhenever open up one of the many .sql files he's written, it requires me to log into SQL server all over again. Given the fact that several of his SQL projects require opening up numerous .sql files, I really am getting tired of all of the multiple logins. However, each of these separate .sql files are really for separate, functional steps and therefore I suppose shouldn't be combined into 1 large .sql file. Is there any way to stop having to log into SQL Server when opening each and every .sql file I have to, that's a part of his SQL project files?
Kindest Regards, Rod Connect with me on LinkedIn.
May 16, 2011 at 9:11 am
If you have an active connection, you can open all of them without issue. Is there a reason you can't make one connection and leave it open?
May 16, 2011 at 2:01 pm
Steve Jones - SSC Editor (5/16/2011)
If you have an active connection, you can open all of them without issue. Is there a reason you can't make one connection and leave it open?
Umm. Well, truthfully, I kind of thought the connection was opened once I got into SSMS. I didn't realize that apparently it did a "OK, you're on, good luck" and then go away on me. So, how do I get it to connect once and stay on?
Kindest Regards, Rod Connect with me on LinkedIn.
May 16, 2011 at 3:10 pm
It stays connected for me. It might drop overnight, but it seems if I'm opening stuff within a few hours of each other, it remains connected.
May 16, 2011 at 4:48 pm
Are you running the RTM version of SSMS 2005? That was the case with the original version, to present 'look, we're more secure this way', but after everyone howled about it, existing connections were reused when opening new windows.
-Eddie
Eddie Wuerch
MCM: SQL
May 17, 2011 at 11:00 am
It also depends on how you have your environment set up. You can find it in Tools-> Options. I use "Open Empty Environment" so I don't have to log into a query window first thing. But I also have a multi-cluster environment that I open up the servers in Object Browser every morning. Note: Having database servers in Object Browser opens a connection. Saving them in Registered Servers does not.
If I hit New Query while in an open Query window (with an open connection), it opens the new window without the login. Same if I'm in the Summary window on one of the database server objects (tables, SQL Server Agent, database, etc.). Summary Window is F7, once you've connected to a server in Object Browser.
However, if I'm in AS or IS in the Summary window or Object Browser window, SSMS will force me to open a new connection.
Also, if you're using SQL Logins, it will force you to log in every time (I believe).
May 17, 2011 at 5:07 pm
There is one other detail you might need to be aware of:
The object browser can be connected to an instance of SQL Server and each individual query window can be connected to a different instance of SQL Server. You may not have more than one instance of SQL Server so this may not be a potential issue for you. If you have more than one instance of SQL Server, and depending on how you do your work, you may need to ensure that your individual query windows are connected to the correct instance of SQL Server.
LC
May 18, 2011 at 8:07 am
Eddie Wuerch (5/16/2011)
Are you running the RTM version of SSMS 2005? That was the case with the original version, to present 'look, we're more secure this way', but after everyone howled about it, existing connections were reused when opening new windows.-Eddie
Perhaps that's what's wrong. I am the developer version of SQL 2008 R2 on my machine, so I use SSMS from that to reach our production servers, which are all SQL 2005 RTM. Although I think my boss, who is running SQL 2005 on his system, has experienced the same behavior.
Kindest Regards, Rod Connect with me on LinkedIn.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply