Tom Kyte

Subscribe to Tom Kyte feed Tom Kyte
These are the most recently asked questions on Ask Tom
Updated: 9 hours 23 min ago

Evolute from a Developer to DBA

Mon, 2017-09-18 12:26
Hi Tom, I found this website by accident one year ago and get addicted to it in just a couple of hours. Thank you for all the interesting and useful instructions/suggestions. I am a database developer who uses PL/SQL to code everyday. I always ho...
Categories: DBA Blogs

Delete a record at the at end when others stage

Mon, 2017-09-18 12:26
I have a procedure which writes a record each in two tables. Want to delete the record inserted into the first table if the second table insert fails. However, the delete does not happen. The problem is that the before insert trigger in the second t...
Categories: DBA Blogs

capture old and new values of the fields using Stored Procedure

Mon, 2017-09-18 12:26
Hi, We have a requirement to store old and new values of the fields and insert into another table. For example, If we have Table A and Table B and in both the tables columns are exactly same but we need to write a procedure like whenever an...
Categories: DBA Blogs

How to pass a list of values from one procedure to another

Mon, 2017-09-18 12:26
The first step is to fetch the data. Second is to pass the list of values fetched in step 1 to another procedure. This is the table <code>CREATE TABLE EMP (EMPNO NUMBER(4) NOT NULL, ENAME VARCHAR2(10), ...
Categories: DBA Blogs

Refreshing Materialized view in a remote database

Mon, 2017-09-18 12:26
Hi there. I have created in the database A the following MV: CREATE MATERIALIZED VIEW MRW_USER.MB_TRACK_REPORT3_FINAL_SS (SOUNDREC_CODE,ISRC,CAT_NUM,TITLE,MIX_NAME, ARTIST,RELEASE_DATE,LABEL,COMPANY,CORPORATE_GROUP, DISTRIBUTOR,DEALER_PRICE,GEN...
Categories: DBA Blogs

Splitting and storing Json string from file to table

Mon, 2017-09-18 12:26
Hi Team..Please help me on below scenario. I have data in a file as below. It has two records Id and JsonString DELIMITED By "| 1001"|{"id":"1234","code":"test1","Version":v1,"time":"2017-08-31","rank":2,"device":"TEST1234TEST","response":"appr...
Categories: DBA Blogs

Flashlogs not getting deleted

Mon, 2017-09-18 12:26
Hi Tom, I see FRA size is Filling up and when checked Flashback Logs are occupying most of it as seen below, SQL> select * from v$recovery_area_usage; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES -------...
Categories: DBA Blogs

connect by rownum produce ORA-30009

Sat, 2017-09-16 05:26
SQL> select * from scott.t0909_1; ID S E ---------- ---------- ---------- 1 10 11 2 1 5 3 88 92 -----Scene 1 select * from scott.t0909_1 connect by rownum<=3; ID S E ---------- ---------- ---------- 1 10 11 1 10 11 1 10 ...
Categories: DBA Blogs

Vendor Code 17002 Unable to Connect to DB Windows 10

Sat, 2017-09-16 05:26
IO Error: The Network Adapter could not establish the connection. My laptop is client/server using Windows 10. I added Port 1521 as exception to Firewall, but this did not resolve the problem. I am knowledgeable in DB design/build using SQL Server, b...
Categories: DBA Blogs

TO_DATE with no month

Sat, 2017-09-16 05:26
If you use to_date without specifying a day, Oracle assumes the 1st of the month. However, if you don't specify a month, Oracle uses the current month. Is this by design, and if so do you know the rationale for it? eg on 15 September: <code> ...
Categories: DBA Blogs

Want to retrive numbers in words

Sat, 2017-09-16 05:26
I want output as: numbers string 101 One zero one 102 One zero two 851 eight five one 9856 nine eight five six 356 three five six 748 seven four eight 254 two five four ...
Categories: DBA Blogs

How to split rows into balanced sets based on a running total limited to 2000

Fri, 2017-09-15 11:06
Hi, my question fits in to your "Balanced sets in SQL" collection of questions. I have a table as follows (in reality 26 million rows): <code> CREATE TABLE T ( "PI" VARCHAR2(120), "S" NUMBER, "L" NUMBER ); Insert into T (PI,S,L...
Categories: DBA Blogs

About connect,resource and DBA

Fri, 2017-09-15 11:06
Hi Tom, I read your book and a article and read this quote where you have quoted that "connect,resource and DBA should not be used in a system for security reasons". Could you please elaborate on this.As in our project to perform dba role ...
Categories: DBA Blogs

Performance differ on Temporary tables

Fri, 2017-09-15 11:06
Please observe my queries explain plan and let me know what is the root cause taking more time on second execution. --GT Table creation <code>create global temporary table gt_table1 (column1 varchar2(4000), column2 varchar2(4000), ........... ...
Categories: DBA Blogs

Using Standby of CDB for Reporting purpose

Fri, 2017-09-15 11:06
Hi Tom I have active data guard setup for my CDB . It means i have physical standby CDB (with multiple pdbs) . I know replication and database_Role are at CDB level and not pdb level . I have a PDB from different application . Initially when we s...
Categories: DBA Blogs

Parse cpu to parse elapsed % very low

Fri, 2017-09-15 11:06
Greetings, As in last question, i am getting these stats from awr. I tried to dig it up more for wait class concurrecy wait class. <code>Event Waits Time(s) Avg wait(ms) % DB time Wait Class --------------...
Categories: DBA Blogs

Database Service Configuration Requirements

Fri, 2017-09-15 11:06
Hi TOM, Was going through the section 5.6.1.2 in http://docs.oracle.com/database/121/DGBKR/sofo.htm#DGBKR3425. It says "Services that are to be active while the database is in the physical standby role must also be created and started on the c...
Categories: DBA Blogs

Pro*C: How to set USERID precompiler option for proxy connection

Fri, 2017-09-15 11:06
Hi, Is there a way to set the Pro*C USERID precompiler option for a proxy connection? For example, I have an OS authenticated user GEORGE who as been granted "CONNECT THROUGH" to user GEORGE_P and can perform a proxy connect to GEORGE_P in SQL*...
Categories: DBA Blogs

Cloning a PDB into a CDB having a active data guard setup

Fri, 2017-09-15 11:06
Hi Tom I have been trying to clone a pdb using database link into a cdb having dataguard setup using STANDBYS=ALL clause. But my replication stops . I tried changing the file_name_convert parameter at CDB level and still the new cloned pdb could not...
Categories: DBA Blogs

Ggsci interface

Thu, 2017-09-14 16:46
Hi Tom, I want to ask. Is there any ways to create ggsci interface? Like using netbeans or something. Thanks
Categories: DBA Blogs

Pages