Banner 9 clear Global, setGlobal variables
setGlobal (key, value);
removeGlobal (key);
Java, SpringBoot, React, Angular, Oracle, PL/SQL, Ellucian Banner, Puppet, Docker, Terraform technical notes
Tuesday, August 21, 2018
Oracle index hint syntax
Oracle index hint syntax
select /*+ index(customer cust_primary_key_idx) */ * from customer;
Also note that of you alias the table, you must use the alias in the index hint:
select /*+ index(c cust_primary_key_idx) */ * from customer c;
Also, be vary of issuing hints that conflict with an index hint. In this index hint example, the full hint is not consistent with an index hint:
select /*+ full(c) index(c cust_primary_key_idx) */ * from customer c;
Also note that of you alias the table, you must use the alias in the index hint:
select /*+ index(c cust_primary_key_idx) */ * from customer c;
Also, be vary of issuing hints that conflict with an index hint. In this index hint example, the full hint is not consistent with an index hint:
select /*+ full(c) index(c cust_primary_key_idx) */ * from customer c;
https://docs.oracle.com/cd/B19306_01/server.102/b14211/hintsref.htm#i8327
https://logicalread.com/using-index-hints-to-tune-oracle-performance-h01/#.W3zv984zbIU
Friday, August 17, 2018
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: null in Weblogic 10.3
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: null in Weblogic 10.3
1. Check DataSource xml It's in the domain's
1. Check DataSource xml It's in the domain's
config/jdbc directory.
2. Check DB Port
3. Check user=xxx in properties
4. Some times JRF template causing issue due to ojdbcdms.jar is loaded first
Solution: - remove JRF
- or exclude ojdbcdms.jar from CLASSPATH
- or Upgrade to Weblogic12c
Oracle PLSQL Cursor Duplicate of final Record
Oracle PLSQL Cursor Duplicate of final Record
loop
fetch s_cur into s_rec;
exit when s_cur%notfound;
dbms_output.put_line('id:'||s_rec.id||':name:'||s_rec.name);
end loop;
When you have fetched the last record and trying to fetch the next
s_cur%notfound
becomes true but before it has a chance to exit from loop you are outputting the last record once again.Wednesday, August 15, 2018
Connect Oracle DB remotely by sqlplus
How to Connect Oracle DB remotely by sqlplus
1. Update tnsnames.ora with Oracle server you want to connect
C:\Oracle\Middleware\Oracle_Home\network\admin\tnsnames.ora
ex
OraServer1=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 203.292.222.1)(PORT = 1521))
(LOAD_BALANCE = YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEV1
(FAILOVER_MODE =
(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)
)
)
)
2. Command line
sqlplus username/passs@OraServer1
1. Update tnsnames.ora with Oracle server you want to connect
C:\Oracle\Middleware\Oracle_Home\network\admin\tnsnames.ora
ex
OraServer1=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 203.292.222.1)(PORT = 1521))
(LOAD_BALANCE = YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEV1
(FAILOVER_MODE =
(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)
)
)
)
2. Command line
sqlplus username/passs@OraServer1
Thursday, August 9, 2018
How To Create Oracle ORDS REST webservice - APEX PLSQL
How To Create Oracle ORDS REST webservice - APEX PLSQL
- Schema: EMPLOYEE
- Module: restws
- Template: transfer
Enable ORDS Schema
BEGIN
ORDS.ENABLE_SCHEMA(
p_enabled => TRUE,
p_schema => 'EMPLOYEE',
p_url_mapping_type => 'BASE_PATH',
p_url_mapping_pattern => 'restws',
p_auto_rest_auth => FALSE);
END;
/
Create ORDs Module
BEGIN
ORDS.DEFINE_MODULE(
p_module_name => 'emp.v1',
p_base_path => '/emp.v1/',
p_items_per_page => 25,
p_status => 'PUBLISHED',
p_comments => NULL);
END;
/
Create ORDS Templates
BEGIN
ORDS.DEFINE_TEMPLATE(
p_module_name => 'emp.v1',
p_pattern => ‘create’,
p_priority => 0,
p_etag_type => 'HASH',
p_etag_query => NULL,
p_comments => NULL);
END;
Create ORDS Handler
BEGIN
ORDS.DEFINE_HANDLER(
p_module_name => 'emp.v1',
p_pattern => 'update',
p_method => 'POST',
p_source_type => 'plsql/block',
p_items_per_page => 0,
p_mimes_allowed => '',
p_comments => NULL,
p_source =>
'BEGIN
- call any plsql package or do insert/update .....
status := 'OK';
END;'
END;
/
Add Response Params
BEGIN
ORDS.DEFINE_PARAMETER(
p_module_name => 'asset.track.v1',
p_pattern => 'transfer',
p_method => 'POST',
p_name => 'X-APEX-STATUS-CODE', -- or any Name
p_bind_variable_name => 'status',
p_source_type => 'RESPONSE',
p_param_type => 'INT',
p_access_method => 'OUT',
p_comments => NULL);
END;/
Subscribe to:
Posts (Atom)
AWS how to delete VPC when it has error with Network interface , Gateway decencies
how to delete VPC when it has error with Network interface , Gateway decencies in AWS 1. Check if it is running on EC2 instance then Sto...
-
ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1525 ORA-29261: bad argument ORA-29273: HTTP request failed ...
-
Banner 9 Admin: Invalid Object Name fix do steps: A record in GUBOBJS with a UI Version of D. • Records in GURAOBJ to define the defau...
-
chown root $ORACLE_HOME/bin/extjob chmod 4750 $ORACLE_HOME/bin/extjob chown root $ORACLE_HOME/rdbms/admin/externaljob.ora chmod 640 $ORA...