Pular para o conteúdo principal

Postagens

Assign Backup Policy for Boot and Block Volumes - OCI

To get Availability Domain oci iam availability-domain list  #!/bin/bash OCI_AD="hQsi:SA-SAOPAULO-1-AD-1" OCI_COMPARTMENT="ocid1.compartment.oc1..aaaaaaaavgyjpoffz5qliieawamjaksfb6juxejurtduclqjkvv66ookcxja" #Get Silver policy ocid funct_get_policy(){ OCI_POL_OCID=$(oci bv volume-backup-policy list | jq -r '.data[] | select(."display-name"|contains("silver"))' | jq -r '.id') } funct_boot_vol (){ #Create a file with all boot volume ocid oci bv boot-volume list --availability-domain ${OCI_AD} -c  ${OCI_COMPARTMENT} | jq -r '.data[].id' > boot-vol.txt while IFS="" read -r p || [ -n "$p" ] do   printf 'Seeting backup policy for %s\n' "$p"   oci bv volume-backup-policy-assignment create  --asset-id  $p  --policy-id ${OCI_POL_OCID} done < boot-vol.txt } funct_block_vol (){ #Create a file with all block volume ocid oci bv volume list  -c ${OCI_COMPARTMENT} | jq -r '.data[].id' ...

How to Disable WebLogic Server Diagnostic Framework (WLDF)

[weblogic@yourhost ]$ cd $MW_HOME/oracle_common/common/bin/ [weblogic@yourhost bin]$ ./wlst.sh Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> connect('weblogic','password','t3://host_ip:port') Connecting to t3://xx.xx.xx.xx:7001 with userid weblogic ... Successfully connected to Admin Server "AdminServer" that belongs to domain "WeblogicDomain". Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead. wls:/WeblogiDomain/serverConfig/> edit() Location changed to edit tree. This is a writable tree with DomainMBean as the root. To make changes you will need to start an edit session via startEdit(). For more help, use help('edit'). wls:/WeblogiDomain/edit/> startEdit() Starting an edit session ... Started edit session, be sure...

Changing profile Java Color Scheme through plsql

sqlplus apps/apps set serveroutput on DECLARE BEGIN         dbms_output.disable;         dbms_output.enable(100000);         stat := FND_PROFILE.SAVE('FND_COLOR_SCHEME', 'OLIVE', 'SITE');         IF stat THEN                 dbms_output.put_line( 'Stat = TRUE - profile updated' );         ELSE                 dbms_output.put_line( 'Stat = FALSE - profile NOT updated' );         END IF;         commit; END; / Below, some values that you can use: BLUE KHAKI OLIVE PURPLE RED SWAN TEAL TITANIUM 

Recompile JSP EBS - R12.2

1. Backup $ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/ $ mv _pages _pages_old 2. Stop services cd $ADMIN_SCCRIPTS_HOME ./adapcctl.sh stop ./admanagedsrvctl.sh stop oafm_server1 ./admanagedsrvctl.sh stop oacore_server1 3. Compile the jsps manually  cd $FND_TOP/patch/115/bin/ perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p             4. Checking $ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages $ ls -ltr  5. Start services cd $ADMIN_SCCRIPTS_HOME ./admanagedsrvctl.sh start oacore_server1 ./admanagedsrvctl.sh start oafm_server1 ./adapcctl.sh start 6. Clear your web browser cache

Changing EBS Profile using PL/SQL

 DECLARE    stat   BOOLEAN; BEGIN    DBMS_OUTPUT.DISABLE;    DBMS_OUTPUT.ENABLE (100000);    stat := fnd_profile.SAVE ('SITENAME', 'VALOR DESEJADO', 'SITE');    IF stat    THEN       DBMS_OUTPUT.put_line ('Stat = TRUE - profile updated');    ELSE       DBMS_OUTPUT.put_line ('Stat = FALSE - profile NOT updated');    END IF;    COMMIT; END;

How-to decrypt password from boot.properties

Script: import os import weblogic.security.internal.SerializedSystemIni import weblogic.security.internal.encryption.ClearOrEncryptedService   def decryptString(domainPath, encryptedString):     es = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domainPath)     ces = weblogic.security.internal.encryption.ClearOrEncryptedService(es)     decryptedString = ces.decrypt(encryptedString)     print "=" * 40     print " " * 10 +"Decrypted Password:" + decryptedString     print "=" * 40   try:     os.system('clear')     if len(sys.argv) == 3:         decryptString(sys.argv[1], sys.argv[2])     else:         print "=" * 40         print "INVALID ARGUMENTS"         print "Usage: java weblogic.WLST %s <ABSOLUTE DOMAIN_HOME PATH> <ENCRYPTED_PASSWORD>" %sys.argv[0]       ...

Running SQL Tuning Advisor Manually

  DECLARE   l_sql_tune_task_id  VARCHAR2(100); BEGIN   l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (                           sql_id      => '6x2xfudxngmmj',                           scope       => DBMS_SQLTUNE.scope_comprehensive,                           time_limit  => 1200,                           task_name   => '6x2xfudxngmmj_AWR_tuning_task',                           description => 'Tuning task for query 6x2xfudxngmmj in AWR.');   DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id); END; / begin  DBMS_SQLTUNE.execute_tuning_task(task_name ...

Oracle Database 20c preview version available for virtual machine DB systems

Oracle Database 20c preview version available for virtual machine DB systems Services :  Database Release Date : Feb. 14, 2020 You can now provision a virtual machine DB system with Oracle 20c preview version software to do development and application testing. Preview version software is limited to virtual machine systems using the Fast Provisioning option (which uses Logical Volume Manager for storage management). For more information, see  Oracle Database Preview Version Availability . You must use Logical Volume Manage to show the 20c version option:

Oracle Data Modeler and SQL Developer: change user interface (GUI) language

Oracle Data Modeler and Oracle SQL Developer does not allow to change the user interface language in “Options” or somewhere else in the GUI. This applies to the versions: Oracle SQL Developer Data Modeler - Version All and later (18.2.0 in my case) Oracle SQL Developer - Version 3.2 and later However, it’s possible switch to other language, changing datamodeler\ide\bin\ide.conf configuration file. The following lines should be added to the file for support English: AddVMOption -Duser.language=en AddVMOption -Duser.country=US Restart application! SQL Developer and Data Modeler supports the following languages: French(fr), German(de), Italian(it), Spanish(es), Brazilian Portuguese(pt BR), Japanese(ja), Korean(ko), Simplified Chinese(zh CN), Traditional Chinese(zh TW).

Webcenter Content - Increase Number of SDATA Sections when using OracleTextSearch

About SDATA Oracle UCM uses the SDATA section feature in Oracle Text to index important text, date, and integer fields and define them as Optimized Fields. The SDATA section is a separate XML structure managed by the Oracle Text engine that allows the engine to respond rapidly to requests involving data and integer ranges. Content Server can have up to 32 Optimized Fields, which includes data, integer, standard Content Server fields like dInDate, dOutDate, and fields selected to be optimized. All Optimized Fields are SDATA fields, which by default include dDocName, dDocTitle, dDocType, and dSecurityGroup. Source: https://docs.oracle.com/cd/E21043_01/doc.1111/e10792/c05_search001.htm Configuration for Database: For database version > 11.2.0.4 can already have more than 32 sections, does not need to be configured. For database version is Oracle 11.2.0.3.0: Apply the Oracle 11.2.0.4.0 Patch Set: See Note:1562139.1 "11.2.0.4 Patch Set - Availability and Known Issues...

OHS 12c noprompt password when stop/start component

cd $OHS_DOMAIN/bin $ ./stopComponent.sh ohs1 Stopping System Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from /u01/oracle/domains/ohs_domain Please enter your password : password Connecting to Node Manager ... Successfully Connected to Node Manager. Killing server ohs1 ... Successfully killed server ohs1 Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done $ OHS_HOME/oracle_common/common/bin $ wlst.sh readDomain('/u01/oracle/domains/ohs_domain') ohs_domain>cd('/SecurityConfiguration/ohs_domain') set('NodeManagerUsername','weblogic') set('NodeManagerPasswordEncrypted','password') updateDomain() closeDomain() exit() $ ./startComponent.sh ohs1  Starting system Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welco...

Basic Script to Restart OHS instance

Execution: $OHS_HOME/oracle_common/common/bin/ ./wlst.sh restart_OHS.py Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Connecting to Node Manager ... Successfully Connected to Node Manager. Restarting server ohs1 ... Successfully restarted server ohs1 Exiting WebLogic Scripting Tool. Script: cat restart_OHS.py nmConnect('weblogic','password','localhost','5557','ohs_domain','/u01/oracle/domains/ohs_domain','ssl') nmSoftRestart(serverName='ohs1', serverType='OHS') exit() Enjoy!

Change Nodemanager Port from OHS Standalone installation using WLST

[oracle@hostname bin]$ cd $OHS_HOME/oracle_common/common/bin [oracle@hostname bin]$ ./wlst.sh Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> readDomain('/u01/oracle/domains/ohs_domain') wls:/offline/ohs_domain> cd('/Machines/localmachine/NodeManager/localmachine') If you have questions about the structure, you can query using the ls () command. wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine> set('ListenPort',5057) wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine> updateDomain() wls:/offline/ohs_domain/Machine/localmachine/NodeManager/localmachine> closeDomain() wls:/offline>exit() Exiting WebLogic Scripting Tool. Reference:  https://docs.oracle.com/middleware/1221/webtier/administer-ohs/getstart.htm#HSADM12040

Webcenter Content - Jython to Checkin Content with Attachments (CHECKIN_NEW_WITH_RENDITIONS)

In the last few days, i had to load a content that, by its requirements, needs to attach files to the content. My first alternative would be Batch Loading, however for the bacth loder file it was not possible because it does not actually support the rendition service. With the next option, i tried to use the IdcCommand, but still had many problems, such as errors below: sample hda file: [oracle @ hostname bin] $ cat idctst.txt @Properties LocalData IdcService = EDIT_RENDITIONS dID = 37020 renditionKeys = addRendition0 addRendition0.name = test543 addRendition0.action = edit addRendition0.file = test.txt addRendition0.file: path = / u01 / oracle / domains / content_domain / ucm / cs / vault / ~ temp / test.txt @end << EOD >> Executing: [oracle @ hostname bin] $ ./IdcCommand -f idctst.txt -u sysadmin -l log.log -c server Error: Java HotSpot (TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated a...

Webcenter Content - Error Viewing Document with Annotations in WCC UI

Problem: New Chekin file: Make Annotations: Reopen File: Error Log: intradoc.common.ServiceException: !csErrorAccessingForDownload,OWCCDEV12C034609-page1.png         at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2259)         at intradoc.server.Service.buildServiceException(Service.java:2432)         at intradoc.server.Service.createServiceExceptionEx(Service.java:2426)         at intradoc.server.Service.createServiceException(Service.java:2421)         at intradoc.server.ServiceHttpImplementor.handleUploadException(ServiceHttpImplementor.java:2633)         at intradoc.server.ServiceHttpImplementor.sendStreamResponse(ServiceHttpImplementor.java:2559)         at intradoc.server.Service.doResponse(Service.java:2195)         at intradoc.server.FileServ...

Webcenter Content - IAU:IAU-6012: Unable to determine the audit log directory. No log directory specified

Warning Message: [oracle@host bin]$ ./BatchLoader -console -q -n/u01/oracle/domains/content_domain/ucm/cs/bin/test.txt Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release >system/6       09.06 15:39:05.045      main    Configuring tracing verbose: false; sections: system >system/6       09.06 15:39:05.045      main    Configuring tracing verbose: false; Services: Sep 06, 2017 3:39:10 PM oracle.security.jps.JpsStartup start INFO: Jps initializing. Sep 06, 2017 3:39:19 PM oracle.security.jps.JpsStartup start INFO: Jps started. Sep 06, 2017 3:39:19 PM oracle.security.audit.Auditor init WARNING: IAU:IAU-6012: Unable to determine the audit log directory. No log directory specified. Sep 06, 2017 3:39:19 PM oracle.security.jps.util.JpsUtil disableAudit INFO: JpsUtil: isAuditDisabled...