Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No contact with Query analyzer..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I have a strange problem. I can connect to a table, and list records, with Enterprise Manager but not from Query analyzer. What can be wrong? Channel problem?

/Kent J.
 
At the top center of Query Analyzer there is a 'drop-down' box. Do you have the correct database chosen in that box?

Do you use the USE command in your scripts (this command is used to tell SQL Server which database to use)? It serves the same purpose as using the drop-down box.

-SQLBill

Posting advice: FAQ481-4875
 
SQLBill,

Yes, I have the correct database i my Query Analyzer.

I have tested on a table with 1000 records (select * from Table1)and if I open the table from Enterprise Manager I'll get immediate response (2-3 seconds). But if I open the same table in Query analyzer I'll now have to wait 60 seconds. Are Enterprise Manager och Query Analyzer using the different ports?

My experience so far is that there is no significant difference concering preformance. But now it is.

The SQL-server is inside the firewall.


/Kent J.
 
Go to EM select the DB==> Tables
From the Menu Tools==>Query Analyzer
Enter "F8"
Left panel browse the DB, User Table, Go to the table, right click and Open, make sure all data shows up.
Also try select * from table.
Also make sure the Alias are correct. If needed add the alias.

Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
DrSQL,

<<Left panel browse the DB, User Table, Go to the table, right click and Open>>

All the data is displayed immediatly!

... but If run a script from Query Analyzer:
"select * from Table"
or
"select * from DbNamn..Table"

..it takes 60 seconds before all data is displayed.

/Kent J.


 
So when you run the select statement you get an output.
Then you have to find why its slow, why dont you try to create an Index.
There are two way you can obtain the output
From the Querly Analyzer Menu:

Query==> Results in Grid or Results in Text


Results in Grid:
The output will show after the sql statement is executed.
Results in Text:
Will start show data as soon as start executing

Also try to index the table.





Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top