Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Migrate oracle home from one server to other server

User_OP3N8May 16 2017 — edited May 18 2017

Hi All,

Can you please advise how to migrate oracle home (11g,12c) in solaris 10 in server 1 to server 2 which is solaris 11?

Thanks,

Vinoth Kumar.M

This post has been answered by Shaik on May 16 2017
Jump to Answer

Comments

Frank Kulash
Hi, Mennan,

You can nest REGEXP_SUBSTR withing REGEXP_REPLACE to get the n-th occurrence, like this:
SELECT	lst
, 	REGEXP_REPLACE ( REGEXP_SUBSTR ( lst
		       		       , 'name:[^#]*#lastname'
				       , 1
				       , n
				       )
		       , 'name:(.*)#lastname'
		       , '\1'
		       ) 	AS nm 
If the pattern occurs fewer than n times, the expression above returns NULL.
Solomon Yakobson
Assuming string is always a set of name and last name:
with t as (
           select 'name:ali#lastname:kemal#name:mehmet#lastname:cemal' str from dual
          )
select  regexp_replace(regexp_substr('#' || str,'#name:[^#]*',1,level),'^#name:') name
  from  t
  connect by level <= length(regexp_replace('#' || str,'[^#]')) / 2
/

NAME
--------
ali
mehmet

SQL> 
SY.
Aketi Jyuuzou
I like recusrive with clause B-)
And in this case,6th parameter of RegExp_SubStr is really useful ;-)
col extStr for a20

with work(Val) as(
select 'name:ali#lastname:kemal#name:mehmet#lastname:cemal'
from dual),
rec(Val,extStr,LV) as(
select Val,
RegExp_SubStr(Val,'(^|#)name:([^#]+)',1,1,null,2),1
  from work
union all
select Val,
RegExp_SubStr(Val,'(^|#)name:([^#]+)',1,LV+1,null,2),LV+1
  from rec
 where RegExp_Count(Val,'(^|#)name:[^#]+') >= LV+1)
select extStr from rec;

EXTSTR
-------
ali
mehmet
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 15 2017
Added on May 16 2017
7 comments
1,042 views