LoginSignup
31
28

More than 5 years have passed since last update.

Oracle 11g XEのDBをShift JIS化する

Posted at

Oracle 11g XEのデフォルトの文字コードはUTF-8のため、Shift JISなDBのダンプを持ってくるとインポートできなくて死にます。
なのでDBの文字コードをShift JISに変更する必要がありますが、それにはDBを作り直す必要があります。

これは実は下のように createdb.sh というOracle XEにバンドルされているスクリプトを使うことで、わずか数ステップでShift JIS化できます。
(drop databaseは要らないかも。)

root@localhost # su - oracle
oracle@localhost $ sqlplus / as sysdba
SQL> shutdown immediate
SQL> startup restrict mount
SQL> drop database;
SQL> quit

oracle@localhost $ createdb.sh -dbchar JA16SJIS

おわり。

31
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
28