Passing the XML payload to the cursor in the Oracle Database
Hi Experts,
I am trying to insert multiple records in the table of oracle database. I am sending 5000 records per message. I am using a stored procedure to insert the records. I want to make a single call to the stored procedure and insert all the records.
I dont want to call SP for each record.
Please suggest the way to implement this (Using Cursor/Loop) .
Thanks
Ajay
Hi
Use these link to insert multiple record in single call using stored procedure.
http://www.vikramlakhotia.com/Inserting_multiple_records_using_one_stored_procedure.aspx
http://weblogs.sqlteam.com/travisl/archive/2005/01/04/3931.aspx
use this thread
http://forums.asp.net/t/1235809.aspx
Similar Messages
-
How can i save the data from the Oracle database to my local directory
How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run. -
Hi to all.
Currently, i am trying to install patches for portal server.
The server OS is Sun Solaris 8.
We are using Oracle9iAS.
Now, we are installing 9.0.1.4.0 patch set for the Oracle Database Server.
We managed to install the patch, but have problem with the Post Install Action.
We managed to run
-ALTER SYSTEM ENABLE RESTRICTED SESSION;
-@rdbms/admin/catpatch.sql
-ALTER SYSTEM DISABLE RESTRICTED SESSION;
-CONNECT / AS SYSDBA
-update obj$ set status=5 where type#=29 and owner#!=0;
-commit;
But, when we come to the next command, which is to shutdown, it gives us like
this..
SQL> update obj$ set status=5 where type#=29 and owner#!=0;
1402 rows updated.
SQL> commit;
Commit complete.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database not open: queries allowed on fixed tables/views only
We tried to startup the database..it gives us this error..
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
So, we tried to shutdown again..
SQL> shutdown immediate
ORA-01089: immediate shutdown in progress - no operations are permitted
I been informed that this is maybe a Database problem related. Any ideas?
Best Wishes,
Rushdan Md Saad.Patchsets could be obtained (only) from http://metalink.oracle.com
You need to have valid CSI for access.
P.S: Sorry Werner, I didn't see you post.
Message was edited by:
Ivan Kartik -
How to store image in the oracle database 10.2. using File Maker 10.
Hi.,
I want to store image, media file in the oracle database using File Maker as a front end.
I connect Oracle using odbc from file maker. There are table and in that table there a column "pict" of blob type. but this column is not showing in the file maker.
2. Here I can not change the data type of any column.
Now how to store images in the oracle table using odbc or any other tool.
Regards,
ShyamI wrote an example for my students, you can find it here. It's using PHP as the front end but all you need to do is know how and leverage the stored procedures. All code is downloadable in zip files from the blog.
http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/ -
Not able to start the oracle database with ASM
HI all,
WE are using oracle10.2.0.1 on OEL5.
I have mounted ASM but when i try to start the oracle database, it is asking "db is already started shut it down first"
[root@localhost ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
[root@localhost ~]#
[root@localhost ~]# su - oracle
-bash-3.2$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:12:06 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> shutdown
ORA-01012: not logged on
SQL> startp mount
SP2-0734: unknown command beginning "startp mou..." - rest of line ignored.
SQL> conn / as sysdba
Connected.
SQL> shutdown
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup mount
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size 2019032 bytes
Variable Size 102838568 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=dbtest
-bash-3.2$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:13:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> exit
-bash-3.2$ cd /u01/app/oracle/admin/dbtest/pfile/
-bash-3.2$ ls -l
total 8
-rw-r----- 1 oracle oinstall 2442 May 27 23:07 init.ora.427201023913
-rw-r--r-- 1 oracle oinstall 1406 May 31 01:44 sqlnet.log
-bash-3.2$ pwd
/u01/app/oracle/admin/dbtest/pfile
-bash-3.2$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:14:00 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> exit
-bash-3.2$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:14:09 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> startup pfile="/u01/app/oracle/admin/dbtest/pfile/init.ora.427201023913';
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL>
-bash-3.2$ ps -ef|grep ora
root 5501 5483 0 00:32 ? 00:00:00 hald-addon-storage: polling /dev/hdc
root 6333 1 0 00:32 ? 00:00:00 /bin/su -l oracle -c sh -c 'cd /u01/app/oracle/product/10.1.0/db_1/log/localhost/cssd; ulimit -c unlimited; exec /u01/app/oracle/product/10.1.0/db_1/bin/ocssd '
oracle 6527 6333 0 00:33 ? 00:00:00 /u01/app/oracle/product/10.1.0/db_1/bin/ocssd.bin
oracle 6849 1 0 00:49 ? 00:00:00 /u01/app/oracle/product/10.1.0/db_1/bin/tnslsnr LISTENER -inherit
root 7637 7617 0 01:53 pts/2 00:00:00 su - oracle
oracle 7638 7637 0 01:53 pts/2 00:00:00 -bash
root 7751 6763 0 02:11 pts/1 00:00:00 su - oracle
oracle 7752 7751 0 02:11 pts/1 00:00:00 -bash
oracle 7773 1 0 02:12 ? 00:00:00 oracledbtest (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 7777 1 0 02:13 ? 00:00:00 asm_pmon_dbtest
oracle 7779 1 0 02:13 ? 00:00:00 asm_psp0_dbtest
oracle 7781 1 0 02:13 ? 00:00:00 asm_mman_dbtest
oracle 7783 1 0 02:13 ? 00:00:00 asm_dbw0_dbtest
oracle 7785 1 0 02:13 ? 00:00:00 asm_lgwr_dbtest
oracle 7787 1 0 02:13 ? 00:00:00 asm_ckpt_dbtest
oracle 7789 1 0 02:13 ? 00:00:00 asm_smon_dbtest
oracle 7791 1 0 02:13 ? 00:00:00 asm_rbal_dbtest
oracle 7793 1 0 02:13 ? 00:00:00 asm_gmon_dbtest
oracle 7805 7752 0 02:15 pts/1 00:00:00 ps -ef
oracle 7806 7752 0 02:15 pts/1 00:00:00 grep ora
-bash-3.2$
{code}
so anybody can help me how to start the oracle database....-bash-3.2$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:26:11 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter instance
NAME TYPE VALUE
active_instance_count integer
cluster_database_instances integer 1
instance_groups string
instance_name string dbtest
instance_number integer 0
instance_type string asm
open_links_per_instance integer 4
parallel_instance_group string
parallel_server_instances integer 1
SQL>
-bash-3.2$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:26:11 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show paramete instance_name
SP2-0158: unknown SHOW option "paramete"
instance "local"
SP2-0158: unknown SHOW option "_name"
SQL> show parameter instance
NAME TYPE VALUE
active_instance_count integer
cluster_database_instances integer 1
instance_groups string
instance_name string dbtest
instance_number integer 0
instance_type string asm
open_links_per_instance integer 4
parallel_instance_group string
parallel_server_instances integer 1
SQL>
-bash-3.2$ ps -ef|grep pmon
oracle 7777 1 0 02:13 ? 00:00:00 asm_pmon_dbtest
oracle 7851 7752 0 02:32 pts/1 00:00:00 grep pmon
-bash-3.2$
-bash-3.2$ -
Using Oracle Developer Suite 10g Without the Oracle Database
I have never used Oracle, but have used MS SQL Server 7. I need to learn Forms. An Oracle salesperson suggested I download Oracle Developer Suite 10g (the demo product). It includes the Oracle Developer Suite (with Forms Developer), and many other programs.
The salesperson said it includes a database server, but I suspect it does not. I only downloaded the package last night, and have begun to skim the documentation, but I see nothing that looks like a database server.
In SQL Server 7, the database engine is run as a service and you create and manage your tables (do all the database admin stuff) using SQL Enterprise Manager.
So, does this package include a database engine/server? Or must you also have the Oracle Database?
I don't see a demo version of the Oracle Database - is there one?
Thanks in advance for any help.Hi,
The Developer Suite does not contain a demo version of the Oracle Database.
You can download the database from this page:
http://otn.oracle.com/software/products/oracle9i/index.html
Vincent -
Extract data into the Oracle Database
Hello,
I have file in PDF format.
I need to extract data into the Oracle Database.
what should be my action ?
And how could I accomplish?
thanks
DNYou said:
Do you know ahead of time how many columns are in the file?
yes, It has 8 columns.
But each PDF have different total of columns. Right now I am working on one PDF file only.
e.g: page emp report has following values:
Salray History Report in PDF format
Page 1
Date 10-21-2005
LAST NAME SALARY COMMISSION
Russell 14000 .4
Partners 13500 .3
Errazuriz 12000 .3
Cambrault 11000 .3
Zlotkey 10500 .2
after converting it will be come as
Salray History Report in PDF format
Page 1
Date 10-21-2005
LAST NAME
SALARY
COMMISSION
Russell
Partners
Errazuriz
Cambrault
Zlotkey
14000
13500
12000
11000
.4
.3
.3
.3
End of Page 1
Date 10-21-2005
LAST NAME
SALARY
COMMISSION
DN -
THE DATA FROM THE ORACLE DATABASE VIEW DATA IS NOT REFERESHED AUTOMATICALLY
THE DATA FROM THE ORACLE DATABASE VIEW DATA IS NOT REFERESHED AUTOMATICALLY IN OBIEE DASHBOARD(ANSWERS)
UNLESS AND UNTILL I OPEN THE ORACLE BI ADMINISTRATOR TOOL AND DO UPDATE ALL ROWCOUNT AND THEN SAVE THE RPD.
WHERE AS ORACLE DATABASE TABLE DATA IS AUTOMATICALLY REFRESHED.
PLS SOMEONE HELP OUT IN THIS ISSUE.Check whether you have enable cache on that view?
-
NetBean, I can't establish the oracle database connection with version 9i.
In NetBean, I can't establish the oracle database connection with version 9i.
I have create the datasource and it is fine.
when i try to access the tables i get a message
"Unable to refresh children, connection is broken, unsupported feature"
in netbeans.
Does netbeans support oracle 9i version.
Thanks,
VKKIn NetBean, I can't establish the oracle database connection with version 9i.
I have create the datasource and it is fine.
when i try to access the tables i get a message
"Unable to refresh children, connection is broken, unsupported feature"
in netbeans.
Does netbeans support oracle 9i version.
Thanks,
VKK -
Adding the Oracle Database Resource to the Fail Safe Group
Hi,
I am installtin MSCS cluster for my EP system. After Adding the Oracle Database Resource to the Fail Safe Group my CI jcontrol.exe has been stopped. I tried to connect my SAPSR3DB user by sqlplus but it is giving follwoing error.
SQL> conn SAPEPPDB
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
but DB startup is running properly and DB is coming in open state properly. After that I have perform R3trans -d. following error
C:\>R3trans -d
This is R3trans version 6.14 (release 700 - 12.06.09 - 15:20:00).
unicode enabled version
2EETW169 no connect possible: "DBMS = ORACLE --- dbs_o
ra_tnsname = 'EPP'"
R3trans finished (0012).
I added Oracle database resource to fail safe group as per installation guide.
Please help me out.
Regards,
Dinesh BhattC:\>lsnrctl status
LSNRCTL for 64-bit Windows: Version 10.2.0.2.0 - Production on 11-APR-2010 20:39
:38
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(COMMUNITY=SAP.WORLD)(PROTOCOL=TCP)(HOST=192.1.20.7)(PORT
=1527))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 10.2.0.2.0 - Produ
ction
Start Date 11-APR-2010 20:39:23
Uptime 0 days 0 hr. 0 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File F:\oracle\EPP\102\network\admin\listener.ora
Listener Log File F:\oracle\EPP\102\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.1.20.7)(PORT=1527)))
The listener supports no services
The command completed successfully
listener start but without any instance.
listerer.ora file
This file is written by Oracle Services For MSCS
on Sun Apr 11 10:53:11 2010
LISTENER =
(ADDRESS_LIST=
(ADDRESS=
(COMMUNITY=SAP.WORLD)
(PROTOCOL=TCP)
(HOST=192.1.20.7)
(PORT=1527)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
ADMIN_RESTRICTIONS_LISTENER = on
Fsloracleepp =
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=IPC)
(KEY=EPP)
(ADDRESS=
(PROTOCOL=IPC)
(KEY=EPP.WORLD)
(ADDRESS=
(COMMUNITY=SAP.WORLD)
(PROTOCOL=TCP)
(Host=192.1.20.43)
(Port=1527)
SID_LIST_Fsloracleepp =
(SID_LIST=
(SID_DESC=
(SID_NAME=EPP)
(ORACLE_HOME=F:\oracle\EPP\102)
STARTUP_WAIT_TIME_Fsloracleepp = 0
ADMIN_RESTRICTIONS_Fsloracleepp = on
TRACE_LEVEL_Fsloracleepp = OFF
CONNECT_TIMEOUT_Fsloracleepp = 10
dbms_sid added
please help.
Dinesh Bhatt -
How to automate the Oracle database start and shutdown process
How we can automate and oracle database start and stop procees with Linux start/shutdown process.
I want to automatically start the oracle database at the time linux server and shutdown the database on shutdown linux server.Hi,
I can share my scripts:
1) /home/oracle/start_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
lsnrctl start
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
startup
exit
ENDSQL
emctl start dbconsole
isqlplusctl start
NOTE: emctl and isqlplus are optional
2) /home/oracle/stop_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
isqlplusctl stop
emctl stop dbconsole
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
shutdown immediate
exit
ENDSQL
lsnrctl stop
NOTE: emctl and isqlplus are optional
Then what you need:
1) K91oracle_stop (put it in the desired run level)
#!/bin/bash
# description: Stop Oracle before reboots
su - oracle -c "/home/oracle/stop_oracle.sh" >> /home/oracle/stoporacle.log
2) S91oracle_start (put it in the desired run level)
#!/bin/bash
# description: Start Oracle after reboots
su - oracle -c "/home/oracle/start_oracle.sh" >> /home/oracle/startoracle.log
Bye. -
How do i connect to the oracle database
I just downloaded oracle 9i from your website. I wanted to know how do I receive or create my own username and password so I can access the oracle database.
Hi,
Two user accounts are automatically created with the database:
SYS (default password: CHANGE_ON_INSTALL)
SYSTEM (default password: MANAGER)
(More info at : http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96521/dba.htm#852)
Both these accounts are database adminstrators. You can use either of these to connect to your database and create more users.
To create new users use this SQL command after connecting to your database
SQL> CREATE USER <username> IDENTIFIED BY <password>
SQL> GRANT CREATE SESSION TO <username>
For more information on creating users refer to http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96521/users.htm#16513
Hope this helps.
Sujatha. -
Programming the Oracle Database with Java and Web Services: sample chapter
This will be the first book devoted to Java in the Oracle Database: read the sample chapter @ http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
This book also covers the latest Oracle JDBC, Oracle SQLJ, JPublisher and Database Web Services A brief description @
http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
Thanks, KuassiHi Kuassi,
Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
The configuration is proving very challenging but will hopefully reap rewards.
(Thought I would give you some background to my experience).
Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
Finally off to buy your book now as no doubt there is a huge amount more to learn.
Kind Regards
David O'Donnell -
I am planning on getting certified as an OCA PL\SQL developer. I will be teaching myself and I have all the material needed to prepare.
Except, I don't have a database that I can solve exercises on and practice commands.
The two exams I will be taking are the :
1Z0-051 exam: Oracle Database 11g: SQL Fundamentals I
1Z0-144 exam: Oracle Database 11g: Program with PL/SQL
So is the Oracle Database Express Edition 11g Release 2 is enough ?
If it is not what other options do I have (I am running Windows 8.1) ?Yes -- 11gXE should be sufficient for practicing the vast majority of the skills required for those two exams. I *think* that PARALLEL is not enabled in XE, so you could not test the functionality referred to in the "Use NOCOPY hint, PARALLEL ENABLE hint and DETERMINISTIC clause" topic of 1Z0-144. I don't consider that to be a significant problem, however. The material from the manual should suffice for the questions you'll see.
As for what other options you have, you could download and install VirtualBox (free from Oracle). You could then make a virtual machine on your Windows 8.1 machine and install Oracle Linux (free from Oracle). You could then download and install Oracle Enterprise for Linux and install it on your virtual machine (allowable under the licensing when used for learning purposes only). I have a similar setup on my Windows 7 laptop that I use when I absolutely have to test some feature that requires Oracle Enterprise. Mind you, when I have the VM running on my system... it is ssssslllllloooooowwwwww because of the memory requirements. I talk about using virtual machines as a certification aid in the following article:
There is virtually no excuse to lack hands-on experience - CertMag -
Is the Oracle database free for private persons?
Is the Oracle database free for private developers, just testing the database, or do I have to personally contact them in order to pay them? I just went to the Oracle download page and downloaded 2 pcs. 1 GB install files, installed the database on my Windows 7 machine and then started using it.
Did you pay heed to the license agreement you accepted before downloading the software ? The usage restrictions are spelled out clearly.
Oracle Technology Network Developer License Terms for Oracle Database 11g Express Edition
The limits for 11g XE are also documented -
Oracle&reg; Database Express Edition
Oracle&reg; Database Express Edition
HTH
Srini -
How to list the JAR files loaded into the Oracle Database ?
How to list the JAR files loaded into the Oracle Database ?
From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
JAVAJAR$
JAVAJAROBJECTS$
By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.
Maybe you are looking for
-
If phone service is disconnected can the iphone still connect to internet through wifi?
If I close my phone account with a particular phone service because I no longer need my personal phone, will my Iphone still work like an ipod in that it can still get to the internet through WIFI? Or general what functions will the piece of equipme
-
So I keep trying to sync music to my iPhone from iTunes, and whenever I select the album the sync goes by really fast and nothing goes onto my phone. Then when I click "On this iPhone" it shows the songs, but they're grey, and I can't click on them.
-
.I get a message "adobe photoshop has stopped working" I tried uninstalling and re installing...still not working
-
Logic Express 7 and imac Intel Core Duo
I recently bought both items mentioned above but havent had the time to install LE7. Should I bother? I read through some posts and it seems they are incompatible.. I dont live in the USA so the send in CD for an upgrade option may be difficult
-
"End of Stream has been reached"
"End of Stream has been reached" I get this message when trying to preview my project. I started this project in Encore DVD 1.5, and I get this error message when I'm editing it in the new Encore DVD 2.0 trial. Thanks in advance.