Using Merge in oracle 11g this error SQL Error: ORA-30926: failed to get a stable set of rows in the source tables
whenever I run this code I get this error
SQL Error: ORA-30926: failed to get a stable set of rows in the source tables
30926 00000 - "impossible to get a stable set of rows in the source tables.
* Cause: A stable set of rows could not be achieved due to the large dml
activity or one not deterministic where clause.
* Action: Remove any non deterministic of the clauses and reissue of the dml.
Don't know wht goes wrong!
SQL:
MERGE IN VENDORS_ACTIVE_DATE s
USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,
NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.
(case when ((d.VENDOR = s.VENDOR) and (d.COMPANY_CODE = s.COMPANY_CODE)))
)
then "MATCH".
When d.COMPANY_CODE is null
then 'DELETE '.
When s.COMPANY_CODE is null
then "INSERT."
else 'UPDATE '.
chck end)
from (select * from VENDORS_ACTIVE_DATE where COMPANY_CODE = 2) s
full outer join (select * provider where COMPANY_CODE = 2) d
on (d.COMPANY_CODE = s.COMPANY_CODE AND s.COMPANY_CODE = 2)
) d
WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.chck in ('UPDATE', 'GAME', 'DELETE'))
WHEN MATCHED THEN
UPDATE SET s.VENDOR = d.VENDOR
WHERE d.chck in ('UPDATE', 'DELETE')
DELETE WHERE d.chck = 'DELETE '.
WHEN NOT MATCHED THEN
INSERT (SELLER, COMPANY_CODE)
VALUES (d.VENDOR, d.COMPANY_CODE)
Work request: (deleted the duplicate data in tables (source and target))
MERGE IN VENDORS_ACTIVE_DATE s
USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,
NVL (d.ACTIVEDATE, s.ACTIVEDATE) ACTIVEDATE.
NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.
(case when ((d.VENDOR = s.VENDOR))
- AND D.ACTIVEDATE = S.ACTIVEDATE
and NVL (d.ACTIVEDATE, trunc (sysdate)) = NVL (s.ACTIVEDATE, trunc (sysdate))
and (d.COMPANY_CODE = s.COMPANY_CODE)
)
then "MATCH".
When d.COMPANY_CODE is null
then 'DELETE '.
When s.COMPANY_CODE is null
then "INSERT."
else 'UPDATE '.
chck end)
from (select * from suppliers where COMPANY_CODE = 2) d
full outer join (select * from vendors_active_date where COMPANY_CODE = 2) s
on (d.COMPANY_CODE = s.COMPANY_CODE and s.vendor = d.vendor)
) d
WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.VENDOR = s.VENDOR AND d.chck in ('UPDATE', 'GAME', 'DELETE'))
WHEN MATCHED THEN
S.ACTIVEDATE = UPDATE SET d.ACTIVEDATE
WHERE d.chck in ('UPDATE', 'DELETE')
DELETE WHERE d.chck = 'DELETE '.
WHEN NOT MATCHED THEN
INSERT (VENDOR, ACTIVEDATE, COMPANY_CODE)
VALUES (d.VENDOR, d.ACTIVEDATE, d.COMPANY_CODE)
Tags: Database
Similar Questions
-
Hi SQL & PL/SQL gurus...
A bit of advice please...
IM loading documents in the system... In this context, I have a routine that check the progress of loading (upload_records) against an existing table (supplier_records). If the details differ so it updates, and if the folder does not exist, it inserts a new record...
About 90% of the time, recording will be unchanged and the statement will do nothing...
The challenge I have is that I get the error above fairly regularly, because (I think) there are simultaneous users, loading documents in the system... so, both tables change regularly... The merge statement is below... but my question is: I would achieve anything by converting the merge statement into a PL/SQL loop that checks if the recordset contains a record that needs to either update or insertion? Would be the first simple quick check that reduction of 90% of the files works better, (with further processing if the folder must insert or update) and this would remove the error above, or the merge statement made the same thing anyway, and I should leave it as what? or is my incorrect merge statement and which contribute to the error? The merge statement, if it finds a match, updates the record anyway, even if she didn't need to... (which is not very effective)... However a pl/SQL loop will have to check if the record exists. check if it needs to be changed, change it if she does... Insert if the folder does not exist.
MERGE statement is:
MERGE INTO s suppliers
USING (select distinct (sup_provision_id),
provider,
sup_acc_holder,
sup_bank_acc,
sup_bank_name,
payments_upload sup_bank_branch
where csv_id =: P20_CSV_ID) could
WE (pu.sup_provision_id = s.supplier_id)
WHEN MATCHED THEN
GAME UPDATE
s.SUPPLIER = pu.supplier,
s.SUP_ACC_HOLDER = pu.sup_acc_holder,
s.BANK_ACC_NO = pu.sup_bank_acc,
s.BANK_NAME = pu.sup_bank_name,
s.BRANCH_NO = pu.sup_bank_branch
WHEN NOT MATCHED THEN
INSERT (s.SUPPLIER_ID,
s.SUPPLIER,
s.SUP_ACC_HOLDER,
s.BANK_ACC_NO,
s.BANK_NAME,
s.BRANCH_NO,
s.CAT)
VALUES (pu.sup_provision_id,
able. Beg,
Pu.sup_acc_holder,
Pu.sup_bank_acc,
Pu.sup_bank_name,
Pu.sup_bank_branch,
'S' );
Thank you very much
Richard
Hi, Richard,.
Richard Legge wrote:
Hello.. Thanks for the reply...... The reason for the 'distinct' to ensure that the query retrieves only one line (based on the extraction of the full line, as you point out)... (so why he would never get more than one?) Well Yes... know that the media are not quite relevant...
The reasoning is that out or 5000 records. 4000 will have the same provider... so want to retrieve a single record for what it (or other unique visitors who may be similar but have different criteria) and simply update the corresponding record, insert if there is no trace...
Rgds
Richard
SELECT DISTINCT guarantees that no 2 rows will be exactly alike. In other words, if you compare the 2 rows in the result set, either sup_provision_id supplier of GOLD supp_acc_holder for GOLD OR one of the other columns (or maybe 2 or more columns) will be different. It does not guarantee that any 1 column will be unique.
FUSION requires that, when a match is found, it should only be 1 line in the result set generated by the USING clause. Given that the matching condition is
WE (pu.sup_provision_id = s.supplier_id)
This means that pu_sup_provision must be unique. The ORA_30926 error occurs if it is not unique. SELECT DISTINCT to ensure that complete lines in pu are unique, but it does not guarantee that any single column will be unique.
Depending on your data and your needs, you may need to change the USING clause, so that sup_provision_id is unique. You may need to add more conditions to the WHERE clause, or do a GROUP BY or use an analytic function such as ROW_NUMBER.
If you need help, post a small example of data (that is, CREATE TABLE and INSERT statements for all the tables involved, as they are before the MERGER) and the exact results you want (that is, indicate which suppliers should contain after the MERGER).
Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?
-
Error: ORA-16757: failed to get the value of this property
Hi all
I have an error:
DGMGRL > see the database dbname_stb LogXptStatus;
Error: ORA-16757: failed to get the value of this property
I check:
DGMGRL > see the configuration;
Configuration - dbname_dg
Protection mode: MaxPerformance
Databases:
dbname_pr - primary database
dbname_stb - physical of the standby database
Fast-Start Failover: DISABLED
The configuration status:
SUCCESS
drcdbname_stb.log:
RSM0: Received the request the property Get: rid = 0 x 01010000, pid = 54
2012-10-17 15:21:14.702 of database Resource: get the LogXptStatus property
RSM 15:21:14.702 2012-10-17 error: trying to interview a 'LogXptStatus' primary type property on a standby database resource.
2012 10-17 error 15:21:14.702 database resource GetProperty (16501,16757)
I don't understand this error?
Thank you all.Take a look on this
-
VISA: (Hex 0xBFFF001) timeout expired before the operation is complete. I get this error when you run a VI (instrument is set up to be controlled remotely using the TCP/IP Protocol)
Please suggest a solution.
Thank you very much, it worked!
-
Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a damaged local profile. If the problem persists, contact your network administrator.
My documents are 'hidden' alsoxpconfused,
This article explains how to solve problems with a corrupted profile. Article After return your results. Mike - Engineer Support Microsoft Answers
Visit our Microsoft answers feedback Forum and let us know what you think. -
Update of several rows of the same table using trigger
Hello
I have the following table
---------------------------------------------------------------------------------------------------------
CREATE TABLE ATT_PERMISSIONS ( DATE OF PRMONTHYR, EMPID NUMBER (10) DEFAULT VALUE 0 , FROMDATETIME DATE , TODMTFDATETIME DATE , NUMBER OF PERMMINS (3), SSLINASTRETCH NUMBER (3).
PERMATTINELIGIBLE NUMBER (1) DEFAULT VALUE 0 ); ------------------------------------------------------------------------------------------------------
I want to update the column PERMATTINELIGIBLE in the same table when each line is inserted.
I created following trigger for that
CREATE OR REPLACE TRIGGER SSL_AFTER_UPDATE AFTER UPDATE ON ATT_PERMISSIONS
FOR EACH LINE
BEGIN
Update ATT_PERMISSIONS set PERMATTINELIGIBLE =
(
SELECT THE CHECK BOX
WHEN PERMMINS < = 60
or
(
PERMMINS < = SSLINASTRETCH
AND
COUNT (CASE WHEN PERMMINS = 0 THEN NULL OTHERWISE 1 END)
COURSES (PARTITION BY empid, prmonthyr) < = 1
)
THEN 1
0 OTHERWISE
END
FROM ATT_PERMISSIONS where prmonthyr =:new.prmonthyr, empid =:new.empid
) where prmonthyr =:new.prmonthyr, empid =:new.empid;
END;
---------------------------------------------------------------------------------------------------
That is to say.
When a row is inserted the PERMATTINELIGIBLE of all records for this employee for the month is recalculated.
There would be only two or three records for an employee for a month.
PERMMINS is the number of minutes to use as short leave.
If it is less than 60 is eligible for the bonus to attendance for this employee.
If this isn't normally the date is not eligible for the attendance for this employee premium.
but an exception is that if a short leaves of DISP employee allowed a month (IE. ( SSLINASTRETCH ) in a straight line, IE. one day, that day is eligible for the bonus of presence.
That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is lower to SSLINASTRETCH, then the day is eligible for the attendance bonus.
But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.
Help, please
I use oracle 10g
I want to update the column PERMATTINELIGIBLE in the same table, when each row is inserted.
No - you do NOT want to do in a trigger.
You cannot query the same table that the trigger is activated on. -C' is a MUTANT and you will get an exception.
When a row is inserted is recalculated to the PERMATTINELIGIBLE of all the records for that employee for that month.
There would be only two or three records for an employee for a month.
PERMMINS is the number of minutes to use as short leave.
If it is less than 60 is eligible for the bonus to attendance for this employee.
If is not normally the day is not eligible for the premium of attendance for this employee.
but an exception is that if a short leaves of DISP employee allowed a month (IE. SSLINASTRETCH) in a straight line, IE. one day, that day is eligible for the bonus of presence.
That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is less than SSLINASTRETCH, then the day is eligible for the bonus of presence.
But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.
You can not do in a trigger. Even if correct you this error of syntax, you will get the exception that I mentioned above.
Oracle is a multi-user system. Other users can modify the same table that you use.
So even if you could try to interview "all the records for this employee" some of them may be locked if other users access them. Also, an insert statement could try to insert two rows for an employee and the trigger could not have seen the other lines still.
If you want to work with data SETS (all records for an employee), you must write the PL/SQL code that LOCKS all lines updated to prevent others to interfere.
Then you make your operations but NOT in a trigger. Perform inserts and then use an UPDATE query to set this value.
Then VALIDATE to unlock the lines.
-
I recorded a XMLschem in the Oracle XDB repository to load the XML file into the oracle tables using storage relational object. In this process, I'm trying to remove the xmlschema to sign up again with a few changes in the XSD file, but I'm not able to remove it and I get the error ORA 04022 no waiting asked, but had to wait to lock the dictionary objects... Before that, I deleted the xmlschem 2 - 3 times and it worked fine. But now I have this error.
I tried to remove it with "DELETE_CASCADE" and also tried "DELETE_CASCADE_FORCE" and in both cases, I get the same error.
I've waited 2-3 days and then retried still had the same error.
Could you please help me to solve this problem.
Here is the screenshot of the error
I also tried to purge the schema, as shown below, but I get the error access denied. I'm stuck here, could not move before working on it.
Select * from dba_xml_schemas, where qual_schema_url like '% HPO484% '; -1B01B74F95BE1C91E0540021287E70DC
BEGIN
DBMS_XMLSCHEMA. PURGESCHEMA (schema_id = > '1B01B74F95BE1C91E0540021287E70DC');
END;
It throws below error
ORA-31050: access denied
ORA-06512: at "XDB". DBMS_XMLSCHEMA", line 109
ORA-06512: at line 1
Could you please help me with this.
Thank you
Reva
Is it possible to reproduce the problem?
You have a table that references the schema?
Check with your DBA if there is no locking assets library.
-
More about "ERROR: failed to create a snapshot of a volume of the source.
I saw the previous posts on this and have tried to follow all the advice, but nothing helped. I am running XP and you have two hard drives, NTFS and both have plenty of space. My destination is an external hard drive, FAT32, with plenty of room. I get the ERROR message: failed to create a snapshot of a volume of the source. Ppossible causes include not seen all NTFS volumes on Windows XP or Windows 2003 source systems with no is not enough of disk space.
I installed the converter as an administrator, I rebooted several times, I ran / f checkdsk on both hard drives and external drives, I have disabled all the services that I am uncomfortable, turn off, but just, I get this message. I have attached the log file.
Thanks for any help.
drbking wrote:
I see that a small part of my answer was missing - the microsoft running thing, I found I was missing vssui.dll. Downloaded, ran the microsoft thing and am now running the converter again. Know in the morning, if it works (takes about 9 hours).
How is the conversion?
-Ryan
-
original title: rules of the administrator
Try to load Quick time. All goes well until I get "administrator has set policies that prohibit the installation of this program.
I am the system administrator, logged as such, can't find a way to change these policies of 'administratoer' to allow me to download and install a program that I want to install!
Hi J1walters,
· The computer is connected to a domain network?
· Which edition of Windows vista is installed on the computer?
· You are able to install other programs outside of Quicktime?
However, you can try the steps below and check if it helps to install Quick time.
Method 1
a. open the location of the downloaded program.
b. right click on Setup.exe or install icon.
c. click the run as Administrator option.
Check if the program is installed.
Method 2
Try to temporarily disable control user account (UAC) on the computer and try to install the program and check if he moved very well. Subsequently re-enable the UAC settings after installing the program.
Access the link below to see how to enable and disable the UAC settings.
http://Windows.Microsoft.com/en-us/Windows7/turn-user-account-control-on-or-off
I hope this helps. Let us know the results.
Thank you and best regards,
Srinivas R
Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think.
-
How to use ed in oracle 11g, as we do in 10g
Hello
Anyone can u tell me how to use the text editor in oracle 11g under
We do this in 10g.
Thank you
SrinivasSrinivas wrote:
Hello
I did DEFINE _EDITOR = Notepad
and used his giving ed
A written file afiedt.buf
/ bin/bash: Notebook: command not found1 * Select * from EMP
The last time I checked, for the * nix systems, the parameter + define _editor + has been set at vi . Isn't the notebook as value is for windows or miss me something?
Aman...
-
Oracle 11g XE and SQL Developer
Hello:
Very new here. I don't know where to post anything. My apologies, but I'm all over the room.
I installed 11g and downloaded SQL Developer (not even sure if it should be "installed" because it's just a zip file).
In any case, on the SQL command line I get SYSTEM CONNECT, then my password. I get the following error:
ORA 12154: TNS could not resolve the connect identifier specified.
Also, the "get started" link not working anymore. Don't know what's happening, or if it is specific to my laptop. I tried to connect two days without result.
Thanks for any help.
Your headset does not work: OracleXETNSListener service started?
-
HI EXPERTS...
Please helpme to fix this...
I have a database of oracle 11g, runnint on a Windows Server 2008:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
I have two tables:
CREATE TABLE UTILS. SEG_ROLES
(
VARCHAR2 (12-BYTE) APPLICATION,
ROL VARCHAR2 (12-BYTE),
USERS VARCHAR2 (255 BYTE)
)
TOGETHER TO DEFINE
Insert into SEG_ROLES (APPLICATION, ROL, USERS) Values ('MULTIPLAN', 'ADMIN', 'ADMIN');
Insert into SEG_ROLES (APPLICATION, ROL, USERS) Values ("MULTICLIP", 'CAR01', 'PATY');
Insert into SEG_ROLES (APPLICATION, ROL, USERS) Values ("MULTICLIP", "CAR02", "FABIOLA, ERIKA");
Insert into SEG_ROLES (APPLICATION, ROL, USERS) Values ("MULTICLIP", "CON01', 'LUCY, PATY');
Insert into SEG_ROLES (APPLICATION, ROL, USERS) Values ("MULTICLIP", 'CON02', 'VALERIA');
COMMIT;
CREATE TABLE UTILS. SEG_ACCESOS
(
VARCHAR2 (12-BYTE) APPLICATION,
ADMROL VARCHAR2 (12-BYTE),
VARCHAR2 (20 BYTE) MENU,
OPCION VARCHAR2 (20 BYTE),
TYPE VARCHAR2 (5 BYTE),
OBJETO_MENU VARCHAR2 (40 BYTE),
ACCESO VARCHAR2 (2 BYTE),
ROLES_ACCESOS VARCHAR2 (255 BYTE)
)
TOGETHER TO DEFINE
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "ROOMMA", NULL, am', 'm_coloca', the of ', 'CAR01, CAR02');
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "PUT", "PREVALIDA", "SM", "sm_prevalida", the from ', 'CAR01, CAR02');
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "PUT", "PRECOLOCA", "SM", "sm_preColocacion", the from ', 'CAR01, CAR02');
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", 'ADMIN', 'LOVE', "COLOCACIÓN", "SM", "sm_colocacion", the from ', "CAR01");
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "PUT", "REGCOLOCA", "SM", "sm_regcoloca", the from ', "CAR01");
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "LDP", NULL, am', 'm_PLD', the of ', "CAR01, CAR02, CON01 CON02");
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "LDP", "LN_CONSULTA", "SM", "sm_PLD_LNConsulta", the from ', 'CAR01, CAR02');
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "LDP", "LN_BARRIDOMASIVO", "SM", "sm_PLD_LNBarridoMasivo", the from ', "CAR01");
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "LDP", "REP_INICICLO", "SM", "sm_PLD_ReporIniciclo", the from ', 'CON01, CON02');
Insert into SEG_ACCESOS (APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS)
Values ("MULTICLIP", "ADMIN", "LDP", "LN_BITACORA", "SM", "sm_PLD_LNBitacora", the from ', "CON01");
COMMIT;
- And this point of view:
CREATE VIEW UTILS. VW_ROL_USER AS
Select distinct APPLICATION, ROL, trim (column_value) USUARIO
from (SELECT APPLICATION, ROL, USERS USER
FROM UTILS. SEG_ROLES
WHERE IT IS NOT NULL TO USERS
ORDER BY APPLICATION, ROL
) t,.
XMLTable ((' «' ||)) Replace (USER, ",", "",""). '"'))
order by APPLICATION, ROL, trim (column_value)
CREATE VIEW UTILS. VW_ACC_ROL AS
Select distinct APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, trim (column_value) ROL
(SELECT APPLICATION, ADMROL, MENU, OPTION, TIPO, OBJETO_MENU, ACCESO, ROLES_ACCESOS ROL
FROM UTILS. SEG_ACCESOS
WHERE ROLES_ACCESOS IS NOT NULL
ORDER BY APPLICATION, ADMROL, MENU, OPTION
) t,.
XMLTable ((' «' ||)) Replace (ROL, ",", "",""). '"'))
MENU, TYPE, OPTION, APPLICATION control, trim (column_value)
CREATE VIEW UTILS. VW_SEG_ACCESOS AS
SELECT VACR. APPLICATION, VACR. MENU, VACR. TIPO, VACR. OPCION, VACR. OBJETO_MENU, VACR. ACCESO, VACR. ROL, VUSR. USUARIO
FROM UTILS. VW_ACC_ROL VACR,
UTILS. VW_ROL_USER VUSR
WHERE VACR. ROL = VUSR. ROL
ORDER OF VACR. APPLICATION, VACR. ROL, VACR. MENU, VUSR. USUARIO, VACR. TIPO, VACR. OPCION
When I ask the last posting, it works fine:
SELECT VSEG.* IN UTILS. VW_SEG_ACCESOS VSEG
But when I add conditions:
SELECT VSEG.* IN UTILS. VW_SEG_ACCESOS VSEG
WHERE VSEG. APPLICATION = "MULTIPLAN.
AND VSEG. USER = 'PATY '.
It generates this error:
ORA-22813: value of the operand is greater than the limits of the system
Cause: The value of the object or the Collection was too big. The size of the value might have exceeded 30 k in a context of TYPE, or size may be too large for the available memory.
Action: Choose a different value, and try the operation again.
Why?
Thanks in advance...
Finally found a SOLUTION at: http://stackoverflow.com/questions/14328621/oracle-10g-splitting-string-into-multiple-rows
just change the way we create the view using the regexp_substr.
CREATE VIEW UTILS. VW_ROL_USER AS
SELECT distinct trim APPLICATION, ROL, (regexp_substr (USERS, ' [^,] +', 1, level)) USER
FROM UTILS. SEG_ROLES t
WHERE IT IS NOT NULL TO USERS
CONNECTION BY instr (USERS, ',', 1, level - 1) > 0
order by APPLICATION, ROL
Thank you all
-
Hello
Run immediately is to give different results
But,SQL> declare 2 v varchar2(30):='SAL'; 3 Begin 4 execute immediate 'update emp set :1=1000 where empno=7900' using v; 5 end; 6 / declare * ERROR at line 1: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06512: at line 4
Can someone kindly explain to me the reason.SQL> declare 2 v varchar2(30):='SAL'; 3 Begin 4 execute immediate 'update emp set ' ||v||'=1000 where empno=7900'; 5 end; 6 / old 7900 new 7900 PL/SQL procedure successfully completed.
I need to accomplish a task using the first way.
What could be the solution to the above ORA error?
Thank youColumn names cannot be used as a bind variable.
If you do not need to do this using method 1 as method 1 does not work by design.
On the other hand, you need replace the literal (7500,7900) with a variable binding.--------
Sybrand Bakker
Senior Oracle DBA -
will be crazy with this error - ORA-12514
Hi all.
I have a big problem with this error.
Facts:
-oracle 10.2.0.1
-64-bit RHEL version 5.
In my PC, I have in my tnsnames.ora:
PLELPP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.140.60)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PLELPP. KOURA. THE GOVERNMENT OF BANGLADESH. EP)
)
)
When I run tnsping
C:\Documents and Settings\chijar\Escritorio > tnsping plelpp
AMT Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 18-DEC-2008 17:05:36
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Archivos of parssmetros band:
f:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora
Useful TNSNAMES used para resolver el alias
Try to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.16)
8.140.60)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = PLELPP. KOURA. THE GOVERNMENT OF BANGLADESH. PE)))
Correctamente s (20 msec)
In SERVER, the values are:
My listener.ora
listener.ora # Network Configuration file: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = u01/app/oracle/product/10.2.0/db_1)
(= Extproc PROGRAM)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.140.60)(PORT = 1521))
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC0))
)
)
my tnsnames.ora - this is the server:
tnsnames.ora # Network Configuration file: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PLELPP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.140.60)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = plelpp.mintra.gob.pe)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
* lsnrctl listener status *.
[oracle@urano ~] $ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on December 18, 2008 17:09:34
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=192.168.140.60) (PORT = 1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start date December 18, 2008 16:51:54
Uptime 0 days 0 h 17 min 40 sec
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Parameter Listener of the /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora file
The listener log file /U01/app/Oracle/product/10.2.0/Db_1/network/log/listener.log
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.140.60) (PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC0)))
Summary of services...
Service 'PLSExtProc' has 1 instance (s).
Instance of 'PLSExtProc', status UNKNOWN, has 1 operation for this service...
The command completed successfully
[oracle@urano ~]
lsnrctl service
[oracle@urano ~] $ lsnrctl service
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on December 18, 2008 17:10:19
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=192.168.140.60) (PORT = 1521)))
Summary of services...
Service 'PLSExtProc' has 1 instance (s).
Instance of 'PLSExtProc', status UNKNOWN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 0 denied: 0
LOCAL SERVER
The command completed successfully
[oracle@urano ~] $
when I want to connect through netservices *.
ORA-12514: TNS:listener is not currently of service requested in connect.
Can you help me???
Thank you very much.
CaesarFrom my previous post:
If this does not show us:
SQL > show the service_name parameter
SQL > show the db_name parameter
SQL > show the db_domain parameter >Enrique
PS. SID_NAME is case-sensitive so change it to lowercase:
(SID_DESC = (GLOBAL_DBNAME = PLELPP.MINTRA.GOB.PE) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (SID_NAME = plelpp) )
Published by: Enrique Orbegozo on December 22, 2008 12:37
-
ORACLE auxiliary database error: ORA-01152: 2 file was not restored en
Hello
I'm trying to clone a database. It is in log mode archive.
I took a complete using below command
then I run a duplicate database commandrun { backup tag 'DAILY_WHOLE' format 'FULL_backup_%s_%p_%c.bkp' database plus archivelog tag 'DAILY_WHOLE' delete all input; backup current controlfile format 'FULL_backup_%s_%p_%c.bkp' tag 'WHOLE' spfile format 'FULL_backup_%s_%p_%c.bkp' tag 'WHOLE'; }
in the end, I got this error.RUN { DUPLICATE DATABASE TO TEST_DB NOFILENAMECHECK NOREDO BACKUP LOCATION '/disk10/flash_recovery_area/PROD'; }
Can someone help me? I'd be happy. Thank youcontents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 05/15/2013 11:59:21 RMAN-05501: aborting duplication of target database RMAN-03015: error occurred in stored script Memory Script RMAN-06136: ORACLE error from auxiliary database: ORA-01152: file 2 was not restored from a sufficiently old backup ORA-01110: data file 2: 'sysaux.dbf'
NOREDO would be used when you have a consistent backup (i.e. backup performed while the database is mounted, but is not OPEN) and so any archivelogs must be applied. (It would also be the case for a NOARCHIVELOG database).
See the notes on NOREDO in order to DUPLICATE documentation in the backup and recovery of reference.
http://docs.Oracle.com/CD/E11882_01/backup.112/e10643/rcmsynta020.htm#i81724
Hemant K Collette
Maybe you are looking for
-
Thunderbird running on the latest Mac OS. After the update to thunderbird at 38.3.0, I can create is more new events on my calendar (4.0.3 Lightning). I can see the "New event" selection when I click right on the screen of the calendar - but is greye
-
Question about the specification of the two Tecra 8000
I have 2 Tecra 8000 with the following specifications. : Intel Mobile Pentium II 400 MHz processor14.1 LCD256 MB PC6630 GB HARD DRIVE -------------- Intel Xeon Pentium II 300 MHz13.3 LCD128 MB PC10030 GB HARD DRIVE My question is, who do you think is
-
does anyone know how to get this dialogue to show once again? I looked everywhere: config and cannot find how I can return this dialogue. On my Mac FF 3.5, I said 'decline' once for my webmail companies by accident and now I can't get this dialogue.
-
Error in the product recovery CD
Hello I have Toshiba Satallie A110-195Today, I tried to use it to shape the product but when recovery reached 66%, he is arrested and this message ((ERREUR: ne PEUT PAS LIRE DE COMPRESION FILE (1).)) What is the problem?Is the CD or CD drive problem?
-
It seems that I have problems similar to many others in the connection of remote clients to a PIX 515E. Currently, I have tried both the client VPN Cisco 3.6 and 4.03 without success. Users are authenticated very well and the customer, you can see th