- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: compliation during the creation of the procedu...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 12:57 PM
тАО07-15-2002 12:57 PM
create PROCEDURE test_update IS
numcount number:=0;
begin
numcount:=numcount+1;
update employee1 set salary = salary + 900
where empid = numcount;
update employee2 set salary = salary + 10000
where empid = numcount;
update employeer3 set salary = salary + 5000
where empid = numcount;
update employee set lastname = 'dkvnlkdoije'
where empid = numcount;
if numcount=1000 then
commit;
numcount:=0;
endif;
END;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 01:01 PM
тАО07-15-2002 01:01 PM
Re: compliation during the creation of the procedure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 01:49 PM
тАО07-15-2002 01:49 PM
Re: compliation during the creation of the procedure
thing...
create PROCEDURE test_update IS
numcount number:=0;
begin
while true loop
numcount:=numcount+1;
update employee1 set salary = salary + 900
where empid = numcount;
update employee2 set salary = salary + 10000
where empid = numcount;
update employeer3 set salary = salary + 5000
where empid = numcount;
update employee set lastname = 'dkvnlkdoije'
where empid = numcount;
if numcount=1000 then
commit;
numcount:=0;
endif;
end loop;
END;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 02:10 PM
тАО07-15-2002 02:10 PM
Solution2. That each table has a "empid" up to 1000.
You might want to perform an insert statement to make sure that you have data in the for those rows, otherwise it is not going to update anything.
Also, this statment will not do anything other than build up a large amount of redolog data, as you are going through the same number of records each time. If this is something for I/O testing, you would be better running jobs in parallel, as well as defining ahead of time exactly what you are trying to tets.
Your error in the code though is the "endif;" statement. This should be "end if;". I would suggest checking the "DBA_ERRORS" view, or running "show errors" if you have errors compiling something, as this will normally show you where the problem is.
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 03:33 PM
тАО07-15-2002 03:33 PM
Re: compliation during the creation of the procedure
I had another procedure doing the insert...this is just doing the update...
the purpose for this script...is to pump up the I/O.... and i want the data to be comited
every 1000 update ?
Can you give me any more suggestion on how to improve this script?...and how to increase the I/O rate? and yes..your assumption is correct about the tables ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 04:51 PM
тАО07-15-2002 04:51 PM
Re: compliation during the creation of the procedure
Create a table like "jobtime" with a "jobid" (VARCHAR2) and a "jobtime" (DATE) field. Then do something like this:
--------------------------
declare
runcount number:=0;
begin
loop until numcount:=50000;
numcount:=numcount+1;
update...
if numcount=1000 then
runcount:=runcount+10;
insert to jobtime values (runcount,sysdate);
commit;
end if;
end loop;
end;
--------------------------
Since you should run the job in parallel, you would want to increment jobid in the procedure by 1. By adding 10 to the runcount though, it will make it so know which job was running, as it will always end in a 0, 1, 2, etc. This would give you a maximum of 10 jobs, however that should be more than enough to get an idea of the amount of I/O that is being done.
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 07:23 AM
тАО07-16-2002 07:23 AM
Re: compliation during the creation of the procedure
SQL> create table jobtime
2 (id_job varchar(2) constraint employee_2a_k primary key
3 jobtimes (date))
4 tablespace saki_datat02;
(id_job number(26) constraint employee_2a_k primary key
*
ERROR at line 2:
ORA-00922: missing or invalid option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 08:46 AM
тАО07-16-2002 08:46 AM
Re: compliation during the creation of the procedure
I figure it out what was the error...
there wasn't a comma to separate the two fiels...and there is no () around date...
everything is fine..now..i was able to create the table.... still testing out your suggestion for this table..thanks