ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
How can I know what query is executing by by a particural 
user? (using sp id  or any othe way.)
 Question Submitted By :: Sridhar Sahoo
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How can I know what query is executing by by a particural user? (using sp id or any othe way.)
Answer
# 1
DBCC INputbuffer(spid)- Displays the last statement sent
from a client to an instance of Microsoft SQL Server 2005.

First 256 characters only will be displayed.


SQL statements can also be captured by running a profiler.
 
Is This Answer Correct ?    2 Yes 1 No
Prem
 
  Re: How can I know what query is executing by by a particural user? (using sp id or any othe way.)
Answer
# 2
SELECT *
FROM Master.dbo.sysprocesses 
WHERE DBID NOT IN (1,2,3,4) -- Master, Tempdb, Model, MSDB
AND spid > 50
ORDER BY spid DESC
 
Is This Answer Correct ?    1 Yes 0 No
Suvendu
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is the role that is required for killing a process What is the role that is required for creating a linked server IBM1
Can we call SP inside a query? Wipro4
How to Run a Query on a Remote SQL Server?  2
What is the difference between 2-Tier architecture and 3-Tier architecture Oracle11
What are the magic tables in SQL Server 2000? Infogain5
select empid empname from employee What is the result for the about query?  4
what are batch in sql server? Satyam2
What is bit datatype and what's the information that can be stored inside a bit column?  1
Difference between Function and Stored Procedure? C1-India4
I need a query that retrieves info from an Oracle table and a query that retrieves info from a SQL Server table. The info has to be joined together according to Record ID numbers. I have very limited access to the Oracle database but full control of the SQL Server database.How do I join two different queries from two different databases?  1
what is the out put of below queries? a. select * from Emp where null = null; b. select * from Emp where 1=1; Patni9
What is the difference between a stored procedure and a user defined function in sql server? Millennium2
There is table like Events...in that name ,startdate ,enddate,location are the column names write a stored Procedure for this table to get events by Months "GetEventsByMonths"  1
Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan? HCL2
how to count datewise data in sqlserver IndusInd-Bank3
what is the difference between group and having give an example with query and sample output  2
how to retrive only second row from table in sql server 2000? CTS7
how to delete duplicate rows from table in sql server HCL8
What are the different ways of moving data/databases between servers and databases in SQL Server? HCL2
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.  2
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com