About Me

My photo
I work for Fusion5 Australia . Connect with me on linked in here . I'm raising money for a good cause at the moment, follow donate to leukemia foundation

Thursday, 17 December 2009

same, same… but different

These scripts will allow you to build packages from the DEP812 environment.  If you don’t run these, you won’t see the correct enterprise server when you are defining a package from the DEP812 environment.  These will rename the entfries that need to be done.

These must be run against the JDEPlan812 DB.

update dbo.f98611 set omdatp = 'NEWSERVER - Logic'
where omdatp = 'OLDSERVER - Logic' ;

update dbo.f98611 set omdatp = 'NEWSERVER - RTE'
where omdatp = 'OLDSERVER - RTE' ;

update dbo.f98611 set omdatp = 'NEWSERVER - XAPI'
where omdatp = 'OLDSERVER - XAPI' ;

update dbo.f98611 set omdatb = 'NEWSERVER - 812 Server Map '
where omdatb = 'OLDSERVER - 812 Server Map ' ;

update dbo.f98611 set omsrvr = 'NEWSERVER' where omsrvr =
'OLDSERVER' ;

update dbo.f98611 set omdatp = 'NEWSERVER - 812 Server Map'
where omdatp = 'OLDSERVER - 812 Server Map' ;

update dbo.f98611 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

update dbo.f986101 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

update dbo.f986101 set omdatp = 'NEWSERVER - Logic'
where omdatp = 'OLDSERVER - Logic' ;

update dbo.f986101 set omdatp = 'NEWSERVER - RTE'
where omdatp = 'OLDSERVER - RTE' ;

update dbo.f986101 set omdatp = 'NEWSERVER - XAPI'
where omdatp = 'OLDSERVER - XAPI' ;

update dbo.f9650 set mmmkey = 'NEWSERVER' where mmmkey = 'OLDSERVER' ;

update dbo.f9650 set mmdatp = 'NEWSERVER - 812 Server Map'
where mmdatp = 'OLDSERVER - 812 Server Map' ;

update dbo.f9651 set mdmkey = 'NEWSERVER' where mdmkey =
'OLDSERVER' ;

Enterprise server rename, the works burger!

Here is a complete set of SQL for an enterprise server rename, well for me at least.  It takes the form of a PL/SQL block.  It does printers, job queues, OCM’s data sources, LDAP… the works!  Please enjoy (use at your own risk too btw!!!)

spool c:\shannon\sql\MachineRename_SY.txt 

SELECT ora_database_name from dual;

set time on
set echo on 
set flush on  
set feedback on
set timing on

--servermap

update svm812.f98611 set omsrvr = 'NEWSERVER' where omsrvr =
'OLDSERVER' ;

update svm812.f98611 set omdatp = 'NEWSERVER - 812 Server Map'
where omdatp = 'OLDSERVER - 812 Server Map' ;

update svm812.f98611 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

update svm812.f986101 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

--system

update sy812.f98611 set omdatp = 'NEWSERVER - Logic'
where omdatp = 'OLDSERVER - Logic' ;

update sy812.f98611 set omdatp = 'NEWSERVER - RTE'
where omdatp = 'OLDSERVER - RTE' ;

update sy812.f98611 set omdatp = 'NEWSERVER - XAPI'
where omdatp = 'OLDSERVER - XAPI' ;

update sy812.f98611 set omdatb = 'NEWSERVER - 812 Server Map '
where omdatb = 'OLDSERVER - 812 Server Map ' ;

update sy812.f98611 set omsrvr = 'NEWSERVER' where omsrvr =
'OLDSERVER' ;

update sy812.f98611 set omdatp = 'NEWSERVER - 812 Server Map'
where omdatp = 'OLDSERVER - 812 Server Map' ;

update sy812.f98611 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

update sy812.f986101 set omdatp = 'NEWSERVER'
where omdatp = 'OLDSERVER' ;

update sy812.f986101 set omdatp = 'NEWSERVER - Logic'
where omdatp = 'OLDSERVER - Logic' ;

update sy812.f986101 set omdatp = 'NEWSERVER - RTE'
where omdatp = 'OLDSERVER - RTE' ;

update sy812.f986101 set omdatp = 'NEWSERVER - XAPI'
where omdatp = 'OLDSERVER - XAPI' ;

update sy812.f9650 set mmmkey = 'NEWSERVER' where mmmkey = 'OLDSERVER' ;

update sy812.f9650 set mmdatp = 'NEWSERVER - 812 Server Map'
where mmdatp = 'OLDSERVER - 812 Server Map' ;

update sy812.f9651 set mdmkey = 'NEWSERVER' where mdmkey =
'OLDSERVER' ;

update sy812.f96511 set skmkey  = 'NEWSERVER' where skmkey =
'OLDSERVER' ;

--If you have LDAP enabled

update sy812.f00928 set lcentloc = 'NEWSERVER' where lcentloc = 'OLDSERVER' ;

update sy812.f00928 set lcentloc = 'NEWSERVER' where lcentloc = 'OLDSERVER' ;

--Printers

update sy812.f986167 set DPEXEHOST = 'NEWSERVER' where DPEXEHOST = 'OLDSERVER' ;

--Job Queues
update sy812.f986130 set qcexehost = 'NEWSERVER' where qcexehost = 'OLDSERVER' ;

spool off

Monday, 14 December 2009

Running Oracle SQL Scripts

Here are some commands at the top of the script that might make the auditors job much easier.

spool outputFile.txt  --creates a log of what you are doing

SELECT ora_database_name from dual;

set time on – show you the time the statement ran
set echo on  --echo the statement
set flush on   --does nothing
set feedback on – show variable substitutions
set timing on – show you how long the statement took to run

--Body of script goes here

spool off  --Derrrr, turns of the spooling

quit –- logs you out of SQL plus!

Thursday, 10 December 2009

UBEOverride vs runtimeCache dirs

UBEOverride has the values of data selection, sequencing and processing options for each job that is submitted to the server.  If the job finishes with ‘D’, the DIR and the ZIP file are deleted.

runtimeCache dir has the results of converting the full package relational database specs to TAMs for each UBE and UBE_VERSION combo.

The dir should only remain for the duration that the jobs runs.  If jobs end in ‘E’ the directory stays (8.98.1.1 AIX)

back to basics – string comparison

so, here are some questions…

is string “ XXXX” > “*    “ ?  NO, “*    “ is bigger

is string “ XXXX” > “*****” ? NO, “*****” is bigger

simple test in oracle is:

select 1 from dual where ' XXXX' > '*    '

if you see 1, it’s true.  If you see “no rows selected”, it’s false.

* has a ascii value of 42

<space> has a value of 32

a has a value of 97

You can tell the ascii value with ‘SELECT ASCII(‘*’) from DUAL ;  (note that those funny quotes will not work).

All of the above will help you with row security.

Friday, 4 December 2009

Is archive logging enabled?

select log_mode from v$database;

That’s it!