Oracle 11g ASM : FTP and HTTP Access September 28, 2008
Posted by setijoagus in Oracle Administration, oracle.Tags: ASM, http ftp, oracle
add a comment
###########################################
Oracle 11g ASM : FTP and HTTP Access
###########################################
1. run script catxdbdbca
[oracle@node1 ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@node1 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Sun Sep 28 14:52:18 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> @catxdbdbca 7787 8080;
SQL> exit;
2. test FTP Access
[oracle@node1 admin]$ ftp node1 7787
Connected to node1.localdomain.
220- node1
Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.
220 node1 FTP Server (Oracle XML DB/Oracle Database) ready.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (node1:oracle): system
331 pass required for SYSTEM
Password:
230 SYSTEM logged in
Remote system type is Unix.
ftp> ls
227 Entering Passive Mode (172,20,141,151,13,24)
150 ASCII Data Connection
drw-r–r– 2 SYS oracle 0 AUG 03 01:49 OLAP_XDS
drw-r–r– 2 SYS oracle 0 SEP 23 04:13 home
drw-r–r– 2 SYS oracle 0 AUG 03 02:15 images
drw-r–r– 2 SYS oracle 0 AUG 03 01:49 olap_data_security
drw-r–r– 2 SYS oracle 0 AUG 03 01:35 public
drw-r–r– 2 SYS oracle 0 SEP 23 04:13 sys
-rw-r–r– 1 SYS oracle 0 SEP 28 07:52 xdbconfig.xml
226 ASCII Transfer Complete
ftp> cd sys/asm/DATA1/NODE/DATAFILE
250 CWD Command successful
ftp> ls
227 Entering Passive Mode (172,20,141,151,232,90)
150 ASCII Data Connection
-rw-r–r– 1 SYS oracle 734011392 SEP 28 07:59 SYSTEM.256.666184225
-rw-r–r– 1 SYS oracle 750788608 SEP 28 07:59 SYSAUX.257.666184225
-rw-r–r– 1 SYS oracle 346038272 SEP 28 07:59 UNDOTBS1.258.666184225
-rw-r–r– 1 SYS oracle 5251072 SEP 28 07:59 USERS.259.666184225
-rw-r–r– 1 SYS oracle 104865792 SEP 28 07:59 EXAMPLE.267.666184357
-rw-r–r– 1 SYS oracle 262152192 SEP 28 07:59 UNDOTBS2.268.666184499
-rw-r–r– 1 SYS oracle 2105344 SEP 28 07:59 SENIN_TS.338.666201891
-rw-r–r– 1 SYS oracle 2105344 SEP 28 07:59 senin_ts01.dbf
-rw-r–r– 1 SYS oracle 356524032 SEP 28 07:59 SOE.326.666460349
-rw-r–r– 1 SYS oracle 356524032 SEP 28 07:59 soe.dbf
-rw-r–r– 1 SYS oracle 713039872 SEP 28 07:59 SOEINDEX.321.666460359
-rw-r–r– 1 SYS oracle 713039872 SEP 28 07:59 soeindex.dbf
226 ASCII Transfer Complete
ftp> bye
4. jika instance not running, apakah ftp / http bisa ?
[oracle@node1 admin]$ srvctl stOP database -d node
[oracle@node1 admin]$ srvctl status database -d node
Instance node1 is not running on node node1
Instance node2 is not running on node node2
[oracle@node1 admin]$ ftp node1 7787
ftp: connect: Connection refused
ftp> bye
[oracle@node1 admin]$ ORACLE_SID=node1; export ORACLE_SID
[oracle@node1 admin]$ sqlplus / as sysdba
SQL> startup;
SQL> exit
[oracle@node1 admin]$ ftp node1 7787
Connected to node1.localdomain.
220- node1
Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.
220 node1 FTP Server (Oracle XML DB/Oracle Database) ready.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (node1:oracle): system
331 pass required for SYSTEM
Password:
230 SYSTEM logged in
Remote system type is Unix.
ftp> bye
221 QUIT Goodbye.
Oracle 11g RAC – ASM : asmcmd September 28, 2008
Posted by setijoagus in Oracle Administration, oracle.Tags: ASM, asmcmd, oracle
add a comment
###########################################
Oracle 11g RAC – ASM : asmcmd
###########################################
1. mengaktifkan asmcmd, dengan mengaktifkan ORACLE_SID yang benar.
[oracle@node1 ~]$ ORACLE_SID=node1; export ORACLE_SID
[oracle@node1 ~]$ asmcmd
ASMCMD-08103: failed to connect to ASM; ASMCMD running in non-connected mode
ASMCMD> exit
[oracle@node1 ~]$ ORACLE_SID=+ASM1; export ORACLE_SID
[oracle@node1 ~]$ asmcmd
ASMCMD>
ASMCMD> exit
[oracle@node1 ~]$ asmcmd -v
asmcmd version 11.1.0.6.0
2. perintah – perintah di asmcmd (ASM Commands)
cd : Changes the current directory to the specified directory.
cp : Enables you to copy files between ASM disk groups on a local instance and remote instances.
du : Displays the total disk space occupied by ASM files in the specified ASM directory and all of its subdirectories, recursively.
exit : Exits ASMCMD.
find : Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
help : Displays the syntax and description of ASMCMD commands.
ls : Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.
lsct : Lists information about current ASM clients.
lsdg : Lists all disk groups and their attributes.
lsdsk : Lists disks visible to ASM.
md_backup : Creates a backup of all of the mounted disk groups.
md_restore : Restores disk groups from a backup.
mkalias : Creates an alias for system-generated filenames.
mkdir : Creates ASM directories.
pwd : Displays the path of the current ASM directory.
remap : Repairs a range of physical blocks on a disk.
rm : Deletes the specified ASM files or directories.
rmalias : Deletes the specified alias, retaining the file that the alias points to.
3. perintah dasar asmcmd yang sering digunakan
[oracle@node1 ~]$ asmcmd
ASMCMD> ls
DATA1/
DATA2/
DATA3/
DATA4/
ASMCMD> cd +DATA1/NODE
ASMCMD> pwd
+DATA1/NODE
ASMCMD> ls
AUTOBACKUP/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfilenode.ora
ASMCMD> exit
[oracle@node1 ~]$
4. menghitung kapasitas disk, dimana
Used_MB – This value does not include mirroring.
Mirror_used_MB – This value includes mirroring.
[oracle@node1 ~]$ asmcmd
ASMCMD> du +DATA1
Used_MB Mirror_used_MB
3829 3829
ASMCMD> du +DATA1/NODE/DATAFILE
Used_MB Mirror_used_MB
3135 3135
ASMCMD> du +DATA1/NODE/CONTROLFILE
Used_MB Mirror_used_MB
48 48
5. informasi asm lainnya
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group
node CONNECTED 11.1.0.6.0 11.1.0.0.0 node1 DATA1
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N 512 4096 1048576 51199 47276 0 47276 0 DATA1/
MOUNTED EXTERN N 512 4096 1048576 51199 51106 0 51106 0 DATA2/
MOUNTED EXTERN N 512 4096 1048576 51199 51106 0 51106 0 DATA3/
MOUNTED EXTERN N 512 4096 1048576 102398 102305 0 102305 0 DATA4/
ASMCMD> lsdsk
Path
/dev/oracleasm/disks/VOL1
/dev/oracleasm/disks/VOL2
/dev/oracleasm/disks/VOL3
/dev/oracleasm/disks/VOL_1
ASMCMD> exit
6. asmcmd tidak mengenal huruf besar / kecil
[oracle@node1 ~]$ asmcmd -p
ASMCMD [+] > ls -la
State Type Rebal Name
MOUNTED EXTERN N DATA1/
MOUNTED EXTERN N DATA2/
MOUNTED EXTERN N DATA3/
MOUNTED EXTERN N DATA4/
ASMCMD [+] > ls -la /data1/node/controlfile
Type Redund Striped Time Sys Name
CONTROLFILE UNPROT FINE SEP 27 09:00:00 Y none => Current.260.666184329
CONTROLFILE UNPROT FINE SEP 27 09:00:00 Y none => Current.261.666184329
ASMCMD [+] > exit

