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]....
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
/* 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.
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 .
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?
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.
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
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?
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.
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.
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.
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.
- 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).
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.
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.
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.
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)