solaris 11 nwam static ip

based on nickebo.net


root@solaris:~# ifconfig -a
 lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
 inet 127.0.0.1 netmask ff000000
 net0: flags=100001004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,PHYSRUNNING> mtu 1500 index 2
 inet 192.168.1.15 netmask ffffff00 broadcast 192.168.1.255
 ether d8:d3:85:af:80:6d
 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
 inet6 ::1/128
 net0: flags=120002004841<UP,RUNNING,MULTICAST,DHCP,IPv6,PHYSRUNNING> mtu 1500 index 2
 inet6 fe80::dad3:85ff:feaf:806d/10
 ether d8:d3:85:af:80:6d

see that net0 assigned IP by DHCP

root@solaris:~# netcfg
netcfg> create ncp tib
 netcfg:ncp:tib> create ncu phys net0
 Created ncu 'net0'.  Walking properties ...
 activation-mode (manual) [manual|prioritized]> prioritized
 priority-group> 0
 priority-mode [exclusive|shared|all]> shared
 mac-address>
 autopush>
 mtu>
 netcfg:ncp:tib:ncu:net0> end
 Committed changes
 netcfg:ncp:tib> create ncu ip net0
 Created ncu 'net0'.  Walking properties ...
 ip-version (ipv4,ipv6) [ipv4|ipv6]> ipv4
 ipv4-addrsrc [dhcp|static]> static
 ipv4-addr> 192.168.1.2
 ipv4-default-route> 192.168.1.1
 netcfg:ncp:tib:ncu:net0> end
 Committed changes
root@solaris:~# netadm list -x
 TYPE        PROFILE        STATE          AUXILIARY STATE
 ncp         Automatic      online         active
 ncu:phys    net0           online         interface/link is up
 ncu:ip      net0           online         interface/link is up
 ncp         DefaultFixed   disabled       disabled by administrator
 ncp         tib            disabled       disabled by administrator
 loc         Automatic      online         active
 loc         NoNet          offline        conditions for activation are unmet
 loc         DefaultFixed   offline        conditions for activation are unmet

root@solaris:~# netadm enable -p ncp tib
 Enabling ncp 'tib'

ssh connection lost…..

create new and:

root@solaris:~# ifconfig -a
 lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
 inet 127.0.0.1 netmask ff000000
 net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
 inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
 ether d8:d3:85:af:80:6d
 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
 inet6 ::1/128

also great post by insanum with more theory and practice

solaris load balancing

1. Integrated Load Balancer Overview

2. ILB High-Availability Configuration (Active-Passive Mode Only)

3. Integrated Load Balancer

4. How to Set Up a Load-Balanced Application Across Two Oracle Solaris Zones

5. ILB Terminology

6. Oracle Solaris Integrated Load Balancer in 60 Minutes [HOL10181] from Oracle OpenWorld

7. Deploying the Oracle Solaris Integrated Load Balancer in 60 Minutes Hands-On Labs of the System Admin and Developer Community of OTN

Solaris 11.1 on SPARC T4-1…forget root’s password

Our T4-1 just returned from our customer tests…and root’s password on OS was changed…and the right guy, who could know that password was on compensatory holiday..

OS reinstallation was not the right way because of some usfull distros on that machine. And because this not the right way for the true samurai :)

So, the plan for the game  – “http://docs.oracle.com/cd/E26502_01/html/E28983/gkkvi.html#glvgr – How to Boot From Media to Resolve an Unknown root Password”.

Also “http://docs.oracle.com/cd/E22985_01/html/E22986/z40002fe1298584.html – Display the ok Prompt”.

1. connect to console (SER MGT – 9600 baud, 8 bits, no parity, 1 stop bit, no handshake)
2. set /HOST/bootmode script=”setenv auto-boot? false”
3. start /SYS
4. start /HOST/console
5. insert cdrom with solaris 11.1 text installation
6. {0}ok boot cdrom
7. choose Shell (3)
8. zpool import -f rpool
9. mkdir /a
10. beadm list (remember R marked, solaris-1 in my case)
11. beadm mount solaris-1 /a
12. TERM=vt100
export TERM
13. vi /a/etc/shadow
14. remove password (root:blahblahblah::::: – clean out ‘blahblahblah’)
15. bootadm update-archive -R /a
16. beadm umount solaris-1
17. halt
18. {0}ok boot -s
19. username – root, and press enter instead of typing password
20. passwd -r files root
21. init 6

Bingo!

PS. In case logging in to OS without the right root’s password:

type: #.

set /HOST send_break_action=break
start /HOST/console

 

x forwarding

by www.snapdba.com

user@myhost:~$ echo export DISPLAY=$DISPLAY
export DISPLAY=localhost:12.0
user@myhost:~$ echo xauth add `xauth list ${DISPLAY#localhost}`
xauth add solaris/unix:12 MIT-MAGIC-COOKIE-1 cabf673c00f742955ea2d9d13f4e00b9
user@myhost:~$ su - oracle
Password: 
Oracle Corporation      SunOS 5.11      11.1    June 2013
oracle@myhost:~$ export DISPLAY=localhost:12.0
oracle@myhost:~$ xauth add solaris/unix:12 MIT-MAGIC-COOKIE-1 cabf673c00f742955ea2d9d13f4e00b9
oracle@myhost:~$ xlogo

transportable tablespaces with rman incremental backups

based on Incrementally Updating Transportable Tablespaces using RMAN by Saravanan Shanmugam, Senior Architect, The Hartford

1. enable block change tracking:

alter database enable block change tracking using file ‘/u02/oradata/flash_recovery_area/block_change_file_orcl’;

select filename, status, bytes from v$block_change_tracking;

(alter database disable block chage tracking; – to disable)

2. on dest database:

create public database link orcl using ‘orcl’;

3. source database still online (and movable tablespace in read write state)

backup as copy tag “tbs to go” tablespace orcldata format ‘/u02/oradata2/orcl2/orcldata.dbf’;

4. for rolling forward:

run {
    allocate channel d1 device type disk format ‘/u02/oradata2/orcl2/orcldata%t.dbf’;
    backup incremental level 1 tag “tbs to go” for recover of copy with tag “tbs to go” tablespace orcldata;
    recover copy of tablespace orcldata with TAG “tbs to go”;
}

5. to plug in moved tablespace:

on source database:

alter tablespace orcldata read only;

run {
    allocate channel d1 device type disk format ‘/u02/oradata2/orcl2/orcldata%t.dbf’;
    backup incremental level 1 tag “tbs to go” for recover of copy with tag “tbs to go” tablespace orcldata;
    recover copy of tablespace orcldata with TAG “tbs to go”;
}

on dest database:

impdp system/manager directory=data_pump_dir network_link=orcl transport_tablespaces=orcldata transport_full_check=n transport_datafiles=’/u02/oradata2/orcl2/orcldata.dbf’

6. to roll forward already plugged tablespace:

drop tablespace orcldata including contents;

but beware OMF. With OMF ‘drop tablespace xxx including contents’ delete datafiles from disk