Thursday, June 12, 2014

Transport TableSpace oracle 11g

Transport Tablespace Solaris SPARC to Solaris x86-64 cross endian
=================================================================

AVSREG @SPARC
======
EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('AVSREG', TRUE);
EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('NIDAREG', TRUE);
EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('VNTQF', TRUE);
EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('USERS', TRUE);


SELECT * FROM TRANSPORT_SET_VIOLATIONS; check violation


CREATE DIRECTORY mig AS '/data6/move/';
GRANT READ, WRITE ON DIRECTORY mig TO SYSTEM;


ALTER TABLESPACE AVSREG READ WRITE ;
ALTER TABLESPACE NIDAREG READ WRITE ;
ALTER TABLESPACE VNTQF READ WRITE ;
ALTER TABLESPACE USERS READ WRITE ;



expdp system/123456 DUMPFILE=AVSREG-ALL-META.dmp DIRECTORY=mig FULL=Y INCLUDE=USER,ROLE,ROLE_GRANT,PROFILE CONTENT=METADATA_ONLY LOGFILE=AVSREG-ALL-META.log
expdp system/123456 DUMPFILE=TS-AVSREG_NIDAREG_VNTQF_USERS.dmp DIRECTORY=mig TRANSPORT_TABLESPACES=AVSREG,NIDAREG,VNTQF,USERS TRANSPORT_FULL_CHECK=Y LOGFILE=TS-AVSREG_NIDAREG_VNTQF_USERS.log


CONVERT TABLESPACE AVSREG,NIDAREG,VNTQF,USERS
TO PLATFORM 'Solaris Operating System (x86-64)'
FORMAT '/data6/move/%U';

================================================================================================================================
AVSREG @'Solaris Operating System (x86-64)'


SELECT d.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;

data_D-NIDAREG_I-102677175_TS-AVSREG_FNO-5_ptpal3ld
data_D-NIDAREG_I-102677175_TS-NIDAREG_FNO-6_q0pal563
data_D-NIDAREG_I-102677175_TS-USERS_FNO-4_pvpal4sh
data_D-NIDAREG_I-102677175_TS-VNTQF_FNO-8_pupal4r3


CONVERT DATAFILE '/data/NIDAREG/data_D-NIDAREG_I-102677175_TS-AVSREG_FNO-5_ptpal3ld'
FORMAT '/data/NIDAREG/AVSREG01.DBF';

CONVERT DATAFILE '/data/NIDAREG/data_D-NIDAREG_I-102677175_TS-NIDAREG_FNO-6_q0pal563'
FORMAT '/data/NIDAREG/NIDAREG01.DBF';

CONVERT DATAFILE '/data/NIDAREG/data_D-NIDAREG_I-102677175_TS-USERS_FNO-4_pvpal4sh'
FORMAT '/data/NIDAREG/USERS001.DBF';

CONVERT DATAFILE '/data/NIDAREG/data_D-NIDAREG_I-102677175_TS-VNTQF_FNO-8_pupal4r3'
FORMAT '/data/NIDAREG/VNTQF01.DBF';


CREATE DIRECTORY migration AS '/data/mig/';
GRANT READ,WRITE ON DIRECTORY migration TO SYSTEM;

create temp Tablespace + set default Tablespace
drop tablespace users including contents;

impdp system/123456 DIRECTORY=migration DUMPFILE=AVSREG-ALL-META.dmp FULL=Y LOGFILE=AVSREG-ALL-META.log
impdp system/123456 DIRECTORY=migration DUMPFILE=TS-AVSREG_NIDAREG_VNTQF_USERS.dmp TRANSPORT_DATAFILES=/data/NIDAREG/AVSREG01.DBF,/data/NIDAREG/NIDAREG01.DBF,/data/NIDAREG/USERS001.DBF,/data/NIDAREG/VNTQF01.DBF logfile=TS-AVSREG_NIDAREG_VNTQF_USERS.log
 

/oracle/admin/NIDAREG/dpdump



ALTER TABLESPACE BMSTBS READ WRITE;
ALTER TABLESPACE USERS READ WRITE;


http://www.oracle-base.com/articles/misc/transportable-tablespaces.php

Thursday, May 29, 2014

Remove Disk on Solaris 10

remove disk Solaris 10
- unmount disk
- cfgadm -al ; for check medadata
- cfgadm -c unconfigure c0::dsk/c0t1d0
- devfsadm -Cv

Thursday, May 22, 2014

Remote Shutdown Windows

net use \\%a\$IPC password /USER:administrator
shutdown -m \\%a -s -f -t 0

Thursday, April 17, 2014

Solaris10 & X-manager

# svccfg
svc:> select cde-login
svc:/application/graphical-login/cde-login> listprop arg
dtlogin/args astring
svc:/application/graphical-login/cde-login> setprop dtlogin/args=astring:" -udpPort 177"
svc:/application/graphical-login/cde-login> quit
# svcadm restart cde-login
# ps -ef |grep dtlogin
root 25145 23150 0 06:22:50 pts/1 0:00 grep dtlogin
root 24997 1 0 06:22:01 ? 0:00 /usr/dt/bin/dtlogin -daemon -udpPort 177

Friday, March 21, 2014

Create Batch file as Windows Services

- Download Windows Server 2003 Resource Kit Tools @http://www.microsoft.com/en-us/download/details.aspx?id=17657

- Create Service
    sc create ServiceName binPath= 'path_to_binary' DisplayName= 'Name_of_Servies' start= auto

- Create Parameters on Regedit
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName

- Create Key name 'Parameters'

- Add String Value 'Application' for binary file (Full path)

- go to Services.msc

- on 'Log on' tab check box 'Allow service to interact with desktop'

Saturday, February 1, 2014

IMAP-Cyrus

# service cyrus-imapd stop
# su - cyrus
$ cd /usr/lib/cyrus-imapd
$ ./ctl_cyrusdb -r
$ exit
# service cyrus-imapd start

Thursday, December 12, 2013

convert cert.pfx to cer , key

Extract crt and key

openssl pkcs12 -in domain.pfx -clcerts -nokeys -out domain.crt
openssl pkcs12 -in domain.pfx -nocerts -nodes  -out domain.key 
openssl pkcs12 -in domain.pfx -out domain-ca.crt -nodes -nokeys -cacerts


Created pfx file from crt and key 

openssl pkcs12 -export -out nokey-domain.pfx -inkey domain.key -in domain.crt 


ALCATEL 6900

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