Friday, October 14, 2016

Create keystores for Weblogic 12C


To create keys issue the following commands:

keytool -genkey -keyalg RSA -alias aliasdemo -keystore alias_identity.jks -dname "CN=CEN-BI-DS-ODI01, OU=alias_demo, O=alias_demo, L=Mexico, ST=Mexico, C=MX" -storepass passW0rd -validity 3600 -keysize 2048 -keypass passW0rd
keytool -selfcert -v -alias alias_demo -keypass passW0rd -keystore alias_demo_identity.jks -storepass passW0rd -storetype jks -validity 3600
keytool -export -v -alias alias_demo -file "alias_demo.gob.mx-rootCA.der" -keystore alias_demo_identity.jks -storepass passW0rd
keytool -import -v -trustcacerts -alias alias_demo -file "alias_demo.gob.mx-rootCA.der" -keystore alias_demo_trust.jks -storepass passW0rd

Steps to deploy them in weblogic server
  • Identity Keystore: "/opt/oracle/keystore/alias_identity.jks"
  • Trust Keystore: "/opt/oracle/keystore/alias_trust.jks"
  • Alias: cenace
  • Store Password: passW0rd
  • Key Password: passW0rd
  • Valid for: 3600 Days (Approx 10 Years)
  • In the WebLogic Server Administration Console, click on "Servers" in the "Domain Structure" tree.
  • Click on the managed server you wish to configure.
  • Click on the "Configuration > Keystores" tab and sub-tab.
  • If you are running on production mode, click the "Lock & Edit" Button.
  • Click the "Change" button next to the "Keystores" setting.
  • Select the "Custom Identity and Custom Trust" option and click the "Save" button.
  • Enter the identity details. For example.

    • Custom Identity Keystore: /home/oracle/keystore/alias_identity.jks
    • Custom Identity Keystore Type: JKS
    • Custom Identity Keystore Passphrase: passW0rd
    • Confirm Custom Identity Keystore Passphrase: passW0rd
  • Enter the trust information. For example.

    • Custom Identity Keystore: /home/oracle/keystore/alias_trust.jks
    • Custom Identity Keystore Type: JKS
    • Custom Identity Keystore Passphrase: passW0rd
    • Confirm Custom Identity Keystore Passphrase: passW0rd
  • Click the "Save" button.
  • Click the "SSL" tab.
  • Enter the identity details. For example.

    • Private Key Alias: aliasdemo
    • Private Key Passphrase: passW0rd
    • Confirm Private Key Passphrase: passW0rd
  • Click the "Save" button.
  • If you are running in production mode, click the "Activate Changes" button.
=)

Tuesday, September 13, 2016

Replace corrupted undo tablespace SOA 10g


In certain cases, Oracle Products doesn't get corrupted, because bad stopping or something, this commands help us to change the undo and common tablespaces that fail commonly


In this case SOA doesn't start up because the undo tbs was currupted.

ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS2;

--Resize undo datafile
--ALTER DATABASE DATAFILE '/u01/oradata/soa/undotbs02.dbf' RESIZE 10000M;

--Create undo tablespace
--CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '/u01/oradata/soa/undotbs02.dbf' SIZE 1000M AUTOEXTEND ON;

--Drop undo tablespace
--drop tablespace UNDOTBS2;

select * from user_tablespaces;

--Drop undo tablespace including contents and datafiles
--DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES;

--Parameters
select * from  V$OPTION;


select
   file_name,
   bytes,
   autoextensible
from
   dba_data_files;

select * from
all_users;

select * from user_tablespaces;


SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS


ORABPEL


ALTER tablespace ORABPEL

alter tablespace ORABPEL add DATAFILE '/u01/oradata/soa/orabpe2.dbf' SIZE 5980M AUTOEXTEND ON NEXT 30M MAXSIZE UNLIMITED;

alter tablespace ORABPEL add DATAFILE '/u01/oradata/soa/orabpe3.dbf' SIZE 5980M AUTOEXTEND ON NEXT 30M MAXSIZE UNLIMITED;

alter tablespace ORABPEL add DATAFILE '/u01/oradata/soa/orabpe4.dbf' SIZE 5980M AUTOEXTEND ON NEXT 30M MAXSIZE UNLIMITED;

alter tablespace ORABPEL add DATAFILE '/u01/oradata/soa/orabpe5.dbf' SIZE 5980M AUTOEXTEND ON NEXT 30M MAXSIZE UNLIMITED;

alter TABLESPACE SYSAUX add DATAFILE  '/u01/oradata/soa/sysaux02.dbf' SIZE 550M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;

alter TABLESPACE SYSAUX add DATAFILE  '/u01/oradata/soa/sysaux03.dbf' SIZE 550M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;

CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '/u01/oradata/zucprod/undotbs02.dbf' SIZE 30000M AUTOEXTEND ON;

CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE
  '/u01/oradata/zucprod/undotbs01.dbf' SIZE 30000M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
ONLINE
RETENTION NOGUARANTEE
BLOCKSIZE 8K
FLASHBACK ON;


ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS2;

DROP TABLESPACE UNDOTBS2 INCLUDING CONTENTS AND DATAFILES;

UNDOTBS2

Friday, September 9, 2016

ODI 12c Loop PLSQL Procedure



Here's the procedure I commonly use to implement a odi loop in package.!

create or replace function sys.set_initial_data (P_TOKEN varchar2, P_VALUE varchar2, P_ROW_ID number, p_session number) return varchar2
is
PRAGMA AUTONOMOUS_TRANSACTION;

res varchar2(50);

cursor get_datap is
select *  from process_data_odi
where 1=1--status = (select case P_VALUE when 'ROW' THEN  'R' else 'P' end from  dual)
and status = 'P';
--and id_host = nvl(null,id_host);

vget_datap get_datap%rowtype;

cursor get_datap_id is
select *  from process_data_odi
where 1=1--status = (select case P_VALUE when 'ROW' THEN  'R' else 'P' end from  dual)
and id_host = nvl(P_ROW_ID,id_host);
--and status = 'P'

vget_datap_id  get_datap_id%rowtype;


begin

if p_token = 'INIT' then
delete from process_data_odi;
insert into process_data_odi
select p_session, id, 'P', null,IP, puerto from table_info_host;

commit;

return 'OK';
 
elsif p_token = 'GET' then


    open get_datap_id;
    fetch get_datap_id  into vget_datap_id;
    close get_datap_id;


  IF P_VALUE = 'PORT' then
    res := vget_datap_id.PUERTO;
  elsif P_VALUE = 'HOST' then
    res := vget_datap_id.HOST;
  elsif P_VALUE = 'ROW' then


open get_datap;
fetch get_datap into vget_datap;
close get_datap;


    res := vget_datap.ID_host;
 
  update process_data_odi set status = 'R'
  where id_host = vget_datap.ID_host;

  commit;  

  end if;

elsif p_token = 'SET' then

  update process_data_odi set status = 'T'
  where id_host = P_ROW_ID;

  commit;

return 'OK';

end if;

return nvl(RES,'ERR');
end;


SELECT *  FROM process_data_odi;

select set_initial_data('GET','PORT',2,1111) from dual;

select set_initial_data('GET','HOST',2,1111) from dual;

select set_initial_data('GET','ROW',null,1111) from dual;

select set_initial_data('SET',null,1,1111) from dual;

select set_initial_data('INIT',NULL,null,1111) from dual;

commit;

Thursday, August 4, 2016

Configure CDC ODI 12C with Reusable Mappings


1.- Identify the source and target locations
2.- Create your source model, and target model
3- In my case I created the CDC_Test model connected to a Database 11g XE Edition and my target is a Database 12c EE


Goldengate is a oracle product to syncronize legacy systems or databases using the log files, but is quite expensive, in this case we are going to see, how to do a sync between two systems using just ODI 12C,

Using CDC Simple  Mode:

1.- Create a Project and import JKM Oracle Simple



2.- Change de Model of CDC_Test to Simple



3.- Do the Reverse-Engineering for the tables to add to CDC, in this case the table I chose was SRC_CITY.

4.- Once you have the datastore in your data model, Now configure the CDC, right clic over the datastore SRC_CITY and Add to CDC.




5.- Add a subscriber, right clic over datastore and navigate to subscriber, Add subscriber


6.- Add the subscriber SUNOPSIS




7.- Start Journal, select the subscriber, then session is prompted to start, clic ok.
Note:
The steps to undo this are (Unsubscribe, Drop  Journal, Remove from  CDC)

8.- So far, we have configured the basic CDC Simple, let's remember this is intrusive, because it creates triggers over the source tables and may affect the performance, so check carefully.

9- Test




10.- Now let's do this automatically using a package, mapping (ODI Interface in ODI 11G) and reusable mapping

11.- Create a Reusable Mapping, just drag the source table (The one you just added to CDC, see above), and also drag an output signature and do the mapping.

12.- Create a mapping in ODI and drag the reusable mapping created in the last step.

13.- Drag the target table and do the mapping.
14.- Choose the Optimization context to Development
15.- Configure the Journalize Data (select CheckBox)
16.- In the Logical Section change the target to  Incremental Update
17.- In the Physical, select the target TRG_CITY, and in the section Integrated Knowledge Module change to IKM Oracle Incremental Update

Look like this:


18.- Create a package to automatize this.
19.- Drag a OdiWaitForLogData component

OdiWaitForLogData "-CONTEXT=DEVELOPMENT" "-GLOBAL_ROWCOUNT=1" "-LSCHEMA=GG_SOURCE" "-OPTIMIZED_WAIT=AUTO" "-POLLINT=1000" "-SUBSCRIBER_NAME=SUNOPSIS" "-TIMEOUT=0" "-TIMEOUT_WITH_ROWS_OK=YES" "-TABLE_NAME=SRC_CITY"

20.- Drag the interface into the package and make a connection to the OdiWaitForLogData and viceversa

21.- Test the package.

SELECT * FROM SALES_DATA.SRC_city;
SELECT count(*) FROM SALES_DATA.SRC_city;
SELECT * FROM SALES_DATA.SRC_city;
delete from SALES_DATA.SRC_city where city_id = 100;
commit;
insert into SALES_DATA.SRC_city values (100,'Acapulco',20,123456);
commit;

Wednesday, July 27, 2016

Install and configure Admin Tool with OBIEE 12C - IAAS Cloud


First of all you need to install the client required, the file:

Setup_BI_Client_12.2.1.0.0_Windows.X64

you can download it en the oracle web page, or e-delivery.

http://download.oracle.com/otn/nt/bi/1221/Setup_BI_Client_12.2.1.0.0_Windows.X64.zip

once you have installed, we proceed to configure it in order to allow connection,

we need first, configure tnsnames.ora.

1.- Navigate to C:\Oracle\Middleware\Oracle_Home\network\admin
(if the folder doesn't exist create it)

2.- Create file tnsnames.ora pointing out to the database you want to connect.

example:

# tnsnames.ora Network Configuration File mntopc_dataproduct12.1.0db_1networkadmintnsnames.ora
# Generated by Oracle configuration tools.

CLOUDCDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = db_private)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cloudcdb1)
    )
  )

CLOUDCDB1_PDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = db_private)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdborcl)
    )
  )

3.- Configure DNS System Entries

The port 9514







4.- Select the tables as you desire and build your model

Tuesday, July 26, 2016

Linux IAAS, Usefull commands

One you have attached a volume here you have usefull commands:

Disk information:

lsblk
blkid

Mount: sudo mount /dev/xvdc /mnt/opc_data

Format : sudo mkfs -t ext3 /dev/xvdc

Install if needed:
sudo yum install e4fsprogs

Create folder if needed:
sudo mkdir /mnt/opc_data

mount as default:
vi /etc/fstab

add following line:
/dev/xvdc               /mnt/opc_data        ext3    defaults        0 0

Change user and group one command:
sudo chown opc:opc opc_data/

Check if process is on startup:
chkconfig --list | grep vncserver
"vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off"

install vncserver if not installed:
yum install tigervnc-server

Put vncserver on startup:
sudo chkconfig vncserver on

Configure vncserver once installed (modify according your settings)
cat  /etc/sysconfig/vncservers

VNCSERVERS="2:opc 3:oracle"
VNCSERVERARGS[2]="-geometry 1280x1024 -nolisten tcp -localhost"
VNCSERVERARGS[3]="-geometry 1280x1024"

Restart Service

sudo service vncserver start
sudo service vncserver stop


sudo service vncserver status

Use vncpasswd to change password users
vncpasswd opc

If you don't have xterm install it
sudo yum install xterm

Enable X11Forwarding
sudo vi /etc/ssh/sshd_config

Restart sshd
sudo /etc/init.d/sshd restart

With operative systems with no graphic interface, but you want enable vncserver:

gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false
vncserver :3 -depth 16 -alwaysshared -geometry 1200x1024 -s off

sudo yum install xorg-x11-twm
sudo yum install xterm
sudo yum install xsetroot
sudo yum install xorg-x11-apps

Add LC_ALL=en_US; export LC_ALL=en_US in .bashrc or in .bash_profile 

sudo yum install liberation-sans-fonts

same procedure as vncserver

search text in files recursively in a folders and subfolders:
grep -rl 'windows' ./ | xargs sed -i 's/windows/linux/g'

grep -rnw . -e 172.28.88.111 --exclude-dir={*.out,*.log}
grep -rnw . -e 172.28.88.111 --exclude={*.out*,*.log*}

using escape character: 
grep -rl '/opt/oracle/obiee/user_projects' ./ | xargs sed -i 's/\/opt\/oracle\/obiee\/user_projects/\/opt\/oracle\/admin\/user_projects/g'

Create aliases .bash_aliases file, Example:
alias startobi='sh $ORACLE_BI_HOME/bitools/bin/start.sh'
alias stopobi='sh $ORACLE_BI_HOME/bitools/bin/stop.sh'

Disable firewall
systemctl disable firewalld.

.bash_profile example

Sometimes, operative systems users don't come with bash profile file, here you have an example of
this file and common environment variables in a Oracle installation.


# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=cbaf0b
export ORACLE_UNQNAME=cloudcdb1
export ORACLE_BASE=/mnt/opc_data
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=cloudcdb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export JAVA_HOME=/usr/java/jdk1.8.0_91
export JRE_HOME=/usr/java/jdk1.8.0_91/jre
export JDK_HOME=/usr/java/jdk1.8.0_91

export PATH=$JAVA_HOME/bin:$PATH

Cyaaa !!

Install OBIEE 12c IAAS Oracle Cloud


Step  1: Java

bash-4.1$ sudo rpm -Uvh jdk-8u91-linux-x64.rpm
Preparing...  ########################################### [100%]

jdk1.8.0_91 ########################################### [100%]

Step  2: Install Infra










To fix this error:

sudo yum install gcc-4.4*

sudo yum install glibc-devel-2*


Step 3: Create the repositories

cd /mnt/opc_data/Middleware/obiee12c/oracle_common/bin
./rcu

Step  4: Configure domain

Change location to and execute config.sh

/mnt/opc_data/Oracle/Middleware/bi/bin













Then you will be able to access Bi system:






Create Windows VM on Oracle Cloud Compute

  1. Log in to Oracle Cloud Marketplace at https://cloud.oracle.com/marketplace/faces/homePage.jspx.
  2. From the Products drop-down list, select Infrastructure (IaaS), and then select Compute Cloud.
  3. Enter the name of the image that you want to use in the Search bar at the top of the page and click Go.
  4. The search results are displayed.
  5. Select the image that you want to use by clicking it.
  6. You’re directed to a page with more information for the selected image.
  7. Click Get App.
  8. Accept the terms of use and click Next
  9. If you see a message asking you to enable permission settings by clicking Preferences in your Oracle Compute Cloud Service account, follow the instructions to enable the setting. Then return to Oracle Cloud Marketplace and click Get App for your image again.
  10. Select the required account from the drop-down list and click Next.
  11. Review the information on the Review screen and click Submit Request.
  12. You’ll receive an email notification confirming that your application has been installed.
  13. On the Confirmation screen, after your request is confirmed, to create an instance, click Start Compute Console.
  14. The Create Instance wizard starts.

This app requires Oracle Compute Cloud Service . Also, to install this app, you must be a service administrator for your Oracle Compute Cloud Service.

We can't continue with the installation because we can't verify that you have the Oracle Cloud services required for this app.

To give us permission to verify your services: 
  1. 1.Sign in to the My Services application.
  2. 2.Click Preferences at the top of the page.
  3. 3.Select the Permission Settings check box.
Once this option is set, we can verify that your Oracle Cloud services meet the requirements for any app you choose to install.

After you set the option, sign in to Oracle Cloud Marketplace, find the app you wanted to install, and click Get App to restart the process.







Tuesday, May 17, 2016

Install APEX 4.2 in OLS 6


Helo guys, Now we are going to install APEX 4.02  in OLS 6

There are two ways to install it.

1.- When you have install the database with this option.
2.- When you don't.

Here we are going to use the first option.

The database:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options

1.- Locate the database home, in my case:

/u01/app/oracle/product/12c/db_1

2.- Search if you have de apex folder

[oracle@alexdb db_1]$ ls
addnode      dbs            javavm   odbc         precomp       sqlpatch
apex         dc_ocm         jdbc     olap         QOpatch       sqlplus
assistants   deinstall      jdk      OPatch       R             srvm
bin          demo           jlib     opmn         racg          suptools
ccr          diagnostics    ldap     oracore      rdbms         sysman
cdata        dmu            lib      oraInst.loc  relnotes      ucp
cfgtoollogs  dv             log      ord          rest          usm
clone        has            md       oui          root.sh       utl
crs          hs             mgw      owm          scheduler     wwg
css          install        network  perl         slax          xdk
ctx          instantclient  nls      plsql        sqldeveloper

If you don't have it, you must download it from:

http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

3.- Run script 
@apex_epg_config.sql /u01/app/oracle/product/12c/db_1

4.- Run script
@apxconf.sql

Voilá!


Notes:
Please be sure you have this users unlocked and not expired: Example: If EXPIRED - Change password for following users : ANONYMOUS,XDB,APEX_PUBLIC_USER
,FLOWS_FILES,APEX_040200.
IF LOCKED - Unlock: ALTER USER ANONYMOUS ACCOUNT UNLOCK; ALTER USER XDB ACCOUNT UNLOCK; ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER FLOWS_FILES ACCOUNT UNLOCK; ALTER USER APEX_040200 ACCOUNT UNLOCK; SQL > ALTER USER ANONYMOUS IDENTIFIED BY anonymous; SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK; SQL> ALTER USER XDB IDENTIFIED BY xdb; SQL> ALTER USER XDB ACCOUNT UNLOCK;
That's because APEX is going to prompt you about XDB Credentials if something is wrong

=)


Monday, May 16, 2016

Enlarge a Virtual Disk in VirtualBox VDI

If you have a Virtual Machine and you have created it with fixed size, but in some cases the size you gave it a space less than you need, that's why you have to enlarge it.

The big picture steps:

Enter the path where you have installed your Vbox (Windows in my case)

cd C:\Program Files\Oracle\VirtualBox

Issue this command:

VBoxManage modifyhd "C:\Users\Alejandro\VirtualBox VMs\OL6.6_em12c_db\OL6.6.vdi" --resize 51200

Once you have done that, start your virtual machine (linux in my case)


with root issue this command:

Let's add the space to existing virtual disk

fdisk /dev/sda
- Options n,p,3

"Command (m for help): n

Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (5608-6527, default 5608):
Using default value 5608
Last cylinder, +cylinders or +size{K,M,G} (5608-6527, default 6527):
Using default value 6527"



Change the partition type to "Linux LVM". In this case, the sequence of entries was, "t, 3, 8e".
8e, its the code of LVM
0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      41  PPC PReP Boot   85  Linux extended  c7  Syrinx         
 5  Extended        42  SFS             86  NTFS volume set da  Non-FS data    
 6  FAT16           4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS       4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility   
 8  AIX             4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    50  OnTrack DM      93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       52  CP/M            9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs        
 e  W95 FAT16 (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  GPT            
 f  W95 Ext'd (LBA) 55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 61  SpeedStor       a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    64  Novell Netware  af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 65  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  70  DiskSecure Mult b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 75  PC/IX           bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 80  Old Minix       be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Write the changes typing w
[root@alexdb ~]# reboot

Add space to LVM partition:

pvcreate /dev/sda3
vgdisplay
vgextend vg_alexdb /dev/sda3
lvdisplay | grep "LV Path"
vgdisplay vg_alexdb| grep Free

lvextend --size +7.04G --resizefs /dev/vg_alexdb/lv_root
or (In come cases you got an error about extend, then use the next sentence)
lvextend --extents +2559 --resizefs  /dev/vg_alexdb/lv_root
df -h (You will get your new space)

Monday, March 14, 2016

Password Recovery of Weblogic 11g


1. Navegate to:
    cd $DOMAIN_HOME/bin

2. Set the environment
    . setDomainEnv.sh

3. Change the directory
    cd $DOMAIN_HOME\security

4. Backup the file
    mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit_old.ldift

5. Create user and password for AdminServer
    java weblogic.security.utils.AdminAccount NewUser NewPasswor .

6. Edit boot.properties with the data new

7. Rename or Delete the next directory
    $DOMAIN_HOME\server\AdminServer\data\ldap

8. Start AdminServer