PL/SQL :: Print Number Within Trigger On Console
May 27, 2013
My oracle database version : 10G
I have the following code on my employees table, lets say I fire an update on my employees table and in return 6 rows gets updated, I want to print this number within my trigger on the console, I have put a comment in my code where I want to achieve this.
<code>
create or replace trigger trig_employees_au
after update on employees
declare
Linst_file utl_file.file_type;
[code]....
View 12 Replies
ADVERTISEMENT
Mar 27, 2007
How can i print serial no of records in sql query? I know I can achieve this with selecting rownum but it gives wrong data if used with group by like below
select rownum,deptid from emp group by rownum,deptid order by rwnum
View 2 Replies
View Related
Sep 3, 2012
print the list of prime factors of a given number create or replace FUNCTION prime (num in number)
return sys_refcursor
as
i number := 2;
temp number := num;
temp_cur sys_refcursor;
BEGIN
open temp_cur;
[code]....
Quote:gives error -->>expression is of wrong type @ open temp_curur;
how to print all the prime factors of a given number??
View 9 Replies
View Related
Aug 11, 2013
/* Formatted on 2013/08/11 18:46 (Formatter Plus v4.8.8) */
CREATE PROCEDURE p_get_name (
p_empno IN OUT NUMBER,
p_name OUT VARCHAR2,
p_err OUT NUMBER
[code].......
Note:- I want to print ename and salary of emp using empno as a input but i dont want to declare extra variable for salary , i want to print salary using empno but when i execute this procedure. It gives value of empno in salary. Don't Know Why , how can i print salary of emp using empno as input without declaring extra variable for salary.
View 25 Replies
View Related
Mar 24, 2011
I have this SQL statement:
WITH data
AS (SELECT user_id,
jc_name,
[Code]....
I wish to do something like
if results > 10 print an error message (and no results)
if results < 10 print the results/output
View 1 Replies
View Related
Oct 15, 2010
CREATE OR REPLACE TRIGGER audit_emp AFTER
INSERT OR UPDATE OR DELETE ON Employee FOR EACH ROW
declare
my emp_audit%ROWTYPE;
begin
if inserting then my.action := 'I';
[code].......
It works alright but i need to enter a sequenced value to a column audit_id which is a column in the emp_audit table when a change takes place, but when i define the variable it gives be an error as bad bind variable so where can i define this column in this trigger so get a sequenced value every time i d or u occurs .
View 5 Replies
View Related
Nov 26, 2012
I am switching database from access to oracle 11g. I have create all the required tables, but I am stuck at one point. The previous person who created access database had auto increment with SG0101, SG0102,........ In oracle I know we can auto increment primary keys but only with the numbers not with characters.
So I have customerid which is a primary key and it automatically increments the number, but I have one more column with memberid where I am inserting all the ids that start with SG0101 bla bla.....
I already have 800 member ID's that start with SG, but that value doesnt automatically increment because I dont have any sequence or trigger to do that.
So how do I create a sequence and trigger that will automatically start value with SG and keeps auto incrementing?
View 12 Replies
View Related
Aug 29, 2012
I have getting error will insert into table i.e
i have a trigger as below
create or replace trigger INS_ERRORS
before insert on MIG_STG_ERRORS
for each ROW
declare
V VARCHAR2(22);
[code]........
when i insert into MIG_STG_ERRORS getting error message like 00036. 00000 - "maximum number of recursive SQL levels (%s) exceeded"
*Cause: An attempt was made to go more than the specified number of recursive SQL levels.
*Action: Remove the recursive SQL, possibly a recursive trigger.
View 4 Replies
View Related
Aug 10, 2013
From front end the user will enter VACANCY_ID in the label box and once he saves that transaction, in background VACANCY_CD filed(sequence) willautomatically generated
.below is my code:{code}create table tmp1(vac_id number,vac_cd number);create sequence tmp1_seq MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;select tmp1_seq.nextval from dual; ---initiating seqselect tmp1_seq.currval from dual; --checking the current val--trigger creationCREATE OR REPLACE TRIGGER TRIGGER1 AFTER INSERT ON TMP1 FOR EACH ROW DECLARE seqval
[code]...
Error: ORA-00036: maximum number of recursive SQL levels (50) exceededORA-00036: maximum number of recursive SQL levels (50) exceeded
View 6 Replies
View Related
Apr 2, 2012
i am using oracle 10g installed windows 7.Oracle console service not started.but sql plus is working.so i wants to start oralce console.
View 1 Replies
View Related
May 3, 2011
I am installing 4 Node Oracle RAC 11.2.0.2 on RHEL 5.5 (x86_64) {for the first time} I am having some issues with ASM monitoring from em console. the +ASM instance appears to be "down" on the em console. However i can connect to separate ASM instances on respective nodes and thus know that they are not down. I am trying to find out the reason why em console is not able to communicate with my ASM instance.
DATAPOINT1
---------------
Under Metric Collection Error link, I can see the following error message for all the nodes.
Target: xxxxx
Type: Host
Metric: Storage Data
Collection Timestamp: MON D,YYYY H:MM:SS PM
Error Type: Collection Problem
Messsage: executable nmhs should have root suid enabled
[code]....
Now the problem is that I cannot find any binary named "nmhs" anywhere in the grid installation, but this file exists in oracle database bin directory:
-rws--x--- 1 root oracle 67778 May 2 18:04 nmhs
I am also not sure whether this is the error which tells me about the problem why em console is not able to communicate with ASM.
DATAPOINT2
---------------
I tried to run emctl to check if the agent for the ASM instance is running:
I set the following for running from grid home:
ORACLE_HOME=/apps/RAC/grid
ORACLE_SID=+ASM1
[code]....
I have seen in all the forums, that there is a directory named "agent11g". I cant find this anywhere in my installation. Its not there in the grid infrastructure directory or the oracle database directory. what are its contents?, do i need this for my RAC setup?, how to I create this now?
View 1 Replies
View Related
Jun 20, 2006
I suddenly started getting this error message "Error
java.lang.Exception: IOException in sending Request :: Connection refused: connect ". on the dbconsole of my database. Any clue where to proceed or how to find whats causing this error.
View 7 Replies
View Related
Sep 5, 2010
is Oracle Corporation provides Enterprise console for 11g, like oracle provides Enter prise console for 10g through which we can view/create/manage all the objects like tables,views,functions and procedures etc.
View 8 Replies
View Related
Jul 6, 2010
I have oracle9i installed on my system.. i have created a database using enterprise manger console..
Now i want to export this database for the purpose of backup.. so that i can import it later.
View 1 Replies
View Related
Jul 25, 2013
I have successfully installed the Oracle 10g standerd version with a sample database on Windows server 2008 standard server. Then I installed the client so that I could use the Enterprise manage console that comes with it. Once installed, I was able to successfully configured the Net service. Now when I use either Enterprise manage console or SQL plus to login to the service that I created, once I enter the user id and password and click ok, system automatically closes both applications. I am not sure what is missing. I installed the same client on a windows XP pc and the enterprise manage console is working perfect.
View 1 Replies
View Related
Dec 29, 2009
How I can get the heavy weight (Java) oem db console installed on my Windows XP desktop?
I used to have a 9i oem console before. But after reinstaling the OS on my laptop, I don't rememeber how I got the oem Java console installed in the first place.
I have a 10.2.0.1 db installed and web based oem console access to that db. But I want to be able to connect to other remote databases using the java console and manage/monitor the remote databases, like I used to before.
View 2 Replies
View Related
Dec 20, 2012
I have this scenario:
- Oracle 11.2.0.3
- RHEL 4.6 64 bits
- Active Data Guard
- Broker configured
- DBconsole configured on primary server
Now, I have server PRIM with the primary database, and server STB with the standby server. For now, the dbconsole is configured in the PRIM server.When I do a switchover (to the standby on STB), EM is not configured, so I use RepManager.sh to clean the sysman user, and I use emca to recreate the dbconsole. After this, everything works.
Once I switch back, the EM is no longer configured on PRIM, so I repeat the previous steps (repManager and emca). Everything is ok after this. I can access the EM on the primary normaly, and this gets information from the broker to provide basic information on the STB (like db status, apply, and so forth).
View 3 Replies
View Related
Jun 12, 2012
I am getting many warning messages in the error console using Firefox V 13. This one seems to be the most prevalent. It's not causing problems except that on some machines it causes the error console to pop up and is distracting for the users.
"Warning: Unknown property '-moz-box-shadow'. Declaration dropped. "
My suspicion is there will always be warning messages, is there a way to suppress the Error Console in v 13 ?
View 6 Replies
View Related
Oct 20, 2010
I installed oracle 10g in Aix,
>emctl start dbconsole
it shows "the Enterprise Manager 10g database control started"
but when i use
> emctl status dbconsole
it shows " EM Daemon is not running"
and the log file..
Thread-1 ERROR main: nmeuemdp_EMDProperty_init failed to read emd.properties
View 1 Replies
View Related
Feb 25, 2010
I have problem with EM console. When I restart machine OracleDBConsoleSID is stopped.
When I try to start this service:
Could not start the OracelDBConsoleSID service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
And then this service has status: Staring. EM then work for short time but then again service is stopped.
The Database works without any problems.
View 1 Replies
View Related
Mar 15, 2010
cmd>emctl start dbconsole
while i run above command it gives following error. what should i do to make my EM run?
error:::EM Configuration issue. C:oracleproduct10.2.0db_1/Abhishek-PC_orcl not found .
View 1 Replies
View Related
Feb 20, 2012
$emctl stop dbconsole stops the OEM process.
however,it starts back up on server reboot,how can we prevent that is emca deconfig the only option?
View 6 Replies
View Related
May 31, 2013
I am not finding Replication Management Tool in Oracle Enterprise Manager 10g. Where can i found it?
How can I start Oracle Enterprise Manager Console? I have installed Oracle Enterprise Manager Control.
View 5 Replies
View Related
Feb 5, 2007
How can i successfully run emcli execute_hostcmd from EM console on Windows Agent?
I met a strange error about EM Agent. When i run the following command by EM console on a Windows Agent:
emcli execute_hostcmd -cmd="hostname" -targets="myhost:host" -credential_set_name="HostCredsPriv"
It comes with the following information
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
...
But on Linux Agent,everything is fine.
View 1 Replies
View Related
Jun 10, 2011
When I am trying to enter to the enterprise manager of oracle 11g, but it is not working. In my services list the 'oracledbconsoleorcl' is assigned as automatically to start with windows. But it is not starting. When I tried to start it manually the following message is displayed repeatedly even after restarting the pc.
'Windows could not start the oracledbconsoleorcl on Local computer. For more information, view the system event log. If this is a non-Microsoft services, contact the service vendor, and refer to service-specific error code 2.'
In the event log the following error messages are displayed:The OracleDBConsoleorcl service terminated with service-specific error 2 (0x2). and
The OracleCSService service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
View 4 Replies
View Related
Apr 23, 2013
I have been working in the installation of oracle 11g r2 in my fedora 17 (32 bits) system for a few days and still have not gotten.Now I found that I need the OPtatch for enable the db console and even being a member of My Oracle Support I can not request the patch for a technical question.
1) Note to the Approver: I am that one because I am an end user (freelance)
2) Support Identifier: How can I get it?
View 6 Replies
View Related
Jul 1, 2011
How can "call one trigger of item in trigger of form"
View 5 Replies
View Related
Apr 23, 2012
here is my code it prints data for 1 perticular date.
instead of it printing
1
3
3
1
3
1
13
0
3
0
0
1
1
1
0
5
for whole day
I want it to add and print the total
here is code
SELECT O_ESBY_SUM.CALLS
,O_ESBY_SUM.ROWDATECREATED
FROM OB.O_ESBY_SUM O_ESBY_SUM
where To_Date(to_char(O_ESBY_SUM.CALLS.ROWDATECREATED, 'DD-MON-YYYY')) = To_Date('?DATE1::?','MM/DD/YYYY')
it prints this
for date 4/19/2012
here is screen shot
View 1 Replies
View Related
Jul 20, 2010
I have table and data like
Name
-----------------
A,B,C,D,E
I would like to print the value like
Name
------------------
A
B
C
D
E
how to do this using SQL or PL/SQl.............
View 3 Replies
View Related
Jan 2, 2013
I am getting an error while printing a sql query which is in a string inside a stored proc. I used
dbms_output.enable(1000000);
dbms_output.put_line(v_query);
and error "I get ORU-10028: line length overflow, limit of 255 bytes per line"
How do I print everything?
View 3 Replies
View Related