Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 I need some help.... I cannot execute any query fr

Author  Topic 

acunajm
Starting Member

4 Posts

Posted - 2007-07-27 : 16:01:40
Hi all,

I need some help.... I cannot execute any query from sql 2005, when I try to execute a query it stays executing and I never receive any result set. I uninstalled and re installed again SQL 2005 in my computer and also I installed the Service Pack and I am still getting the same. Could you please help me or advice on this situation?

Thanks in advance,

Mauricio.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-27 : 16:05:59
1) Where are the queries stored?
2) Are you running ad-hoc queries?
3) Are you trying to run stored procedures?
4) Do you have permission to run the stored procedures?
5) What do the queries look like?
6) How are you running the queries?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-27 : 16:10:29
Also see
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=385981



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

acunajm
Starting Member

4 Posts

Posted - 2007-07-27 : 16:25:39
In fact with any query, for example if I run Select 1 or Select getdate().......,I got the same thing. For example if I try to get the resultset or return all rows from the graphical interface (rigth click----> Open Table...) I do not have problems I receive the resultset but, If I tried to write a Select statement I have the problem so, I do not have problems with the connection I am connected to the server. I do not why it does not work when I try to execute a Select.....
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-27 : 16:38:33
So what is the error?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-27 : 16:41:52
I'm not a member of sqlservercentral.com, so I get Access Denied when viewing that page, so this may have already been asked over there...

Is there an open trasaction on the table you are querying that is blocking you from running your queries? Check sp_who2 for blocks.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

acunajm
Starting Member

4 Posts

Posted - 2007-07-27 : 16:51:25
I do not receive any error message, when I execute for example a SELECT 1, it stays executing, executing, executing..... and I do not receive any result set. In this case is a simple query I just have to receive a 1 but I do not receive anything.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-27 : 17:00:23
You won't receive an error if someone is blocking you. You'll see the same thing as what you are seeing.]

So did you run sp_who2 in another query window to see if blocking is occurring? You need to do this at the same time where your query appears to be hung. You'll need two query windows.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-27 : 17:01:35
Also, please don't send email to us directly asking for help. Those who want to respond will do so here.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

acunajm
Starting Member

4 Posts

Posted - 2007-07-27 : 17:11:21
I tried to do what you sugested, I executed a Selec1 and the sp_who2 but both of the are in Executing, executing executing status...
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-27 : 17:31:00
Run SQL Profiler to determine what is going on. Also run Performance Monitor to check for hardware bottlenecks.

I suspect you have a long-running query that is using a ton of locks and memory. You could restart the SQL Server service to kill the connection, but then it might take a while to recover the database at startup if it has to rollback a lot of information. I've seen it take a few hours to startup before.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -