DBA Blogs

User entered date in the form to validation from another table before cursor moves to next field

Tom Kyte - Wed, 2016-07-20 08:06
Sir Hope you are doing well I have query, please suggest me solution I have two different tables Holidays (Holiday_ID,From_Date,To_Date) Emp_Attendance(Date,Emp_No,Attendance_Status) I would like that when user enter the date in the ...
Categories: DBA Blogs

Tons of archivelog files (.arc)

Tom Kyte - Wed, 2016-07-20 08:06
I'm currently running a oracle db for one of our printing machines and this db stores a ton of archivelog files. It looks like it generates around 15 a day, each between 37-50MB. I currently have under 1000 files totaling ~34GBs, and ranging from ...
Categories: DBA Blogs

Dynamic sql

Tom Kyte - Wed, 2016-07-20 08:06
HI TOM, 1)exactly in which situation we need to use these concepts in dynamic sql. i)"dbms_sql package" in dynamic sql ii)"Native dynamic sql" in dynamic sql .... .... show me with an example what is the vary in both the cases? ...
Categories: DBA Blogs

Mapping columns from two tables ,if match replace with another string

Tom Kyte - Tue, 2016-07-19 13:46
Hi Tom, I have a question?could you assist regarding this issue? 1. I have two tables are order table and product table. 2. order table containing two columns are order test and order app.the column data format is order test ...
Categories: DBA Blogs

SQL Injections

Tom Kyte - Tue, 2016-07-19 13:46
Hi Tom, 1)What is the sql injection,And how to solve sql injection problems with an example program tom?
Categories: DBA Blogs

Tom Kyte's books

Tom Kyte - Tue, 2016-07-19 13:46
Hi Tom, I have some of your fine Oracle books. Effective Oracle by design and Expert Oracle Database Architecture (latest version). I prefer reading on an ipad rather than carrying them around with me. Is there a PDF version of these books? Do ...
Categories: DBA Blogs

Converting Row to Column and Vice-versa

Tom Kyte - Tue, 2016-07-19 13:46
Hi Tom, I have a table Assigned_Task. ENAME JANUARY FEBRUARY MARCH APRIL ------ -------- -------- ------ ------ RASHMI 20 25 30 05 SOUMYA 11 21 09 15 BISWA 17 33 19 00 I want the output as below format: M...
Categories: DBA Blogs

Unique value in Oracle Collection variable

Tom Kyte - Tue, 2016-07-19 13:46
Hi team, I have one doubt on oracle collection while implementing on Scenario in my assignment. We need to have collection variable column (vARRAYS) inside a Table , Sample table structure looks like below id name list 1 ABC varra...
Categories: DBA Blogs

Alternatives for to_char(dt, 'DAY')

Tom Kyte - Tue, 2016-07-19 13:46
--->A simple SQL issue that I faced few days back. We normally perform some executions on weekends(SATURDAY or SUNDAY) like some sort of cleaning activity,stats gathering,partition creation etc. Please take caution If your are planning to achieve ...
Categories: DBA Blogs

Links for 2016-07-18 [del.icio.us]

Categories: DBA Blogs

The New Ask Tom

Tom Kyte - Mon, 2016-07-18 19:26
Why do parts of the new Ask Tom appear in another language? e.g. on the list of questions asked previously: Kedd Februar 18, 2003 (H. Feb 17, 2003, 0 days old) Thanks.
Categories: DBA Blogs

pivot data into named columns

Tom Kyte - Mon, 2016-07-18 19:26
Hi, I have a table that looks like the following PHOTOID PHOTO PRODUCT_ID 1 BLOB 123 2 BLOB 123 3 BLOB 123 4 BLOB 123 5 BLOB 123 6 BLOB 124 7 BLOB 124 8 BLOB 125 9 BLOB 126 10 BLOB 126 11 BLOB 126 12 BLOB 126 13 BLOB 126 each PRODUC...
Categories: DBA Blogs

Code enchancement

Tom Kyte - Mon, 2016-07-18 19:26
Hello Chris Saxon, I have a below table structure. CREATE TABLE "PEOPLE" ( "PERSON_ID" NUMBER, "GIVEN_NAME" VARCHAR2(100), "CATEGORY" number(50) ) INSERT INTO people VALUES(1,Connor,1001); / INSERT INTO people VALU...
Categories: DBA Blogs

difference between soft parse and hard parse

Tom Kyte - Mon, 2016-07-18 19:26
Hi Tom Can you explain briefly the difference between soft and hard parse? cheers
Categories: DBA Blogs

Time conversion

Tom Kyte - Mon, 2016-07-18 19:26
Hi Team, Please let me know how we can convert <b>14-JUL-2016 17:11:05 PM</b> into 1<b>7:11:05 or 05:11:05 PM only</b> in Oracle. Regards, Atin
Categories: DBA Blogs

Why it is difficult to scale oracle

Tom Kyte - Mon, 2016-07-18 19:26
Why it is difficult to scale oracle database. Thanks!!
Categories: DBA Blogs

Importing windows scheduled tasks into a Powershell object before 5.0

Matt Penny - Mon, 2016-07-18 07:43

You don’t need this on Powershell 5.0 and upwards because there’s a built-in cmdlet, but for previous versions:


convertfrom-csv $(schtasks /Query /S server1 /TN "run somesstuff" /V /FO CSV)

HostName : server1
TaskName : \run somesstuff
Next Run Time : N/A
Status : Ready
Logon Mode : Interactive only
Last Run Time : 13/07/2016 10:05:43
Last Result : 0
Author : matt
Task To Run : C:\powershell\Modules\somesstuff-PCs\run-somesstuff.bat
Start In : N/A
Comment : Scheduled job which does some stuff
Scheduled Task State :
Idle Time :
Power Management :
Run As User :
Delete Task If Not Rescheduled :
Stop Task If Runs X Hours and X Mins :
Schedule :
Schedule Type :
Start Time :
Start Date :
End Date :
Days :
Months :
Repeat: Every :
Repeat: Until: Time :
Repeat: Until: Duration :
Repeat: Stop If Still Running :

HostName : More detail at http://ourwebsite
TaskName : Enabled
Next Run Time : Disabled
Status : Stop On Battery Mode, No Start On Batteries
Logon Mode : matt
Last Run Time : Enabled
Last Result : 72:00:00
Author : Scheduling data is not available in this format.
Task To Run : One Time Only
Start In : 10:20:21
Comment : 25/05/2016
Scheduled Task State : N/A
Idle Time : N/A
Power Management : N/A
Run As User : Disabled
Delete Task If Not Rescheduled : Disabled
Stop Task If Runs X Hours and X Mins : Disabled
Schedule : Disabled
Schedule Type :
Start Time :
Start Date :
End Date :
Days :
Months :
Repeat: Every :
Repeat: Until: Time :
Repeat: Until: Duration :
Repeat: Stop If Still Running :


This is outputting from schtasks in csv format, then importing that into a PowerShell object.


Categories: DBA Blogs

Document No. Repeat

Tom Kyte - Mon, 2016-07-18 01:26
Hello,Dear Tom: Document No. repeated in the database! SELECT T.*,T.ROWID FROM AR_BILL T WHERE T.BILL_NO = '201607-141055001-001-000091' BILL_ID BILL_TYPE BILL_NO CO_CODE ND REASON PROJECT_CODE APP_ID INPUTOR_ID ORG_CODE INPUT_DATE BILL...
Categories: DBA Blogs

Hash partitioning and number of partition

Tom Kyte - Mon, 2016-07-18 01:26
Hi Tom, I have a question regarding the choice of the number of partitions when using hash partitioning. I have the following table used to store documents <code>CREATE TABLE "DOCUMENT" ( "DOCUMENT_ID" NUMBER(38,0), "CREATED_BY" VARCHA...
Categories: DBA Blogs

Pages

Subscribe to Oracle FAQ aggregator - DBA Blogs