oracle10g

DMBS_SQL.to_refcursor equivalent in Oracle 10g

I have a coworker who came across DBMS_SQL.to_refcursor which would be a great solution for him to pass back the refcursor he needs, however we are running Oracle 10g and this feature is only available in 11g. Is there an easy equivalent to this in Oracle 10g? We have developed an alternate way of coding our solution but it would be ...

Oracle right justify column heading along with also right justifying the data

Is this possible? ...

ASP.NET webparts with Oracle 10g

Hi I would like to use webparts in ASP.NET website . Is there any support of webparts with Oracle 10g in ASP.NET. I am new in webparts. I don't know whether there is any provider available for Oracle. Please help me? ...

Any problem with renaming Oracle constraints directly in the user_constraint table?

Using Oracle 10g, I need to rename a bunch of FK constraints which all end in LITE to include an FK prefix. My thinking was (I've ensured all names are short enough to accommodate the prefix): DECLARE v_name VARCHAR2(30 BYTE); v_new_name VARCHAR2(30 BYTE); CURSOR c1 is select CONSTRAINT name from user_constraints where constraint...

Oracle Lab DB Design (Pipeline Functions?)

Main Goal: Query the database to determine what the lab technician should do next. What I am trying to accomplish I am designing a laboratory database where each of the following entities requires exactly one parent (to the left) and at least one child (to the right): request (REQ) -> sample (SAM) -> test (TST) -> measurement (MEA). ...

Frequent error in Oracle ORA-04068: existing state of packages has been discarded

Hi, We're getting this error once a day on a script that runs every two hours, but at different times of the day. ERROR at line 1: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "PACKAGE.NAME" has been invalidated ORA-06508: PL/SQL: could not find program unit being called: "PACKAGE.N...

Oracle 10g : amount of redo generated for the first insert statement in a transaction

Hi, I am trying to see the amount of redo generated by different insert statements. I see that for the first insert in the transaction , the redo size is being shown as zero. The very next insert generates a redo of 2664 bytes (probably for the last two inserts). All subsequent inserts generate the expected number of redo. The database...

Oracle10g XE: Why PLS_INTEGER cannot be a column type

Hi guys: An invalid datatype is returned when I issue following command: CREATE TABLE msg_info ( msgcode PLS_INTEGER, msgtype VARCHAR2(30), msgtext VARCHAR2(2000), msgname VARCHAR2(30), description VARCHAR2(2000) ); I discovered it's resulted from msgcode PLS_INTEGER, removing this column will make creation successf...

Extract Unique Time Slices in Oracle

I use Oracle 10g and I have a table that stores a snapshot of data on a person for a given day. Every night an outside process adds new rows to the table for any person whose had any changes to their core data (stored elsewhere). This allows a query to be written using a date to find out what a person 'looked' like on some past day. A ne...

How to execute a procedure with DBMS_SCHEDULER.CREATE_JOB procedure

I want to create a job that would drop a database object at a given date. The job created all right but the procedure is not executed. Tried executing the procedure alone and it works. Here's the code for the create job v_jobnam := v_objnam; v_jobnam := DBMS_SCHEDULER.generate_job_name (v_jobnam); v_startdate := to_tim...

How to create dmp file of Oracle database?

I have database reside in my Oracle 10g, I need to carry it to another PC. What should i do to import and export it to another pc? ...

ORA-24374 error in php script

When I try to execute script PutEnv("TNS_ADMIN='C:\\Programy\\OracleDeveloper10g\\NETWORK\\ADMIN\\'"); $conn = oci_connect(user, pass, dbstring); if (!$conn) { $e = oci_error(); print htmlentities($e['message']); exit; } else { $stmt = OCIParse($conn, "SELECT * F...

ORA-00917 in php script

My php script is as follows: if (!empty($_POST['action'])){ PutEnv("TNS_ADMIN='C:\\Programy\\OracleDeveloper10g\\NETWORK\\ADMIN\\'"); $conn = oci_connect('s14', 'sm19881', 'umain'); if (!$conn) { $e = oci_error(); print "Wygląda na to że mamy jakieś błędy\n"; p...

Oracle delete user

I have such table: users: id PK . . . workers: id PK user_id (FK to users) . . . evaluations: id PK worker_id (FK to workers) . . . And now I want to delete user. When I delete user then worker also should be deleted. How can I do this? ...

Benchmarking Oracle 10G on Windows XP

I am not a DBA. However, I work on a web application that lives entirely in an Oracle database (Yes, it uses PL/SQL procedures to write HTML to clobs and then vomits the clob at your browser. No, it wasn't my idea. Yes, I'll wait while you go cry.). We're having some performance issues, and I've been assigned to find some bottlenecks ...

Importing data into Oracle via Web Enterprise Manager with unique constraints

I am not at all familiar with Oracle so bear with me! I am using version Oracle 10G with the web front end called Enterprise Manager. I have been given some CSV files to import however when I use the Load Data from User Files option I think I can set everything up but when the job runs it complains that there are unique constraints, I ...

Different record count values in one query

Hi, My goal is to achieve a result set like the following CODE | TOTAL1 | TOTAL2 1 | 56 | 34 2 | 12 | 15 3 | 90 | 3 There are 2 tables e.g tableA and tableB The counts are different by tableB.type SELECT code, COUNT (*) AS total1 FROM tableA a WHERE a.ID IN (select ID from tableB where type = 'XYZ'...

Maintaining / Auto-generating IBatis SQL Maps?

Hello, I just started a new job and inherited the project from hell. Hell = {2 years over schedule, overly complex, uses both oracle and sql server} There are 100+ stored procedures in the Oracle server and each one has a IBatis SQL Map. Some share the same result map. The DBA likes to change stores procs on a daily basis and not tell m...

When is the code between a PL/SQL Package begin/end block executed?

I have the PL/SQL code that is similar to the following snippet: create or replace package body MY_PACKAGE as type array_type is table of char index by varchar2(1); lookup_array array_type; function DO_SOMETHING(input nvarchar2) return varchar2 as begin -- Do something here with lookup_array end DO_SOMETHI...

How can I connect to a web based Oracle database with Java?

I have an account, password and the URL. ...