Error in Run of SQL command
Dear Sir,
I use the Oracle version 10i.
when I execute the simple create table using that command.
create table citylist
(name varchar(20),
state varchar(20),
population number(8),
zipcode number(5) unique);
Table created.
when I Insert the data in that table using command:
INSERT INTO citylist
VALUES ('vijay', 'Haryana', 20000 ,1234);
It give a Error:
ORA-00911: invalid character
Please help me...
-Vijay.
Can't see why - the way it's posted it works fine over here.
Similar Messages
-
Getting windows error during running the sql scripts from form 6i
I made a little form application. The purpose of this application is to generate explain plan for a particular SQL. Some sql scripts run internally in order to populate the result on forms screen after pressing the forms button but I am getting windows error during running the sql scripts from form 6i.
I am using forms 6i with patch 17 with Oracle 10G database on windows 2000 professional on same computer.
This application runs fine with 8i.
Please inform me where the problem is and how to overcome it.
Zafri.I am using Text_IO in my form's when button press trigger , inorder to create the
text file, then in the same when button press triger
I am calling RMAN via host command in order to run the script which was created by text_IO.
Below you find some of the code. I will appreciate if you solve the problem.
when button press trigger:
Declare
in_file3 Text_IO.File_Type;
linebuf3 VARCHAR2(1800);
output11 varchar2(1000);
BEGIN
output11:='C:\EXPLAIN_PLUS\misc\rm_file.bat ';
Host(output11,no_screen);
:sql.execution_plan:= 'Working........................';
synchronize;
in_file3 := Text_IO.Fopen('c:\explain_plus\misc\create_table.txt', 'w');
Text_IO.Put_Line(in_file3, linebuf3);
Text_IO.put_line(in_file3,' ');
Text_IO.put_line(in_file3,' run { sql "create table PLAN_TABLE (statement_id,...object_name varchar2(30),object_instance numeric,object_type varchar2(30),optimizer varchar2(255),search_columns number,id .....partition_start varchar2(255),partition_stop varchar2(255),partition_id numeric,other long,distribution varchar2(30)) "; } ');
Text_IO.put_line(in_file3,' ');
Text_IO.put_line(in_file3,' ');
Text_IO.FCLOSE(in_file3)
Declare
un VARCHAR2(80);
pw VARCHAR2(80);
cn VARCHAR2(80);
output VARCHAR2(1000);
output2 VARCHAR2(1000);
dummy varchar2(40);
in_file Text_IO.File_Type;
linebuf VARCHAR2(1800);
BEGIN
Get_Connect_Info(un,pw,cn);
/* for Plan_table Begg. Second INNER BLOCK */
declare
dummy2 varchar2(40);
begin
select table_name into dummy2 from all_tables where table_name='PLAN_TABLE';
if dummy2 = 'PLAN_TABLE' then
output2:='rman target/ nocatalog @C:\EXPLAIN_PLUS\MISC\TRUNC2.txt ' ;
Host(output2,no_screen);
end if;
exception
when no_data_found then
output2:='rman target/ nocatalog @C:\EXPLAIN_PLUS\misc\create_table.txt ';
Host(output2,no_screen);
end; -- -
Error while running catmetx.sql
Have anybody received an error while running CATMETX.SQL in attempt to fix a known problem in 10gR2 - inconsistent datatype: expected BLOB, CLOB got CHAR?
Any and all ideas appreciated.
Greg
Here is what I've got:
SQL> @catmetx
Package altered.
Index altered.
create or replace force view sys.ku$_xmlschema_view of sys.ku$_xmlschema_t
ERROR at line 1:
ORA-22973: size of object identifier exceeds maximum size allowed
Grant succeeded.
View created.
etc.Before I'm willing to hazard a guess as to what is wrong some more information is required.
1. What version are you on exactly (to 3 or 4 decimal places)
2. What problem led you to decide to run catmex.sql?
3. What metalink doc did you read that indicated you should?
4. What are the results of the following queries?
SELECT comp_name, version, status
FROM dba_registry;
SELECT owner, object_name, object_type
FROM dba_objects
WHERE status = 'INVALID';The alternative is an SR at metalink. -
How to run PL/SQL commands in this SQL browser
How to run PL/SQL commands in this SQL browser
This discussion should help Re: my pl/sql codes does not run in express edition what can i do????
-
ORA-600 [17069] error while running catrelod.sql to downgrade 11g database
Hi,
We are downgrading our 11.2.0.2 database to 10.2.0.4. We have successfullly run catdwgrd.sql without any errors in 11g env. While running catrelod.sql in 10g env we are facing the following error:
SQL> @?/rdbms/admin/catrelod.sql
TIMESTAMP
COMP_TIMESTAMP RELOD__BGN 2013-04-24 20:15:39 2456407 72939
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database server version is not 10.0.0.
DOC> Shutdown ABORT and use a different script or a different server.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
no rows selected
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database has not been opened for MIGRATE.
DOC>
DOC> Perform a "SHUTDOWN ABORT" and
DOC> restart using MIGRATE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
no rows selected
Session altered.
Session altered.
no rows selected
DECLARE
ERROR at line 1:
ORA-00600: internal error code, arguments: [17069], [0x170FB8CA8], [], [], [],
[], [], []I have checked the trace file in udump but it dint give any readable information.
Please find below environment details.
OS : RHEL 5 64 bit
11g Database : 11.2.0.2
10g Database : 10.2.0.4
Kindly assist.KR10822864 wrote:
Whenever an ORA-600 error is raised a trace file is generated and an entry written to the alert.log with details of the trace file location. Starting with Oracle Database 11g Release 1, the diagnosability infrastructure was introduced which places the trace and core files into a location controlled by the DIAGNOSTIC_DEST initialization parameter when an incident, such as an ORA-600 is created. For earlier versions, the trace file will be written to either USER_DUMP_DEST (if the error was caught in a user process) or BACKGROUND_DUMP_DEST (if the error was caught in a background process like PMON or SMON). The trace file contains vital information about what led to the error condition
please post 40 lines of alert log info .
MOS Note:ORA-600 [17069] "Failed to pin a library cache object after 50 attempts" [ID 39616.1]
"Look in the trace file for the text 'LIBRARY OBJECT HANDLE: handle=170fb8ca8'"
if not found any massages like above please raise [email protected].
Hi KR,
Thanks for your help. As suggested I have checked the trace file to search and found the below info. I suppose it is some kind of lock but not sure about it. Please let me know if the following makes sense:
SO: 0x21158a6e0, type: 3, owner: 0x211006f28, flag: INIT/-/-/0x00
(call) sess: cur 211572570, rec 211572570, usr 211572570; depth: 0
SO: 0x21158a9b8, type: 3, owner: 0x21158a6e0, flag: INIT/-/-/0x00
(call) sess: cur 211572570, rec 0, usr 211572570; depth: 1
SO: 0x1727a2618, type: 54, owner: 0x21158a9b8, flag: INIT/-/-/0x00
LIBRARY OBJECT PIN: pin=1727a2618 handle=170fb8ca8 mode=S lock=171243e98
user=211572570 session=211572570 count=1 mask=001d savepoint=0x43 flags=[00]
SO: 0x171243e98, type: 53, owner: 0x21158a9b8, flag: INIT/-/-/0x00
LIBRARY OBJECT LOCK: lock=171243e98 handle=170fb8ca8 mode=S
call pin=0x1727a2618 session pin=(nil) hpc=0000 hlc=0000
htl=0x171243f18[0x17278a310,0x17278a310] htb=0x17278a310 ssga=0x172789928
user=211572570 session=211572570 count=1 flags=PNC/[0400] savepoint=0x43
LIBRARY OBJECT HANDLE: handle=170fb8ca8 mtx=0x170fb8dd8(0) cdp=0
name=SYS.STANDARD
hash=51570e225ed8a9a803b7318f191e0a8d timestamp=04-18-2006 00:00:00
namespace=TABL flags=KGHP/TIM/SML/[02000000]
kkkk-dddd-llll=0000-001d-001d lock=S pin=S latch#=3 hpc=0004 hlc=0004
lwt=0x170fb8d50[0x170fb8d50,0x170fb8d50] ltm=0x170fb8d60[0x170fb8d60,0x170fb8d60]
pwt=0x170fb8d18[0x170fb8d18,0x170fb8d18] ptm=0x170fb8d28[0x170fb8d28,0x170fb8d28]
ref=0x170fb8d80[0x170fb8d80,0x170fb8d80] lnd=0x170fb8d98[0x170f05b50,0x170fa6858]
LIBRARY OBJECT: object=170e82de8
type=PCKG flags=EXS/LOC[0005] pflags=NST/IVR[0201] status=VALD load=0
DATA BLOCKS:
data# heap pointer status pins change whr
0 170e831f8 170e82fc0 I/P/A/-/- 0 NONE 00
SO: 0x21158e470, type: 5, owner: 0x21158a6e0, flag: INIT/-/-/0x00
(enqueue) CU-70E88BC0-00000001 DID: 0001-001F-00000004
lv: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 res_flag: 0x2
res: 0x17677adc8, mode: X, lock_flag: 0x0
own: 0x211572570, sess: 0x211572570, proc: 0x211006f28, prv: 0x17677add8
SO: 0x177f82c28, type: 59, owner: 0x21158a6e0, flag: INIT/-/-/0x00
cursor enqueue
child: 170e89348, flag: 53, number: 0
parent: 170e89738 -
Query running on sql commands prompt not running on report region
Hi All,
Facing a weird issue now. I have written a report query which is running absolutely fine in sql command prompt but when i trying to run this as a report it is just processing and the report is not loading. What could be the reason behing this?
Thanks in Advance
RegardsHi,
With no other information about the problem is hard to know what's happening. If you could at least provide us with the query then I think it would be easier for us to help you.
Regards,
Sergio -
Error while running awrrpt.sql for Automatic Workload Repository Report
Hi
I am trying to run awrrpt.sql.While running the query in sql*plus it ask me for file format then no of days
& then begin & end snapshot Id & then eventually the sql*plus session get closed . I am unable find
why sql*plus session getting closed automatically.Please tell me How to run awrrpt.sql to generate AWR reports. Please guide.1008032 wrote:
Dear
This is happen due to you are given the begin snap id and end snap id not between the shut down time .EX begin snap it at 12 am 1521 and you shut down at 12:30 am and you you give the 1:00 am snap id 1522 .That time system can not collect the statistics betwwn 1521 and 1522.
Or you should enable statistics_level parameter if it 11gr2 you should enable controlfile_management_pack _access='DIAGNOSTIC+TUNING'
issue not resolved please post your error..........
Thanks®ards
SS.vijaibabuI checked my statistics_level it shows value TYPICAL which I think is right.
SQL> sho parameter statistics_level
NAME TYPE VALUE
statistics_level string TYPICALAlso I given snap id which between single startup & shutdown still the problem is same sqlplus session get closed after asking for snal ids.
If error gets generated where it gets generated? -
Hi,
We are in the process of upgrading the database from Oracle version 8.1.7.0 to 8.1.7.4
For that we are applying the patch no. 2376472
As per the patch we have run catproc.sql script.
On running the script we are getting below mentioned errors,
BEGIN
ERROR at line 1:
ORA-24001: cannot create QUEUE_TABLE, SYSTEM.DEF$_AQERROR already exists
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2049
ORA-06512: at "SYS.DBMS_AQADM", line 55
ORA-06512: at line 2
BEGIN
ERROR at line 1:
ORA-24006: cannot create QUEUE, SYSTEM.DEF$_AQERROR already exists
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2346
ORA-06512: at "SYS.DBMS_AQADM", line 114
ORA-06512: at line 2
PL/SQL procedure successfully completed.
The above error has been generated while creating the Queue and Queue_Table.
Where i have done mistake ?
Kindly provide guidance.
With RegardsIgnore these errors
http://www.cs.uvm.edu/oracle9doc/server.901/a90191/migmumsg.htm#72864 -
Oracle 9i export error after running catexp.sql file
After running catexp.sql file in oracle 9i 9.2.0.7.0 as system user,it gives the following error while logging
ORA-04020: deadlock detected while trying to lock object SYS.DBMS_STANDARD
please help me.............."catexp.sql" is to be run by SYS AS SYSDBA.
You'd have to cleanup any extra objects that you created in the SYSTEM account.
Why did you think that you needed to run "catexp.sql" ? Are you exporting using 9i exp against a 10g database or against a 9i database ? -
Several errors after running catalog.sql
I did a fresh installation of oracle apps EBS 11.5.10.2 on Linux OEL and was trying to do an import/export and it was not working as expected. So after i looked at Oracle's documentation it said catalog.sql has to be run before using the import/export. So i ran catalog.sql first but i did not run it with SYSDBA but ran it as SYSTEM and i saw several errors like access denied etcv. after i ran the catalog.sql i was not able to login via apps or any other user except SYSTEM and was giving me erros like ORA-04065:not executed,altered or dropped stored procedure "SYS.DBMS_SESSION"
After this to fix the issue i ran @?/rdbms/admin/catpatch.sql and @?/rdbms/admin/utlrp as SYSDBA but both executed a lot of grants etc but are haging at some point and not finishing.
The current state of the database is that im not able to login via any user except SYSTEM and i think i corrupted the db dictionary as everywhere i see they say running catalog.sql on an existing database is a bad idea. Can anyone help?Hi Dheeraj,
My db version is 9.2.0.5.0 and OS is OEL 5.7.
The doc where it was mentioned to run catalog.sql before using import/export is below:
http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm
Please do not follow the steps in this link and instead follow the steps in (9i Export/Import Process for Oracle Applications Release 11i [ID 230627.1]).
Currently when im trying to login using apps or any other user below are errors i get.
ERROR:
ORA-00604: error occurred at recursive SQL level1
ORA-04068: existing state of packages has been discarded
ORA-04065: not executed, altered or dropped stored procedure "SYS.DBMS_SESSION"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512:at "SYS.OWA_VPD_CTX", line 5
ORA-06512:at "SYS.PORTAL_LOGIN", line 3
ORA-06512:at line 2
Can you pls help me to fix this.The status of the package is invalid and you need to validate it. Connect as sysdba and issue:
SQL> select owner, object_type, status
from dba_objects
where object_name = 'DBMS_SESSION';
SQL> alter package DBMS_SESSION compile body;
SQL> show error
SQL> alter package DBMS_SESSION compile;
SQL> show errorPlease also see:
Data Dictionary Objects Invalid after Running catalog.sql, catproc.sql, utlrp.sql or catpatch.sql [ID 752783.1]
Debug and Validate Invalid Objects [ID 300056.1]
How to Diagnose Invalid or Missing Data Dictionary (SYS) Objects [ID 554520.1]
Thanks,
Hussein -
Encounter the 0ra-01921 error when run catlog.sql on 11g windows server
I am using sys account to run catlog.sql there is an error : ERROR at line 1:
ORA-01921: role name 'IMP_FULL_DATABASE' conflicts with another user or role name
when I try to run it with my dba account it cause more error????
Thank YouI am using sys account to run catlog.sql there is an
error : ERROR at line 1:
ORA-01921: role name 'IMP_FULL_DATABASE' conflicts
with another user or role name
when I try to run it with my dba account it cause
more error????
Thank Youyou mean catalog.sql ?
What's the reason you want to regenerate database dictionary?
when you run catalog.sql and catproc.sql on live database you will get these errors because the objects already exists. You can ignore them. You will get other errors when create public synonym etc.. -
Error in running InstallOracleProfile.sql
goog evening,
i installed oracle XE and odac tool kit for asp.net in my pc.when i am trying to run InstallOracleProfile.sql i am getting
ORA-01917: user or role 'ORA_ASPNET_PROF_FULLACCESS' does not exist
can any one help me in solving this problem
thank you
prakashno sir, after u said i made it run and every thing is fine now thank u sir.....
-
Xml query error. ORA-00933: SQL command not properly ended
Hi all,
My Database Version: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0.
CREATE table test (Name varchar2(3), Id number);
insert into test values ('abc', 61);
insert into test values ('def', 46);
select table_name,
column_name,
'abc' search_string,
result
from cols,xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| 'abc' || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('TEST');
and i get: ORA-00933: SQL command not properly ended it points over '*xmltable*'ok, its possible to get output from a xml like this.
i need output like this,
customerid CustomerName Country
1 xxxx 4
2 yyyy 5
xml:
<Customer>
<CustomerInformation>
<Customerid>1</Customerid>
<CustomerName>xxxx</CustomerName>
<Country>4</Country>
</CustomerInformation>
<CustomerInformation>
<Customerid>2</Customerid>
<CustomerName>yyyy</CustomerName>
<Country>5</Country>
</CustomerInformation>
</Customer>
This xml is input to my stored procedure, i need to insert the xml tag values into customner_table.
For this i insert the xml inro a xml_document_table having a xmltype column.
after , by using the below mentioned query to select xml_tag values from that column.
when i execute this query
INSERT into customer_table(customer_id)
SELECT X.XML_DOCUMENT.extract('/Customer/commodityInfo/CustomerInformation/Customerid/text()').getStringVal() "Customerid" from XML_DOCUMENT_TABLE X;
i got output in a single row.
customerid_
1 <next line> 2
But i need output like this,
Customerid_
1
2
im struggling with this simple insert. pls share ur idea.....
Edited by: 887268 on Apr 4, 2012 10:04 PM
Edited by: 887268 on Apr 4, 2012 10:17 PM -
Peoplesoft signon error after run psbuild.sql
I followed the PT849 installation guide
Task B-15-6: Altering PeopleTools Tables
ALTER AUDIT is an online utility used to check whether the PeopleTools tables are synchronized with the
underlying SQL data tables in your database. This process compares the data structures of your database tables
with the PeopleTools tables to uncover inconsistencies. ALTER AUDIT then reports its findings. In this
release, we expect to see differences between the database structure and the tools tables. You will generate and
run a SQL script to synchronize the PeopleTools table definitions with the underlying tables in your database.
After run the script psbuild.sql generated by Application Designer
I found I can't login use VP1/VP1Try to run grant.sql once again. The ALTER AUDIT might change (drop+create) some tables and then remove grant to people user. By issuing grant.sql (after updating correctly) you reapply the grant as well.
Nicolas. -
Script having Chinese characters throws error when run from SQL PLUS
Dear All,
I have a script file(.sql) which contains Chinese characters ....
I have saved the file in unicode Format.
When I run this file using @D:\filename from SQL PLUS it throws an error "unknown Command at line 1"...
My database is Oracle 10g...
Can anyone suggest anything???
Thanks In Advance
Dev
Edited by: Devarsh on Oct 21, 2009 8:16 AMI think you may need to set your local NLS_LANG setting for your client (SQL*Plus) to recognize the characters.
You may also consider posting your question on the Globalization forum which pertains more to these types of questions.
Globalization Support
Maybe you are looking for
-
With the old version, all I had to do was go to the log in page to any of my email accounts or membership sites and scan my finger. It would fill in the fields and open my account. I like this new version of Firefox, but if I am not able to use that
-
Hi Friends, I am using Open hub to send a flat file to an application server. the file name should be dynamic. for eg. returnsYYMMDD.dat similarly salesYYMMDD.dat. please help me as i dont know how to have this dynamic value in case of flat file on a
-
I just purchase a gift card for my iTunes account. Follow the instruction and place the code to redeem my account. On iTUnes Store Home it shows $15.00 has been credited to my account but when I got to purchase its not there and request for my credit
-
Using Flash Catalyst to create a portfolio gallery... Problems
I'm using Fc to create a portfolio site, yet have been struggling with creating a gallery that shows the way I want it to. I've tried to streamline the process using states and substates, as several people have suggested to others, yet I'm having a d
-
How can I merge two iTunes folder, one with music and the other without?
Two years ago Apple support suggested moving my iTunes folder out of my Home folder to the HD level in order to share it across users. This is no longer necessary. How do I move my music back to my Home folder since now I have an Itunes folder at the