Feed aggregator

Pooled timeout with 19c

Tom Kyte - 2 hours 7 min ago
I am facing issue of "Pooled connection request timed out" when I upgraded database to 19c and moved the application to cloud(TAS) from VM. There is no fixed scenario when this happens. No code changes has been done except replacing DataAccess.dll to ManagedDataAccess.dll. SGA is set to 2GB. TAS memory is 2GB. Could you suggest me what configurations has to be setup or checked to support pooling, as I am developer and can delegate the same to DBA to have such configurations on database
Categories: DBA Blogs

MY_WALLET_DIRECTORY in TNSNAMES not working as expected

Tom Kyte - 2 hours 7 min ago
Hello Chris/Connor, I am trying to use the option MY_WALLET_DIRECTORY in TNSNAMES file in order to avoid having to specify WALLET_LOCATION in SQLNET.ORA file. However, it fails with ORA-01017: invalid username/password; logon denied error. Tracing the SQLNET (from client side) reveals that it never attempts to access wallet when specified as MY_WALLET_DIRECTORY but works fine when used conventionally (as WALLET_LOCATION in SQLNET.ORA file). Can you please help me figure out how to get this working? In MOS note <b>The Impact of the Sqlnet Settings on Database Security (sqlnet.ora Security Parameters and Wallet Location) (Doc ID 1240824.1)</b>, it appears to mention that using MY_WALLET_DIRECTORY is supported (excerpt below) <code>#8. Client settings. OCI Clients are using the same sqlnet.ora and wallet settings as the database server. However, a very good hint to use, when multiple wallets should be used by the same client and using multiple TNS_ADMIN environment variables can become a real pain (one example would be when using ODP.NET applications requiring multiple SSL certificates to logon to multiple services, especially on application servers), then this could be easily solved using a tnsnames.ora syntax similar to the one below: <tns_alias> = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = <machine_name>)(PORT = <port_number>)) (CONNECT_DATA = (SERVICE_NAME = <service_name>) ) (SECURITY = (MY_WALLET_DIRECTORY = <some_wallet_directory>)))" </code> Below is my attempt First, to prove that the wallet is set up correctly and WALLET_LOCATION mentioned in SQLNET.ORA. <code>C:\Users\JoeBlog\TNSHome\ScottWallet>copy ..\sqlnet.ora . 1 file(s) copied. C:\Users\JoeBlog\TNSHome\ScottWallet>set TNS_ADMIN=C:\Users\JoeBlog\TNSHome\ScottWallet C:\Users\JoeBlog\TNSHome\ScottWallet>tnsping DB_SCOTT TNS Ping Utility for 64-bit Windows: Version - Production on 11-JUN-2021 15:02:41 Copyright (c) 1997, 2019, Oracle. All rights reserved. Used parameter files: C:\Users\JoeBlog\TNSHome\ScottWallet\sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbscan.oracle.world)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = dbserv.oracle.world.com)) (SECURITY = (MY_WALLET_DIRECTORY = C:\Users\JoeBlog\TNSHome\ScottWallet))) OK (70 msec) C:\Users\JoeBlog\TNSHome\ScottWallet>sqlplus /@DB_SCOTT SQL*Plus: Release - Production on Fri Jun 11 15:02:51 2021 Version Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Fri Jun 11 2021 10:03:06 +01:00 Connected to: Oracle Database 19c EE Extreme Perf Release - Production Version SQL> show user USER is "SCOTT" SQL> exit Disconnected from Oracle Database 19c EE Extreme Perf Release - Production Version </code> Now, when I try to use only MY_WALLET_DI...
Categories: DBA Blogs

Windows-Based SQL*Plus Scripting Issue

Tom Kyte - 2 hours 7 min ago
I will preface this with not having had tested SQL*Plus scripts on Windows utilizing script arguments in a number of years so I can't categorically state when this stopped working on said platform. That being said, the issue described does not occur on any *nix system. Additionally, this is running the SQL*Plus from the Instant Client not the Full Client. For Windows-based SQL*Plus scripting if you plan to use script arguments such as (being executed as "sqlplus <username>/<password>@<tns_alias> @test.sql 1"): <code> select to_number( '&1' ) from dual; </code> You get the following: <code> SQL> select to_number( '&1' ) 2 from dual; select to_number( '&1' ) * ERROR at line 1: ORA-01722: invalid number </code> as it is not translating the '&1' to mean the first script argument. If you add "set define '&'" to the options setting up the SQL*Plus environment then it runs as expected: <code> old 1: select to_number( '&1' ) new 1: select to_number( '1' ) TO_NUMBER('1') -------------- 1 1 row selected. </code> My question is why is it only mandatory on Windows to purposefully set DEFINE to its default value ('&')? I struggled with this for many weeks as there wasn't even a thought in my head I needed to set DEFINE to its default value as it makes no sense to do so. Only after re-reading the SQL*Plus User's Guide for the thousandth time did I say what the heck and as soon as I did it worked. Either this needs to be fixed or the documentation needs to address this because in theory SQL*Plus scripts, short of shelling out with HOST, should be portable.
Categories: DBA Blogs


Tom Kyte - 2 hours 7 min ago
Hola! en Apex 23.1 Estoy fallando al intentar ejecutar un metodo GET luego de crear desde Componentes Compartidos >> Origenes de Datos una conexion a un servicio web http (no seguro) publico. El metodo GET lo pruebo desde la opcion de edicion. Y lo he probado tambien desde un boton en mi pagina. Aclaro que los servicios https que he creado me funcionan correctamente. Necesito saber si hay que realizar alguna configuracion para estos casos.. si me pueden aportar alguna documentacion.. se los agradezco!! Estoy trabajando en https://apex.oracle.com/pls/apex/r/apex/workspace Dejo el error: is_internal_error: false ora_sqlcode: -403 ora_sqlerrm: Forbidden component.type: APEX_APPLICATION_PAGE_PROCESS component.id: 37623776800238671091 component.name: Nuevo error_backtrace: ----- PL/SQL Call Stack ----- object line object handle number name 0x3709919170 590 package body APEX_230100.WWV_FLOW_INVOKE_API_PROCESS.INVOKE_API_REST 0x3709919170 639 package body APEX_230100.WWV_FLOW_INVOKE_API_PROCESS.INVOKE_API_PROCESS 0x3256fedff0 1295 package body APEX_230100.WWV_FLOW_PROCESS_NATIVE.EXECUTE_PROCESS 0x35e89acdf8 3443 package body APEX_230100.WWV_FLOW_PLUGIN.EXECUTE_PROCESS 0x34524835b0 189 package body APEX_230100.WWV_FLOW_PROCESS.PERFORM_PROCESS 0x34524835b0 479 package body APEX_230100.WWV_FLOW_PROCESS.PERFORM 0x38de05fa70 4233 package body APEX_230100.WWV_FLOW.ACCEPT 0x38bdd2eaf0 2 anonymous block
Categories: DBA Blogs

Creating a DIRECTORY - Forensics Example in 23c

Pete Finnigan - Fri, 2023-05-26 12:06
I want to talk about the foibles of DIRECTORY creation in the Oracle database. This is not a 23c specific issue but one that goes back years. I want to understand what rights and objects are created when we make....[Read More]

Posted by Pete On 26/05/23 At 01:29 PM

Categories: Security Blogs

Data load wizard page support for Excel files?

Tom Kyte - Thu, 2023-05-25 18:26
Does oracle apex 23.1 data load wizard support excel files like the data loader in the SQL Workshop?
Categories: DBA Blogs

create an account equivalent to APPS but with read only access

Tom Kyte - Wed, 2023-05-24 05:46
How to create a user for eBusiness DB account equivalent to APPS user but only with select and execute on FND, INV and APPLSYS objects?
Categories: DBA Blogs

Calculate more than attendance period per day with some conditions

Tom Kyte - Wed, 2023-05-24 05:46
I have the following query: select OPERATION_CODE, to_char(OPERATION_DATE, 'dd/mm/yyyy hh24:mi:ss') as OPERATION_DATE, EMP_CODE from HR_ORIGINAL_ATTENDANCE where EMP_CODE = 4415 and to_char(OPERATION_DATE, 'yyyymmdd') = 20230517 order by OPERATION_DATE; And I have the following output: OPERATION_CODE OPERATION_DATE EMP_CODE 1 17/05/2023 07:08:03 4415 1 17/05/2023 07:55:15 4415 2 17/05/2023 08:00:00 4415 1 17/05/2023 15:07:01 4415 2 17/05/2023 16:00:00 4415 2 17/05/2023 16:58:27 4415 2 17/05/2023 17:26:05 4415 1 17/05/2023 20:00:00 4415 The report query I want is as follow: Entrance Leave 17/05/2023 07:08:03 17/05/2023 08:00:00 17/05/2023 15:07:01 17/05/2023 17:26:05 17/05/2023 20:00:00 Witch meaning that, the first attendance period row is the min entrance and the max leave before the next entrance period start. Where the leave can be overrided by the user, but if the user entrance more than one time without leave, I want to select the min entrance. I hope it is clear. Thank you. The above was my question in an old thread, and Chris answer me with the following: select * from hr_original_attendance match_recognize ( order by operation_date measures first ( op1.operation_date ) st_dt, last ( op2.operation_date ) en_dt pattern ( op1+ op2+ ) define op1 as operation_code = first ( operation_code ), op2 as operation_code <> first ( operation_code ) ); The result was: ST_DT EN_DT -------- -------- 17/05/23 17/05/23 17/05/23 17/05/23 And Connor follow up, and answer me the following: with prep (operation_code, operation_date, emp_code) as ( select operation_code, operation_date, emp_code from hr_original_attendance where emp_code = 4415 and operation_date >= date '2023-05-17' and operation_date < date '2023-05-18' ) select emp_code, entrance, leave from prep match_recognize( order by operation_date measures first(emp_code) as emp_code, first(one.operation_date) as entrance, last (two.operation_date) as leave pattern ( one* two* ) define one as operation_code = 1, two as operation_code = 2 ); The result was: EMP_CODE ENTRANCE LEAVE ---------- ------------------- ------------------- 4415 17/05/2023 07:08:03 17/05/2023 08:00:00 4415 17/05/2023 15:07:01 17/05/2023 17:26:05 4415 17/05/2023 20:00:00 the exactly was I need. Thank you very much Chris and Connor. The new question is that: When I have oracle 11gr2 version, how to rewrite the query? Thank you.
Categories: DBA Blogs

Sending Email with Apex

Tom Kyte - Tue, 2023-05-23 11:26
We have been using an older version of Apex for about 10 years now and now want to set up email capability for sending reports as attachments. I have scoured the internet for the requirements to use but am getting confused with all the different answers. We need to connect to an external smtp server. What exactly do I need to get in place to get this to work on this older version of Apex? Please let me know if you need more info to better answer this question. Thank you.
Categories: DBA Blogs

SQL help

Tom Kyte - Tue, 2023-05-23 11:26
Hi, I have column having data like below. 101010 10203040 2030405060 etc From each row above I have to break as below to check whether that number exist in a table or not, if yes skip and if no then insert. E.g. for first row 101010 First I have extract two digit ie 10 and check if exist in a table or not and if not then insert if yes then skip. Second time i have to take first 4 digital eg 1010 and verify whether exist in a table or not. Similarly I have to look 101010 last time for first row to verify if it exist or not. Can you please help how to achieve this. Thanks.
Categories: DBA Blogs

Instance Caging

Tom Kyte - Tue, 2023-05-23 11:26
What do we mean by instance caging in context of oracle database? How it works? Kindly elaborate with examples?
Categories: DBA Blogs

Are Oracle 23c Shipped Profiles Weak

Pete Finnigan - Tue, 2023-05-23 10:46
Whilst the 23c version shipped by Oracle is a free developer release we should not complain as its free and we should also recognise that this is not production and this 23c version is not intended to be used in....[Read More]

Posted by Pete On 23/05/23 At 02:09 PM

Categories: Security Blogs

Unified audit with schema filtering

Tom Kyte - Mon, 2023-05-22 17:06
Dear Sirs, I'm using database version 19c and trying to set a filter on schema level before inserting into UNIFIED_AUDIT_TRAIL view. I tried these example policies but without success: <code>CREATE AUDIT POLICY test1 ACTIONS UPDATE ON <schemaname>.* WHEN 'INSTR(UPPER(SYS_CONTEXT(''USERENV'',''CLIENT_PROGRAM_NAME'')), ''FRMWEB'') = 0' EVALUATE PER SESSION ONLY TOPLEVEL; CREATE AUDIT POLICY test2 ACTIONS UPDATE ON <schemaname> WHEN 'INSTR(UPPER(SYS_CONTEXT(''USERENV'',''CLIENT_PROGRAM_NAME'')), ''FRMWEB'') = 0' EVALUATE PER SESSION ONLY TOPLEVEL;</code> Also there is in my opinion no paramter, like obj_owner, in the namespace userenv in sys_context. Do you have a hint please or is logging on schema level not possible? Many thanks Juergen
Categories: DBA Blogs

PeopleTools Learning Subscriptions

Jim Marion - Sat, 2023-05-20 11:41

Are you looking to take your PeopleSoft Development skills to the next level? Look no further than our All-access Learning Membership.

With this membership, you'll gain access to a wealth of resources to help you improve your PeopleSoft Development knowledge and skills. From video tutorials to code samples and webinars, you'll have everything you need to become a PeopleSoft Development pro.

The membership also includes access to PeopleSoft experts, where you can ask questions and get feedback.

But what sets the All-access Learning Membership apart from other online learning platforms is its focus on real-world applications. You'll learn how to use PeopleTools to build practical, functional applications that you can use in your own projects.

And with new content added regularly, you'll always have something new to learn and explore.

So if you're ready to take your PeopleTools skills to the next level, sign up for the All-access Learning Membership at https://www.jsmpros.com/groups/all-access/. Your future self will thank you!

Manually purging trail files from OCI GoldenGate Service

DBASolved - Fri, 2023-05-19 21:09

Oracle GoldenGate Service is Oracle’s cloud offering  to quickly use GoldenGate to move data within OCI as well as other […]

The post Manually purging trail files from OCI GoldenGate Service appeared first on DBASolved.

Categories: DBA Blogs

Let’s talk about ORDS VII

Mathias Magnusson - Wed, 2023-05-17 08:00

This post is part of a series that starts with this post.

Having gone through much of what can be done with a basic REST-service earlier in this series, it is time to look at securing the service. When you can access a service with noting noire than just the URL, then so can anyone else that has access to sen toe ORDS-server the URL. Not only can they read, but if the view allows writing then they can do that too as an autoREST view has DML capability too in the generated API.

In the example used for this series it will not work as the view goes against a view Oracle has defined and that cannot be updated by you as a user. However, you will typically want to protect read as well as write for your services. That is what we’ll achieve with securing the service. In this post we’ll secure it from access and in the next we’ll look at accessing the secured service.

To secure a service we create a role, and a privilege and then define what it will protect, in our case we’re protecting a path in the URL.

Let’s start with creating a role. It is done by just giving it a name, nothing else is needed.

Remember, we protect the service in the source database/schema. That is rest_demo with the alias rest_demo_schema in the setup for this series.

exec ords.create_role(p_role_name => 'gnome_role');

Why gnome you ask? Well, there is a certain theme to the images in this series.

Now, the next step is to set up a privilege that is used to protect the service.

      p_name        => 'gnome_priv',
      p_role_name   => 'gnome_role',
      p_label       => 'Gnome Data',
      p_description => 'Give access till demo data.');

With that all there is left is to define what it should protect. With an AutoREST-enabled view our only option is to define a path for the URL to protect.

      p_privilege_name => 'gnome_priv',
      p_pattern        => '/vw_rest_svc/*');

With that the service on that path is now protected. Note that the pattern is within the schema-alias. It starts from that point in the URL so it does not work to have /ords/… That is good as it allows the alias for the schema to be changed without the security being side stepped.

All that is left now is to verify that the service is in deed not available anymore.

curl https://.../ords/rest_demo_schema/vw_rest_svc/ | python3 -m json.tool 
    "code": "Unauthorized",
    "message": "Unauthorized",
    "type": "tag:oracle.com,2020:error/Unauthorized",
    "instance": "tag:oracle.com,2020:ecid/039ed419abad226de418d37c6f146756"

Great, the service is now protected. In fact, it is so well protected that there is no way to access it. Setting up to allow access is where we pick up in the next post.

HIUG Interact 2023

Jim Marion - Tue, 2023-05-16 16:36

User group conferences are a fantastic opportunity to network with and learn from peers. And we are just a few weeks away from the Healthcare PeopleSoft Industry User Group meeting Interact 2023! I am presenting my signature session, Getting the Most out of PeopleSoft PeopleTools: Tips and Techniques on Tuesday, June 13 from 9:30 AM - 10:30 AM in room Condesa 3.

See you there!

i am not able to login to sqlplus / as sysdba

Tom Kyte - Tue, 2023-05-16 14:46
Hello Team, I am new to Oracle and I have recently installed oracle-21c in Centos. The installation was successful , but During installation password was automatically generated. But now when i try to run sqlplus / as sysdba, its repeatedly asking me for the password which i don't have. How to fix this? [tony@instance-7 ~]$ sqlplus / as sysdba SQL*Plus: Release - Production on Wed May 10 17:51:55 2023 Version Copyright (c) 1982, 2021, Oracle. All rights reserved. ERROR: ORA-12162: TNS:net service name is incorrectly specified Enter user-name:
Categories: DBA Blogs

Apex 21.2 Automations - Send Email with Attachment

Tom Kyte - Tue, 2023-05-16 14:46
Hello I am trying to use Automations to set up a weekly e-mail with a csv attachment that is a simple select from a table. I am getting?ORA-20987?.. has a wrong data type in SQL statement. Column# 1 is VARCHAR2 but BLOB expected? error. It seems that I need to modify my query to convert to BLOB. Can you provide an example of how this should look? Under Automations, in "Actions", I select Type = "Send E-mail". Under "Attachement SQL" I entered select column1, column2 from data_table
Categories: DBA Blogs

JSON Relational Duality Views

Tom Kyte - Tue, 2023-05-16 14:46
JSON Relational Duality views rely on a normalised, uniquely constrained schema to store the data in the 'current view' aka 'the last known state' aka 'snapshot'. In my experience, the vast majority of schemas designed by developers do not conform to this pattern. For practical reasons (because the application needs more that just the last known state), schemas always include audit tables/history tables/timestamps/additional intersections between 1:m tables etc etc, all of which mean that unique keys (and therefore foreign keys) are NOT enforced in the database. So, how can JSON Relational duality views be of any practical use?
Categories: DBA Blogs


Subscribe to Oracle FAQ aggregator