Thursday, March 14, 2013

ESXi Update Patch

esxcli --server=vmd-04.nida.local --username=root software vib update --depot=/vmfs/volumes/EMC_DataStore/Patch/ESXi510-201303001.zip

resize fast_recovery_area & clear archive log using RMAN

Resize fast_recovery area
==================
$ sqlplus / as sysdba

SQL>archive log list;
SQL>show parameter db_recovery_file_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area
db_recovery_file_dest_size           big integer 8G

SQL> !du -ksh /u01/app/oracle/fast_recovery_area
  12G   /u01/app/oracle/c

SQL> alter system set db_recovery_file_dest_size=8G;
SQL> alter system switch logfile;


Clear Archive log used RMAN

=======================

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';

BACKUP FORMAT '/u02/rman_backup/%na_fullbackup_%U' TAG FULL_20130314 DATABASE PLUS ARCHIVELOG DELETE ALL INPUT;


Set Retention Policy
===============
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS ;

Tuesday, March 12, 2013

Enable-Mailbox used aSAMaccountName Exchange 2010

Used Exchange PowerShell

$mb = Get-User -OrganizationalUnit "domain.local/users" -RecipientTypeDetails User
$mb | Foreach{Enable-mailbox -Identity $_.Identity -Alias $_.sAMAccountName}

Monday, March 11, 2013

Delete Disconnect Mailbox in Exchange

Delete Disconnect Mailbox in Exchange

Get-MailboxStatistics -Database "Mailbox Database Name" | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid


copy MailboxGuid 

Remove-Mailbox -Database "Mailbox Database Name" -StoreMailboxIdentity MailboxGuid

Oracle application server 10

Os: solaris 10
Memory : 4G

Env:
User: oracle
Group: oinstall

Check memory
Prtconf | grep Mem

Create Project for install Oracle

Create Group


#groupadd oinstall
#groupadd dba
#groupadd oper

Create user

# useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle
# chown oracle:oinstall /export/home/oracle

Create Project

# projadd -U oracle -K "project.max-shm-memory=(priv,3g,deny)" user.oracle


Check Project Parameter

prctl -i project user.oracle
prctl -n project.max-shm-memory -i task `ps -o taskid= -p $$`

Edit Project Parameter

# projmod -sK "project.max-shm-memory=(priv,3g,deny)" user.oracle

Extract file

cpio –idmv < soa_Intel_Solaris_101310_disk1.cpio
cpio -idmv < soa_Intel_Solaris_101310_disk2.cpio

login to Console

./runInstaller

Error message

/export/home/oracle/sw/Disk1 $ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be 5.9 or 5.10.    Actual 5.10
                                      Passed

Checking Temp space: must be greater than 250 MB.   Actual 11513 MB    Passed
Checking swap space: must be greater than 1535 MB.   Actual 11929MB    Passed
Checking operating system packages: SUNWarc,SUNWbtool,SUNWhea,SUNWlibm,SUNWlibms,SUNWsprot,SUNWtoo,SUNWi1of,SUNWxwfnt,SUNWi1cs,SUNWi15cs    Failed <<<<
    >>> Package SUNWi1cs is missing
    >>> Package SUNWi15cs is missing
Checking monitor: must be configured to display at least 256 colors    Failed <<<<
    >>> Could not execute auto check for display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set.

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation, at which time they will be rechecked.

Continue? (y/n) [n]

Solve
pkgadd -d /cdrom/sol_10_910_x86/Solaris_10/Product SUNWi1cs SUNWi15cs

Oracle database 11g r2 Pre-Install on Solaris 10

User: oracle
Group: oinstall

Check memory
Prtconf | grep Mem

Create Group

#groupadd oinstall
#groupadd dba

Create user

# useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle
# chown oracle:oinstall /export/home/oracle

Create Project

# projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" user.oracle
# projmod -sK "project.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,100,deny)" user.oracle

Check Project Parameter

prctl -i project user.oracle
prctl -n project.max-sem-ids -i task `ps -o taskid= -p $$`

Edit Project Parameter

# projmod -sK "project.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,100,deny)" user.oracle

Config Kernel Parameter in ‘/etc/system’

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=300
set semsys:seminfo_semvmx=32767
set shmsys:seminfo_shmmax=2147483648
set shmsys:shminfo_shmmni=512
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmseg=150


Config Oracle env in ‘/export/home/oracle/.profile’

export PS1='($ORACLE_SID) $PWD $ '
export ORACLE_BASE=/u01/oracle
export ORACLE_OWNER=oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:/usr/openwin/bin:$ORACLE_HOME/bin:/usr/sbin:/usr/bin
export ORACLE_SID=EDCS1

Config Soft Limit $ Hard Limit in ‘/etc/system’
set max_nprocs=30000
set maxuprc=16384

ADD ndd config to '/etc/inittab'
tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 > /dev/console


Install oracle DB

./runinstall

script-CHGPassword

dsquery

dsquery user OU=TestOU,DC=test,DC=int
dsmod user "CN=test01,CN=Users,DC=test,DC=int" -pwd A1b2C3d4 -mustchpwd yes

dsquery to dsmod

dsquery user OU=TestOU,DC=test,DC=int | dsmod  user -pwd A1b2C3d4 -mustchpwd yes

Password file
for /f “eol= tokens=1 delims=” %i in (c:\users.txt) do dsmod user “%i” –pwd <password> -mustchpwd yes –pwdneverexpires no

for /f “eol= tokens=1 delims=” %i in (c:\users.txt) do echo "%i"

for /F "tokens=1,2,* delims=, " %i IN (c:\user.txt) DO @echo user is %i passsword %j

for /F "tokens=1,2,* delims=, " %i IN (c:\tko.cvs) DO @echo user is %i passsword %j



Changepasswd by text file (delimeter,)

for /F "tokens=1,2,* delims=, " %i IN (c:\user.txt) DO dsquery user OU=TestOU,DC=test,DC=int -samid %i | dsmod user CN=%i,OU=TestOU,DC=test,DC=int -pwd %j -mustchpwd yes

for /F "tokens=1,2 delims=," %i IN (c:\user.txt) DO dsquery user OU=TestOU,DC=test,DC=int -samid %i | dsmod user -pwd %j -mustchpwd yes -pwdneverexpires no

for /F "tokens=1,2 delims=," %i IN (c:\user.txt) DO dsquery user OU=TestOU,DC=test,DC=int -samid %i | dsmod user -pwdneverexpires yes

NetAPP halt command

Shutdown NetApp

- login to NetApp SP-1
- halt -f
- login to netApp SP-2
- halt -f
- wait 5 minute and then turn off Controller 's swich and Disk Shellf

Exchange Pre-Install Setup

Start windows powershell as administrator

Import-Module ServerManager

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

Set-Service NetTcpPortSharing -StartupType Automatic



Exchange admin privilege's user On Active Directory

schemas admin
enterprise admin

Netbackup Basic Comand

Netbackup Basic Comand
- nbemmcmd –getemmserver
- nbemmcmd –listhosts

Add ESXhost.local to host file ex. c:\windows\system\driver\etc\host

Delete credential host
- nbemmcmd –deletehost –machinename EXSHost.local –machinetype virtual_machine

Ghost device in VMware

To remove hidden and ghosted devices:
Click Start > Run, type cmd.exe, and click OK. The Command Prompt window opens.

Run this command:

    set devmgr_show_nonpresent_devices=1

Run this command to start Device Manager from this Command Prompt:

    devmgmt.msc

In Windows device manager

Click View > Show Hidden Devices.
Expand the Network Adapters tree.
Right-click the dimmed network adapter and click Uninstall.
Close the Device Manager.

ALCATEL 6900

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