SQL & PL/SQL :: Read DIST From DISTANCE Where Origin And Destination Is From Cursor
May 30, 2013
CREATE OR REPLACE FUNCTION TRIPLENGTH(tripnum TRIP.T#%TYPE)
RETURN NUMBER IS
TNUM TRIPLEG.T#%TYPE;
LEGNUM TRIPLEG.LEG#%TYPE;
ORI TRIPLEG.ORIGIN%TYPE;
DES TRIPLEG.DESTINATION%TYPE;
[code]....
i am trying to read values from TRIPLEG to a cursor (it will return 6 rows). from the cursor, i am trying to read DIST from DISTANCE where the origin and destination is from the cursor(6 origin and destination so should return 6 dist) the dist should be added up and store in TDIS. then it return TDIS.
ORA-01403: no data found
ORA-06512: at "user.TRIPLENGTH", line 1
ORA-06512: at line 1
View 15 Replies
ADVERTISEMENT
Aug 15, 2013
I have one Latitude and Longitude points. I need to calculate distance between them.Right now we are using HAVERSINE formula but the query takes longer time to complete.
[URL]
View 7 Replies
View Related
Apr 13, 2013
I have a repeating frame wich displays each item and its quantity and pricethe second frame is a fixed frame which will display the total and price after discount.both frames are enclosed in the same frame.I made space beteewn the two frames so the second frame always prints in the same placewhen I run the report the second frame appears in the second page and the first frame (items in invoice) appear in the first page.
I've tried to change the vertical and horizental properties of the frames but the report is still the same
View 6 Replies
View Related
Feb 20, 2013
I have a table with a BLOB column ;
I want read data from table and insert to another table with a cursor
My code is :
procedure read_data is
cursor get_data is
select id,image from picture1;
id1 number;
pic blob;
begin
open get_data;
[code]....
when I run form , error FRM-40734 occurred
error in line " fetch .... "
View 1 Replies
View Related
Mar 14, 2013
My DB is in Max Protection mode. In case Standby archive destination gets full & oracle cannot archive standby redo log to standby archive destination, will the primary database shutdown?
View 1 Replies
View Related
May 8, 2013
I am unable to find out the location of my archive logs. The VALUE field is null.
SQL> show parameter log_archive_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest string
log_archive_dest_1 string
log_archive_dest_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_19 string
log_archive_dest_2 string
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 stringSQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2907
Next log sequence to archive 2908
Current log sequence 2909
When I do SQL>show parameter USE_DB_RECOVERY_FILE_DEST,I am not getting any result.
when I do *SQL>show parameter DB_RECOVERY_FILE_DEST, I am getting the result.
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +BKUP_TSD1
db_recovery_file_dest_size big integer 500GSo +BKUP_TSD1,
is this where my archive logs are present?
View 5 Replies
View Related
Mar 29, 2013
If the standby archive destination is full, what will happen? Will the standby DB freeze? or will oracle stop redo transport from primary to standby?
DB Version: 11.2.0.2 running on RHEL5
View 1 Replies
View Related
Oct 2, 2007
I m using Oracle Forms 6i and Oracle 10g Express Edition. I am having the following error message when I am trying to connect to the database from client.I have dont following configuration in my client's FORM's TNSNAMES.ORA file.
0001 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bankvigil)(PORT = 1521))
(CONNECT_DATA = (SID = XE))
)
In the above configuration
0001 = my connect string.
BankVigil = My Oracle database server hostname.
View 9 Replies
View Related
Jul 18, 2013
If Listener.log file destination is full what will happen? whether connections through the listener will go hang? DB version 10.2.0.4 & 11.2.0.3
View 1 Replies
View Related
Sep 18, 2012
I am having trouble connecting to oracle forms 4.5, I keep getting an "Ora-12203:TNS:unable to connect to destination" eror message. I am able to connect using sql plus or other similar application so there is no problem with my tnsnames.ora file.
View 4 Replies
View Related
Jul 6, 2011
Just to validate from you experts if in case I change the destination file of my archive logs, does it require a restart of the database?
View 10 Replies
View Related
Jan 21, 2013
by default backup area is FRA, It can be change by db_recovery_file_dest FRA contains archivelog ,backupset,datafile,onlinelog folders..
NOW, i specially want to change backup dest. of archvelog to C: (suppose i have C , D, E, F , G) - (i know for archivelogs its log_archive_dest_N command can backup copies to other location but it also goes to default FRA )
backupset to D:
datafile to E:
onlinelog to F:
controlfile to G:
ALL SHOULD CONTAIN ONLY 1 DESTINATION NOT 2 FOR BACKUPS
View 12 Replies
View Related
Jan 11, 2013
I installed Oracle 11g Express edition in my local Machine(Windows 7).listener.ora, tnsnames.ora files seems fine. Service and listener are running; While trying to connect to the my db sqlplus>connect sys/oracle as sysdba
I am getting "ora - 12543 TNS: destination host unreachable."
what could be the issue. Find below listener.ora, sqlnet.ora, tnsnames.ora files:=
listener.ora file:=
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
[code]....
View 1 Replies
View Related
Oct 17, 2012
I install oracle database 11g and developer 6i on windows7 64bit server everything is working fine on the server and i install developer 6i on windows XP on client now i'm getting "ora-12203:TNS: unable to connect to destination" when trying to connect the server. i have check the TNSNAMES.ORA file the configuration is fine. then why i'm getting this message?
View 5 Replies
View Related
Apr 29, 2013
i have 2 tables in two different sources.
I have loaded data from source to destination.
some rows are missed while loading.
i want to know the missing rows
View 11 Replies
View Related
Jan 11, 2013
I want to change my archive log destination currently my database its in archive mode and this archive log detail as under
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination F:archivelogs
[Code]...
this my f drive space is full so i want to change this my archive destination to my another g drive so how can i do this.and if i change this my archive destination does its affect any problem while recover my database in future.
View 1 Replies
View Related
Mar 28, 2011
We have a request to configure data guard for databases on the production server. Here is my situation:
We have a backup strategy in place where the backups are being taken on a regular basis. Archive logs are deleted as soon as they are backed up.
My question now is , is there a way of configuring the Data guard in such a way that there would be no change to existing backup strategy (RMAN) and still duplicate the archive logs to another destination and not delete the archive logs by RMAN backup process on that destination while the first destination is deleted.
We will be deleting the logs in the second archive destination using a script which checks if the logs were applied.
View 2 Replies
View Related
Dec 16, 2012
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on t1 channel at 12/15/2012 06:15:11
RMAN-10015: error compiling PL/SQL program
RMAN-10033: error during compilation of job step 2: ORA-00603: ORACLE server session terminated by fatal error
ORA-04030: out of process memory when trying to allocate 400 bytes (PL/SQL DIANA,LISIMA: Add cells)
We received the above error message after the following event:
rman failed to backup because archivelog destination was out of space
We moved SOME of the archivelog file manually using operating system command mv to another location so that our application can run first.When the engineers restarted the rman to backup, we receive the above error.
View 7 Replies
View Related
Sep 7, 2007
I'm dealing with an ORA-1000 error in a Pro*C application where all the cursors are correctly closed (or so it seems to me).
Here is the code for a simple program which reproduces the problem:
Each cursor is opened in a PL/SQL package:
CREATE OR REPLACE PACKAGE emp_demo_pkg AS
TYPE emp_cur_type IS REF CURSOR;
PROCEDURE open_cur(curs IN OUT emp_cur_type, dept_num IN NUMBER);
END emp_demo_pkg;
[Code]....
While testing the initialization parameter open_cursors is set to 50.
It's my understanding that Oracle doesn't close the cursors until it needs the space for another cursor, which in my test case seems to happen when I enter a value of 50 or bigger for "number of loops". To see how oracle is reusing the cursors, while the test program is running I run SQL*Plus and query v$sesstat for the session that's running the test with the following sentence:
select name, value
from v$sesstat s, v$statname n
where s.statistic# = n.statistic#
and sid = 7
and name like '%cursor%';
Even before I enter a value for number of loops I can see that the session opened 4 cursors and closed 2 of them:
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 4
opened cursors current 2
Entering a value of 5 for number of loops yields
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 11 <----- 7+
opened cursors current 8 <----- 6+
With a value of 30
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 36 <----- 25+ (apparently, Oracle reused at least 5 cursors)
opened cursors current 33 <----- 25+
With a value of 47
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 53 <----- 17+
opened cursors current 50 <----- 17+
Now I reached the upper limit set by the initialization parameter open_cursors.
Entering a value of 48, I get the ORA-1000 error.
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SCOTT.EMP_DEMO
Since I open and close the cursor in the same loop iteration, I expect to find in every iterarion 1 explicit cursor and a number of implicit cursors (the PL/SQL call along with the so-called recursive cursors), but I don't expect the sum of all of them to be greater than 50. If my understanding is correct Oracle should be reusing the 50 cursors previously marked as "closeable", not raising the ORA-1000 error.
View 1 Replies
View Related
Oct 24, 2011
Is there any view in oracle 9i like V$RECOVERY_FILE_DEST where we can check the archive destination space utilization from database end ?
View 5 Replies
View Related
Jan 11, 2011
I want to replicate single table data/modification from source db to destination DB.procedure or steps how to create replication between source and dest db for single table.
View 18 Replies
View Related
Oct 18, 2010
Scenario:
Our application is using a two instance, one for the live active data and the other for the reports data. We have a process which moves the data from the live instance to reports instance every night. In a single db environment the process is working without any issues. However when we move to the RAC environment the reports db's (insert) in large table get locked and we are unable to insert data to the reports db.
What we are performing is:
Insert into my_table_rpt select * from may_table_live@db_link_to_livedb;
Issues:
my_table_rpt get locked
We have found the workaround by disable locking in destination and subsequent to the insert enable locking
ALTER TABLE my_table_rpt DISABLE TABLE LOCK;
Insert the data to the reports database table
Then
ALTER TABLE my_table_rpt ENABLE TABLE LOCK
Question:
Why does the large destination table (my_table_rpt) get locked in the RAC environment?
View 2 Replies
View Related
Nov 29, 2010
i am using client-server environment without using a domain.On One computer i have installed Oracle 8.0.5 and developer 2000. and on client side i have installed form 6i. i have made a service (star) in Tnsnames.ora in client side.
star.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROtoCOL = TCP)
(Host = server)
(Port = 1521)
)
)
(connect_DATA = (SID = ORCL)
)
)
--------------------------------------------
it gives me error:
ORA-12203:TNS :unable to connect to destination
View 6 Replies
View Related
Oct 31, 2011
how do i copy an image or a text file from ex: directory c to directory d
View 5 Replies
View Related
Aug 2, 2012
I have a situation where I want to configure primary database (11.2) with 2 remote destinations. dest_2 is the default and points to a standby on host_2. However, I also want the primary db to continue transporting redo to dest_3 on node_3 when node_2 is taken down (planned or unplanned).
1) Configure the ALTERNATE attribute of dest_2 to point to dest_3.
2) Configure tnsnames client-side failover on primary host to point to 2 nodes (node_2 and node_3).
View 1 Replies
View Related
Jul 20, 2009
We are using Oracle Streams for replication.
Column datatypes in some of the tables on Source and Destination are different (Number on Source and Varchar2 on destination).
Do we have to create any rule or dml handler to handle this or Streams will automatically take care of it?We are oracle 10g.
View 1 Replies
View Related
Feb 25, 2011
Is it possible to:
-define a cursor with bind variables
-get a cursor record from these cursor
-and pass the bind variable in the OPEN clause
Did'nt succeed as shown in the example.
SET SERVEROUTPUT ON SIZE 900000;
DECLARE
--works fine
CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<3;
--doesn't work
--CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<:1;
crec c1%rowtype;
BEGIN
--works fine
OPEN c1;
--isn't possible ?
--OPEN c1 USING 3;
[Code]....
View 3 Replies
View Related
Jul 10, 2010
when I am trying to send report for prints then I received this error.
"
REP-57054: In-Process Job terminated: The report generated successfully but distribution to destination failed.
REP-50159:The report generated Successfully but distribution to destination failed.
REP-50151: Destination ID Currency failed with error An error occured while sending the file to the printer :HPofficejetpro7700Series- Cannot run program "COrcaleMiddlewareasinst_5Config
eportsin
wlpr":
create process error=2, The system cannot fine the file specified."
View 6 Replies
View Related
Sep 11, 2011
just looking around to use the new feature available in oracle 11g to convert the dbms_sql numeric cursor to reference cursor, how to do it?
parse and execute the sql string first with dbms_sql and then convert it to ref cursor?
View 1 Replies
View Related
Nov 23, 2011
I want to return ref cursor based on explicit cursors
create table jumbo(id number, name varchar2(20));
insert into jumbo values(1,'jumbo');
create table mumbo(id number, name varchar2(20));
insert into mumbo values(1,'mumbo');
commit;
[Code].....
The above procedure has compilation errors when I am trying to open ref cursor
LINE/COL ERROR
-------- --------------------------------------------------------
20/24 PL/SQL: SQL Statement ignored
20/38 PL/SQL: ORA-00942: table or view does not exist
32/24 PL/SQL: SQL Statement ignored
32/38 PL/SQL: ORA-00942: table or view does not exist
SQL>
View 5 Replies
View Related