November 4, 2011 at 4:26 am
Hi All,
Below was an interview question 🙂
Suppose there are 4 instances in a server.
How can we find a particular process id belong to which instance ?.
Thanks in advance.
Smith.
November 4, 2011 at 4:29 am
As in the windows process ID? Errorlog.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 4, 2011 at 4:37 am
One more way is to use the serverproperty functions with the input 'ProcessID'
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 4, 2011 at 4:59 am
Thanks Gila. Infact I happend to say "SP_Who2" 🙂
One more way is to use the serverproperty functions with the input 'ProcessID'
can you pls give me the proper command ?. Sorry... I know I should have googled..
Thanks,
Smith.
November 4, 2011 at 5:16 am
would they be asking you to use a DMV like sys.dm_exec_sessionsto get the column host_process_id?
I think that would require querying all four instances, right?
for example, ran Windows Task Manager and noted the PID for my SQL Server Management studio (at the time the # was 3460)
Then i ran either of these two queries, and for each Query window that was connected to that server instance, i found my process id:
select host_process_id,* from sys.dm_exec_sessions--one match for each query window i had open on that server...
select hostprocess, * from sys.sysprocesses --one match for each query window i had open on that server...
Lowell
November 4, 2011 at 5:26 am
Joy Smith San (11/4/2011)
can you pls give me the proper command ?. Sorry... I know I should have googled..
Are you looking for the SQL process ID that connections to SQL have, or the windows process ID that the SQL process has? If the former, your answer. If the latter, I already told you (as did Adi)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 6, 2011 at 3:34 pm
to find the Windows process id for an instance of SQL Server you can also use SQL Server configuration manager 😎
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 8, 2011 at 3:01 pm
Joy Smith San (11/4/2011)
Hi All,Below was an interview question 🙂
Suppose there are 4 instances in a server.
How can we find a particular process id belong to which instance ?.
Thanks in advance.
Smith.
You could also log into the server, open task manager, and go to the services tab...
Jared
Jared
CE - Microsoft
November 8, 2011 at 11:28 pm
You could also log into the server, open task manager, and go to the services tab...Jared
Windows task manager you mean. ? I am not able to find "services tab" there.
Thanks.
November 9, 2011 at 12:38 am
Joy Smith San (11/8/2011)
You could also log into the server, open task manager, and go to the services tab...Jared
Windows task manager you mean. ? I am not able to find "services tab" there.
Thanks.
PFA screenshot. 😉
November 9, 2011 at 7:47 am
Dev @ +91 973 913 6683 (11/9/2011)
Joy Smith San (11/8/2011)
You could also log into the server, open task manager, and go to the services tab...Jared
Windows task manager you mean. ? I am not able to find "services tab" there.
Thanks.
PFA screenshot. 😉
Hopefully the screenshot helps you find it. You may then have to change the column view to show the PID, if it is not already there.
Thanks,
Jared
Jared
CE - Microsoft
November 9, 2011 at 9:57 am
. Thanks.
It's not there in my PC. reason may be bcose we r in client's network.
With limited rights.
Thanks again.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply