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