Ask Tom MOST RECENT ARTICLES http://asktom.oracle.com These are the most recently asked questions on Ask Tom en-us Copyright 1999-2019, Oracle Corporation AskTom http://asktom.oracle.com/i/asktom2.gif http://asktom.oracle.com 50 50 Ask Tom is a forum where Tom Kyte, Oracle's Database Guru, answers questions regarding Oracle technology, specifically the database. Question - increase size of number column http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9522585800346350114 We just hit 2.1 billion row count on a table with primary key INT. This is the worse thing to happen :( Any one know if we can do alter without requiring space on the DB for the entire table? Autonomous database service and External Procedures http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9546873700346954104 Hi, I'm interesting to know if there is any way to execute external procedures in Autonomous database cloud service? Actually we use external procedures calls to execute important routines (functions) needed for our applications, we are using Linux and Windows OS as well. I try to find if that feature is enabled in IaaS or any other option. Just a note using AWS RDS doesn't offer access to the operating system so we cannot install DLL or any other library, I'm concern if I have the same limitation in Oracle Cloud. This is avoiding us to simple running our current deployments in Cloud with out doing big code changes. Thanks. SQL Performance differences with STATS gather http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9548595600346991654 We have seen in many situations in our environment where a SQL was running badly but the plan for the query has not changed. When we gather stats for the associated table.we see that same query performs significantly better. However there is no change in PHV of the execution plan. My Question is if the PHV is staying same then that means execution plan remains the same then why is the performance varying.Are table statistics used by the optimizer even after plan is generated? Oracle Edition Based Redefinition EBR Table Data http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9528925800346127290 Hi Tom, I went through the articles & documentation, your article answers most of the issues Asktom EBR Part 1 => http://www.oracle.com/technetwork/issue-archive/2010/10-jan/o10asktom-172777.html Asktom EBR Part 2 => http://www.oracle.com/technetwork/issue-archive/2010/10-mar/o20asktom-098897.html Asktom EBR Part 3 => http://www.oracle.com/technetwork/issue-archive/2010/10-may/o30asktom-082672.html and Whitepaper on EBR http://www.oracle.com/technetwork/database/features/availability/edition-based-redefinition-1-133045.pdf As per the documentation Table is an example of an noneditionable type. https://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_editions.htm#ADFNS99923 The requirement is application upgrade also has some data changes in the application repository tables, its not structural table changes, its changes in the table data (both insert of new rows and updates/deletes of existing rows). How can this be restricted to new edition till the edition is actualized. Is there a way or workaround, do we have any enhancement request or feature looking forward for making editionable table to solve this. Regards, SrinivasaMurthy How does Oracle Database provide the user$.user# http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9548596000346392110 Hi Toms, eventually, after many years, I came across e question I never realized. Indeed I have to face a customer, who uses the user$.user# for application purposes. Will say after creating a user, that application stores the user# within application tables columns, say USR_ID, which, subsequently leads to the need that user$.user# has to match the USR_ID. In consequence, if you have to migrate that application via epxdp / impdp (we have to, as we migrate from Solaris to Linux) these IDs won't match anymore as the users on the new database are created with different user$.user#. You do not have to tell me that THAT application needs "some redesign"... However, I have some questions regarding user$.user#. As far as I have seen / read, when creating a new user using the usual "create user" statement the new users user# is provided by oracle rdbms as the user# of "_NEXT_USER". _NEXT_USERs user# serves as a high water mark, even when dropping the user again _NEXT_USERs user# won't decrease (looks like an Oracle maintained sequence is used), so creating and dropping users leades to unused ranges of numbers in user$.user#. Questions: - Which sequence does provide the number of _NEXT_USER? - Is there any way to reset it? - or is there any way to influence the user$.user# or the number that is provided by rdbms to be stored as user$.user#? => I assume this may result in corruption but perhaps there is a way. Thanks and best regards - dietmar AUD$ EXP/TRUNCATE/IMP (feasibility) http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9548595700346098658 We are going to MOVE the TBS of AUD$ table in PROD. Purpose: AUD$ table is totally fragmented and the CLEANUP / PURGE runs very slow - even with max 1.000.000 batch size but as per test in our test environment we had some issues regarding using API (DBMS_AUDIT_MGMT) to MOVE TBS on AUD$. And we are using STANDARD AUDIT TRAIL! SELECT * FROM dba_audit_mgmt_config_params where audit_trail ='STANDARD AUDIT TRAIL' and parameter_name='DB AUDIT TABLESPACE'; DB AUDIT TABLESPACE CLARITYAUDIT <b>STANDARD AUDIT TRAIL</b> But the MOVE worked now after we got some action plan from oracle support to fix the issue in TEST env. so that the MOVE went through via API. Now we are planning to do the TBS MOVE of AUD in PROD (<b>online</b>!). But we need to have a fallback plan, in case the MOVE hangs, or/and the data in AUD table get inconsistence. so the fallback plan is: 1) EXP the data in a downtime (disable audit trail) and keep the dump file on the server. but with parameter "DATA_ONLY" - as metadata (table DDL) would still be there. 2) run the MOVE TBS on PROD via API (DMBS). 3) if it goes through and AUD$ is accessible and purgeable, we are good - if not, we need to truncate the data in AUD$ and IMP the SAVED data (as per EXP/dump file) - again with parameter "DATA_ONLY" So i hope thats clear enough. The question is now if step 3 would work or not - we are also planning the to test the step 3 in our TEST env. but we are concerned , If this action plan (especially step 3) could impact the PROD - in case we needed to go for the fallback plan (!?). We would also appreciate any other action plan/ option to save and recover data in AUD$ , in the above scenario. Thank you! Ali Schema Privileges and Grant option http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9547993700346624276 Hello, I wanted to ask about new 23C feature - Schema-level Privileges: is it possible to combine it with "WITH GRANT OPTION"? According to documentation https://docs.oracle.com/en/database/oracle/oracle-database/23/dbseg/configuring-privilege-and-role-authorization.html#GUID-EEE53C39-D610-4792-82EA-6F49B880B036 "WITH ADMIN OPTION" is only extension. In other terms - would it be possible for user who got schema privileges to create view on top of tables from another schema or will we have to stick to object level privileges WITH GRANT OPTION included? Thanks in advance, kind regards Unable to connect to database xe using sql developer http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9542646700346383126 Hi , I am unable to connect to oracle database using SQL DEVELOPER. It gives me" i/o error network adapter could not establish connection". Please let me know what are the possible reasons for it and provide me the solution for the same. - I am using sql developer Version: 19.4.0.354.1759 and Oracle XE184 - My connection type is basic to localhost:1521 - It also does not recognize my username "sys" on windows cmd - I am a beginner in DBMS Regards Adding constraint with REGEXP_REPLACE fails http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9537768000346573035 Hi Tom, Why is this script failing? There is no errors on running this in Oracle 12.01 and previous versions! High Watermark on a table http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:492636200346818072 What is the main purpose of white watermark and in a case secnario where all the records have been deleted and we try to lookup that table why does the data is looked untill it reaches to an end of whte watermark