| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-06 : 10:08:35
|
| I feel like apologizing for asking - this must be so basic.I am taking too many steps to launch Query Analyzer to view remotely hosted DB's. There's got to be a better way...My steps:1 - Launch Enterprise Manager2 - Login to the remote site under the uid/pwd for the database of concern3 - Highlight the db of concern4 - Select "Tools", "Query Analyzer"5 - Login Query Analyzer with the uid/pwd (again)6 - Rinse and repeat for the next db-------------If in Query Analyzer I select "Connect to server" the only choices are my local server, not the remote.SamC |
|
|
efelito
Constraint Violating Yak Guru
478 Posts |
Posted - 2002-08-06 : 10:14:14
|
| Once in QA, you can type the name or IP of any SQL Server in the drop down box. If you want your servers actually listed, open up the Client Network Utility and enter an alias for each of your remote servers. These should then appear in your QA drop down list box.Jeff BanschbachConsultant, MCDBA |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-06 : 10:30:46
|
| Thank you very much. I wouldn't have thought of looking at the client network utility.This will saved me a bundle of time.I ought to run now, but I'll risk asking another better practice method.I've got about 10 DBs remotely hosted. Each has a unque uid/pwd. We don't work with sa here.So my new steps are to connect, login and gain access to the DB. Relative to where I was 30 minutes ago, I'm light years ahead now, but here goes anyway -- is there any easier/more automated way to access multiple databases without issuing a manual login to each? Without comprimising DB security?SamC |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-06 : 10:38:11
|
| Look in Books Online under "isqlw", it shows the command-line options for database, user login and password, etc. You can create shortcuts for each database that will log you in automatcially using the proper credentials. |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-06 : 11:39:22
|
| These solutions will save me a lot. Thanks Rob and Jeff.The documentation described [-E] [-U user] [-P password]not documenting the -E option very well.-U works alone, but -E -U -P was needed to get the login complete.Now it's double click and I'm in. It's been a good day so far.SamC |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-06 : 11:45:12
|
| -E uses a trusted connection (Windows Authentication) and can't be used in conjunction with -U and -P (well, it doesn't make sense if it's used with them) |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-06 : 12:27:05
|
| Rob,I'd have left this post by now, but for your remark that -E is tied to Windows Authentication which I'm not using at all.My shortcut command line is coded-E -U uid -P pwdIf I remove the -E (leaving in -U uid -P pwd) and launch the shortcut, Query Analyzer prompts me to fill in the password in the Query Analyzer dialogue box to connect. Put the -E back, and I launch right past into the Query Analyzer's SQL 'query window'.I had assumed that -E had something to do with completing the login process.I don't think this is a problem. At worst, I've some doubt that I may be unknowingly using windows authentication?SamC |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-06 : 12:41:28
|
Hmmmm. It seems that BOL is a little unclear about what -E does (is there an echo?) If it works with -E, use it! |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-06 : 16:41:28
|
| Rob,In the end, you were right. Adding -E was logging me into my "local" server using windows authentication. I hadn't noticed the server name in the top of the QA Title Bar.The problem with SQL login was that I had quoted the string" -S abc -D dbn -U uid -P pwd"I don't want to figure out why this would matter, but if I add the -E in the quoted string I login to a default database locally.Leave the quotes, remove the E and QA tries to connect to a "default" database that I frequently use on the remote server.If I remove the quotes, and the -E, it logs me into the remote database correctly.Thanks again for your help.SamC"Experience is one thing you can't get for nothing" - - Oscar Wilde |
 |
|
|
|