Categories
DATABASE

[memo] docker : wnameless/oracle-xe-11g , create database tsdb steps

docker run \
  --name ora11xe -d \
  -p 49160:22 \
  -p 49161:1521 \
  -v //mnt/data:/data \
  -v /etc/localtime:/etc/localtime:ro \
  -e ORACLE_ALLOW_REMOTE=true \
  wnameless/oracle-xe-11g

Categories
DATABASE JOB

在 gentoo 裝 oracle sqlplus package

5a7d294f8002b7cbcefa422e9598e2cf

去 Oracle 那邊 download
05a6575d78ea1ec511646bd57e002b71

那個 instantclient-sqlplus-linux32-11.1.0.7.zip
放到 /usr/portage/distfiles

下 emerge -av dev-db/oracle-instantclient-sqlplus

Categories
DATABASE

筆記 oracle sqlplus 連線 不用 tnsname 檔案的方法 / syntax

sqlplus account/password@172.25.0.18x/service_name

sqlplus sys/password@172.30.0.48/oradb as sysdba

sqlplus /nolog

conn account/password@172.25.0.18x/service_name

Categories
DATABASE JOB

Oracle 小筆記

— Create sequence
create sequence TEST_SQ
minvalue 1
maxvalue 9999999999
start with 21
increment by 1
cache 20;

select test_sq.nextval from dual
select test_sq.currval from dual

https://172.20.10.6:5500/em/console/logon/logon
https://172.20.10.6:5500/em/console/aboutApplication

sqlplus sysman/sysman
sqlplus sysman/oracle
sqlplus system@”(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DB1)))”
lsnrctl status
sqlplus /nolog

emctl status
emctl start dbconsole
emctl stop dbconsole

/etc/init.d/vmware-tools status
/etc/init.d/vmware-tools

lsnrctl start

[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 – Production on Tue Sep 30 01:46:26 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

SQL> conn / as sysdba
Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 314572800 bytes
Fixed Size 1267236 bytes
Variable Size 180357596 bytes
Database Buffers 130023424 bytes
Redo Buffers 2924544 bytes
Database mounted.
Database opened.

conn / as sysdba
shutdown immediate

emctl start dbconsole

Oracle Enterprise Manager
https://localhost:5500/em/console/aboutApplication

sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 – Production on Wed Oct 1 18:50:04 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn scott/password@db1