

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# STV\$1SESSIONS
STV\$1SESSIONS

Use the STV\$1SESSIONS table to view information about the active user sessions for Amazon Redshift.

To view the session history, use the [STL\$1SESSIONS](r_STL_SESSIONS.md) table, rather than STV\$1SESSIONS.

STV\$1SESSIONS is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see [Visibility of data in system tables and views](cm_chap_system-tables.md#c_visibility-of-data).

Some or all of the data in this table can also be found in the SYS monitoring view [SYS\$1SESSION\$1HISTORY](SYS_SESSION_HISTORY.md). The data in the SYS monitoring view is formatted to be easier to use and understand. We recommend that you use the SYS monitoring view for your queries.

## Table columns
Table columns

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/redshift/latest/dg/r_STV_SESSIONS.html)

## Sample queries
Sample queries

To perform a quick check to see if any other users are currently logged into Amazon Redshift, type the following query:

```
select count(*)
from stv_sessions;
```

If the result is greater than one, then at least one other user is currently logged in to the database.

To view all active sessions for Amazon Redshift, type the following query:

```
select *
from stv_sessions;
```

The following result shows four active sessions running on Amazon Redshift:

```
       starttime         | process |user_name                   | db_name                    | timeout_sec
-------------------------+---------+----------------------------+----------------------------+-------------
  2018-08-06 08:44:07.50 |   13779 | IAMA:aws_admin:admin_grp   | dev                        | 0
  2008-08-06 08:54:20.50 |   19829 | dwuser                     | dev                        | 120
  2008-08-06 08:56:34.50 |   20279 | dwuser                     | dev                        | 120
  2008-08-06 08:55:00.50 |   19996 | dwuser                     | tickit                     | 0
(3 rows)
```

The user name prefixed with IAMA indicates that the user signed on using federated single sign-on. For more information, see [Using IAM authentication to generate database user credentials](https://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html).