Sometimes it's useful to know your session id when you're working from Query Analyzer or oSQL. Then you can tell if you're blocking or being blocked, etc. Here is the code for finding that out-- in this example, I'm running this from oSQL:
C:\>osql -S MyServer -E
1> select @@spid
UPDATE: Also, there is a simple way to check this in SQL Query Analyzer: In the status bar at the bottom are listed the user name and session number in parentheses.