LoginSignup
4
5

More than 5 years have passed since last update.

WindowsでOracle 11g xe shift jis dbを作成する手順メモ

Posted at

リスナーとデータベースを停止して,SIDを削除

C:\oraclexe\app\oracle\product\11.2.0\server\bin\CleanUp.bat

残骸のファイルを削除

cd C:\oraclexe\app\oracle\product\11.2.0\server\dbs
del *

環境変数ORALCE_HOMEを設定する

set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server
echo %ORACLE_HOME%

SJISデータベースを作成する

C:\oraclexe\app\oracle\product\11.2.0\server\bin
CreateDB.bat -dbchar JA16SJIS

Oracle起動確認

tasklist | find "oracle"

TNS Listner起動確認

tasklist | find "TNSLSNR.EXE"

TNS Listnerを起動する

cd %ORACLE_HOME%/bin
dir LSNRCTL.EXE
lsnrctl.exe start
tasklist | find "TNSLSNR.EXE"

systemユーザのパスワードを設定する

sqlplus /nolog
connect sys as sysdba
ALTER USER system IDENTIFIED BY manager;
exit
sqlplus system/manager@xe

存在しているユーザを確認

SQL> select username from dba_users;

変更後の文字コードを確認する

SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

新規ユーザ作成

sqlplus system/manager
SQL> 
CREATE USER doraemon IDENTIFIED BY "doraemonpassword" DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
grant CONNECT to doraemon;
grant RESOURCE to doraemon;
grant DBA to doraemon;
grant EXP_FULL_DATABASE to doraemon;
grant IMP_FULL_DATABASE to doraemon;
GRANT UNLIMITED TABLESPACE TO doraemon ;

dump インポート

C:\Windows\system32>imp doraemon/doraemonpassword file=C:\DBDUMP\dmpfile.DMP ignore=y LOG=imp.log full=y

4
5
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
4
5