ゴミのブログ

ここにブログの説明を書く

oracle18c

18cインストール

インストール中system用パスワード設定(仮にPassword01)

 

ログイン後パスが通っていることを確認

 

sqlplus system/Password01

ログイン

 

ここでユーザーを作ろうとすると

「ORA-65096:共通ユーザーまたはロール名が無効です」

 

alter session set container=xepdb1;

コンテナデータベースではユーザーが作れないので勝手に作られるプラガブルデータベースに移動

 

sqlplus system/Password@localhost:1521/xepdb1

接続時にプラガブルデータベースに接続する場合はこっち

 

sqlplus / as sysdba

パスワード忘れたときのOS認証はこれ

 

alter profile default limit password_life_time unlimited;

ログイン後パスワード期限を無効(まずこれをやる)

 

※パスワードの大文字小文字区別無効を今までしていたがoracle12c以降ではORA-01017エラーが発生し全てのユーザーがロックアウトする(OS認証では可能)のでやめた

 

create user tanaka
identified by tanaka
default tablespace users
temporary tablespace temp;

ユーザー(tanaka/tanaka)作成

テーブルスペースとテンポラリスペースは既にあるものを適当に作る

 

grant dba to tanaka;

grant connect to tanaka;

ユーザー(tanaka/tanaka)に権限渡す

 

以下コマンドプロンプト

CD C:\tanaka

imp tanaka/tanaka file=tanaka.dmp full=y

dmpファイルをフルインポート