

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 Python UDF 將繼續正常運作至 2026 年 6 月 30 日。如需詳細資訊，請參閱[部落格文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# SYS\$1USERLOG
<a name="SYS_USERLOG"></a>

記錄資料庫使用者之下列變更的詳細資訊：
+ 建立使用者
+ 捨棄使用者
+ 更改使用者 (重新命名)
+ 更改使用者 (更改屬性)

您可以查詢此檢視，以查看有關無伺服器工作群組和已佈建叢集的資訊。

只有超級使用者才能看到 SYS\$1USERLOG。如需詳細資訊，請參閱[系統資料表和檢視中資料的可見性](cm_chap_system-tables.md#c_visibility-of-data)。

## 資料表欄
<a name="SYS_USERLOG-table-columns"></a>

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

## 範例查詢
<a name="SYS_USERLOG-sample-queries"></a>

下列範例會執行四個使用者動作，然後查詢 SYS\$1USERLOG 資料表。

```
CREATE USER userlog1 password 'Userlog1';
ALTER USER userlog1 createdb createuser;
ALTER USER userlog1 rename  to userlog2;
DROP user userlog2;

SELECT user_id, user_name, original_user_name, action, has_create_db_privs, is_superuser from SYS_USERLOG order by record_time desc;
```

```
user_id |  user_name | original_user_name |  action | has_create_db_privs | is_superuser
--------+------------+--------------------+---------+---------------------+------------
    108 |  userlog2  |                    | drop    |                   1 |   1
    108 |  userlog2  |     userlog1       | rename  |                   1 |   1
    108 |  userlog1  |                    | alter   |                   1 |   1
    108 |  userlog1  |                    | create  |                   0 |   0
 (4 rows)
```