Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL: Converting Oracle V$Session V$MyStat to MS SQL Server

241 views
Skip to first unread message

Paul August

unread,
Aug 1, 2003, 12:07:17 PM8/1/03
to
Hello,

We are using Delphi 6 with Oracle 8/9 and adding MS SQL Serving 2000 into
the mix.

How do I convert the following Session Information SQL from Oracle to MS SQL
Server?

select * from v$session where sid = (select sid from v$mystat where rownum =
1)

or

SELECT GA.PROCESS FROM G_AUDIT GA, V$SESSION VS WHERE (GA.PROCESS =
VS.PROCESS)

Is there a comparable table in MS SQL Server for v$session and v$mystat?

Thanks,

Paul August
Tip Technologies
Brookfield, WI


Carlos Fandango

unread,
Aug 4, 2003, 12:19:39 AM8/4/03
to
Can you try and explain what info you are trying to get? I know nothing
about Oracle but something about MSSQL.

-Carlos

"Paul August" <p...@tiptech.com> wrote in message
news:3f2a9035$1...@newsgroups.borland.com...

Eric Hill

unread,
Aug 4, 2003, 12:35:39 AM8/4/03
to
Oracle's V$ views are virtual tables that represent database engine data.
V$SESSION stores current database sessions (users). V$PROCESS stores Oracle
process information. You can query these views for many internal details.

What Paul is asking is how to get at the database internals of SQL Server.

My first guess would be that SQL Server doesn't have those types of
views/tables. Most of the performance information will probably be gathered
with the performance monitor.

Eric


Carlos Fandango

unread,
Aug 10, 2003, 3:29:14 AM8/10/03
to
Ok this makes sense.

sp_who2 is a good place to start as is sysprocesses. Also take a look in
Enterprise Manager at Current Activity, if this gives the info you want,
then switch on profiler and refresh the current activity node to see the
calls being made.

I think you need to add a (nolock) hint to one of the queries.

"Eric Hill" <er...@ijack.net> wrote in message
news:3f2de29e$1...@newsgroups.borland.com...

0 new messages