Wednesday, August 14, 2013

netsh Command

# Add IP
netsh int ipv4 add address name="Local Area Connection 1" addr=10.114.1.35
 mask=255.255.255.240 skipassource=true

# List ip addresses
netsh int ipv4 show ipaddresses level=verbose

# Delete IP
netsh int ipv4 delete address "Local Area Connection 1" 10.114.1.35

Tuesday, August 6, 2013

rebuild em oracle

(MEIS) /export/home/oracle $ emca -config dbcontrol db -repos recreate

STARTED EMCA at Aug 6, 2013 11:22:20 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: MEIS
Listener port number: 1521
Listener ORACLE_HOME [ /data/oracle/product/11.2.0.2/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /data/oracle/product/11.2.0.2/dbhome_1

Local hostname ................ rman1
Listener ORACLE_HOME ................ /data/oracle/product/11.2.0.2/dbhome_1
Listener port number ................ 1521
Database SID ................ MEIS
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 6, 2013 11:22:50 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /data/oracle/cfgtoollogs/emca/MEIS/emca_
Aug 6, 2013 11:22:52 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Aug 6, 2013 11:24:49 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Aug 6, 2013 11:24:50 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Aug 6, 2013 11:30:10 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Aug 6, 2013 11:30:16 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepos                                                                                                                                                             itory
INFO: Uploading configuration data to EM repository (this may take a while) ...
Aug 6, 2013 11:31:16 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Aug 6, 2013 11:31:20 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Aug 6, 2013 11:31:29 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Aug 6, 2013 11:31:29 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Aug 6, 2013 11:31:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Aug 6, 2013 11:31:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://rman1:5500/em <<<<<<<<<<<
Aug 6, 2013 11:31:59 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /data/oracle/product/11.2.0.2/dbhome_1/rman1_MEIS/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Aug 6, 2013 11:31:59 AM
(MEIS) /export/home/oracle $


emca -deconfig dbcontrol db -repos drop
emca -config dbcontrol db -repos create

or

emca -deconfig dbcontrol db
emca -config dbcontrol db -repos recreate

Thursday, July 11, 2013

Install agent EMC on Solaris 10 (Sparc)

Install EMC Agent: 

pkgadd -d HostAgent-Solaris-32-sparc-en_US-1.1.0.1.0366-1.pkg

pkgadd -d NaviCLI-Solaris-32-sparc-en_US-7.31.0.3.66-1.pkg
select l *

  
Edit Agent File:

vi agentID.txt
add
host
ip


ex:
nidadb.nida.ac.th
202.44.72.223

restart agent

/etc/init.d/agent stop
/etc/init.d/agent start


Install EMC PowerPath:

extact EMCPower.SOLARIS.5.3.P01.b009.tar

pkgadd -d .

install licence
cd /etc
emcpreg -add AAAA-BBBB-CCCC-DDDD-EEEE

./powercf -q  //verify device on host
./powermt config //verify device on host


set device policy as clariion open
=======================
powermt set policy=co dev=all
powermt save

Check HBA Port:

fcinfo hba-port

luxadm -e port

Wednesday, June 5, 2013

Hyper-V on ESXi5

- เปิด Service SSH ที่เครื่อง ESXi
echo ‘vhv.allow = “TRUE” ‘ >> /etc/vmware/config
- ติดตั้ง Windows 2012 ตามปกติ
- หลังจากติดตั้งเสร็จแล้วให้ไปแก้ไฟล์ .vmx ของ vmware guest ตัวที่เราติดตั้ง เช่น hyv-node-01.vmx
แก้บรรทัดคำสั่ง

    จาก guestOS = “Microsoft 2012″ หรือ ชื่ออื่น
    เป็น guestOS = “winhyperv”

เพิ่มบรรทัดคำสั่ง

    hypervisor.cpuid.v0 = FALSE

- สั่ง Power On Guest
- ติดตั้ง VMware Tools

credit:http://www.vmware.in.th/pumpith/vmware-%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-hyper-v-%E0%B8%9A%E0%B8%99-windows-2012-%E0%B9%83%E0%B8%99-esxi-5-1.html

Monday, June 3, 2013

awk + for shell

#!/bin/bash

ff=$(awk -F: '{print $1}' /etc/passwd | grep user )

for i in $ff ; do something in $i ; done

Get password from ORACLE local user

select dbms_metadata.get_ddl('USER', username) || '/' usercreate from dba_users where username like 'SCOTT';

select spare4 from user$ where name='SCOTT';

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout