1. ホーム
  2. データベース
  3. デービーツー

DB2 現在のユーザーモードを表示し、ユーザーを切り替える方法

2022-01-19 11:38:16

1. データベースに接続する: db2 connect to study

2. 2. 現在のユーザースキーマを問い合わせる: select current schema from sysibm.sysdummy1 or select current schema from sysibm.dual

3.ユーザースキーマの切り替え:set current schema toms

4. ユーザーの切り替え: db2 connect to cpsdb user Administrator using 111111

5. 5. 他のユーザに権限を与える: db2 grant dbadm on database to user odsuser

6. 現在のユーザーの権限を表示する: db2 get authorizations