ORA-01031: error of insufficient privileges when I try to use ALERT_QUE

Hello
I'm working on SYS. ATTENTION. THAT for system alerts. I use ODP in c# to connect to the Oracle database with username = SYSTEM, but when I try to survey or deque any message from SYS. ATTENTION. Que., its gives an error ORA-01031: insufficient privileges. I am not able to understand how to assign SYSDBA privileges to the SYSTEM and access ALERT_QUE to get alerts of system. I write my code below, please take a look and let me know what is wrong with the code. I am able to connect to the database using the SYSTEM, do I have to use username = SYS for access to the content database ALERT_QUE? Please let me know what is the solution.


Con OracleConnection = new OracleConnection (constr.);

Create the queue
Queue OracleAQQueue = new OracleAQQueue ("sys.alert_que", con);

Open connection
con. Open();

BEGIN txn for enqueue
OracleTransaction txn = con. BeginTransaction();

Set the type of message to the queue
queue. MessageType = OracleAQMessageType.Raw;

Prepare the message and payload BRUTE
OracleAQMessage enqMsg = new OracleAQMessage();
Byte [] bytePayload = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
enqMsg.Payload = bytePayload;
Agent [] OracleAQAgent = new OracleAQAgent [1];

Agent [0] = new OracleAQAgent ("SUBSCRIBER1");
enqMsg.Recipients = agent;
enqMsg.SenderId = new OracleAQAgent ("SENDER1");

Prepare for the queue
queue. EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;

Message from the queue
queue. Enqueue (enqMsg);


The code throws the exception to the line "queue. Enqueue (enqMsg); "saying: ORA-01031: insufficient privileges

Published by: 916462 on February 27, 2012 03:31

You are looking for a connection preferred, which means that you must connect as SYSDBA
Check this doc on how to do it.
http://docs.Oracle.com/CD/B19306_01/win.102/b14307/featConnecting.htm

Tags: Oracle

Similar Questions

  • insufficient privileges when you create sequence using the procedure

    CREATE OR REPLACE PROCEDURE schema1.proc1 AS
    BEGIN
    EXECUTE IMMEDIATE 'DROP SEQUENCE schema1.add_ins_seq';
    EXECUTE IMMEDIATE 'CREATE SEQUENCE schema1.add_ins_seq MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 1000 NOORDER  NOCYCLE';
    END;
    

    This procedure is created to schema1 by schema1.

    Schema1 boasts a CREATE SEQUENCE privilege.

    When I run this procedure through SQL Developer after the Cup to schema1, the error is thrown in insufficient privilege to CREATE SEQUENCE, however, DROP SEQUENCE is executed. I can create the sequence without the procedure call.

    If I add AUTHID CURRENT_USER so I don't get the error of insufficient privileges.

    Why it gives this error when the owner and the applicant of the procedure is schema1?

    Hello

    1st thing to know: when a procedure is defined (and updated), any privileges granted through ROLE is not taken into account. This is because these privileges can be active or not at the level of the session (as happens if for example a user has active 'role A' in session 1 but not in session 2 and if this role has been used to define a procedure?) The proecedure must at the same time be VALID in session 1 and INVALID session 2? Is not possible.

    Thus, for instance in a situation of 'standard': user SYSTEM has 'DBA Rôle', so you can for example make a sqlplus session "SELECT * v $ instance;", but you would write a procedure owned by system making instance_name SELECT INTO l_variable OF v$ instance;  "then"surprise": the procedure cannot be compiled because of the ORA-904 Table or view does not exist..." To be able to create the procedure, a DSS system needs to be done.

    2nd thing for your special case, a little more complex: default for a procedure is 'AUTHID DEFINE', but once more: it means "privileges of the author creating the procedure", so without taking into account the acquired privileges through roles... Your user name is 'sequence create' through a role, it cannot use the privilege within the procedure.  But... but when you define the procedure with AUTHID CURRENT_USER, privileges are evaluated at run time, and thanks to the active ROLE in the session by calling the procedure, at this time, the user can create the sequence.  If try again you but with 'The VALUE NONE ROLE' in the session before the call, you will again have the question.

    Conclusion: If you need to do the action, you must grant the user the necessary privilege directly.

    Best regards

    Bruno Vroman.

  • ORA-01031: insufficient privileges when you try to run a proc

    I have a procedure called KILL_MY_SESSION that is defined with a value of DEFINE AUTHID

    The schema JOHN belonged procedure. The procedure makes several calls to PL/SQL DBMS_SQL package.
    The last thing that not with DBMS_SQL proceedings concern an ALTER SYSTEM KILL SESSION statement.
    Schema JOHN has privileges to kill a session in the database.
    If I log in the scheme of JOHN, I can issue the statement ALTER SYSTEM KILL SESSION successfully.
    Also, when you are logged in the scheme of JOHN, I can run the KILL_MY_SESSION procedure.

    Now I have the ISTO schema. I got ISTO privileged EXECUTE on the JOHN. Procedure KILL_MY_SESSION.
    Since JOHN. KILL_MY_SESSION is a privilege of rights DEFINERs, if RIGHTS shouldn't be able to execute the procedure correctly and kill a session?

    This is an output of the session of the ISTO when you try to run JOHN. KILL_MY_SESSION:

    SQL > conn oifs@dbname
    Enter password: *.
    Connected.
    SQL > 500 fixed lines
    SQL > select username, osuser, sid, serial #.
    2 session $ v
    3 where username = "OIFS."

    USERNAME OSUSER SID SERIAL #.
    ------------------------------ ------------------------------ ---------- ----------
    OIFS administrator 142 325
    OIFS administrator 139 613

    SQL > exec ('142 ', 325') john.kill_my_session
    BEGIN john.kill_my_session ('142 ', 325'); END;

    *
    ERROR on line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS." DBMS_SYS_SQL", line 1204
    ORA-06512: at "SYS." DBMS_SQL", line 323
    ORA-06512: at "EIADBA. KILL_MY_SESSION', line 20
    ORA-06512: at line 1


    Someone at - he a clue as to what I'm doing wrong?
    View DBA_PROCEDURES, here's the record for KILL_MY_SESSION


    OWNER
    ------------------------------
    OBJECT_NAME
    --------------------------------------------------------------------------------
    OBJECT_TYPE AUTHID
    ------------------- ------------
    JOHN
    KILL_MY_SESSION
    DEFINE PROCEDURE

    I mean the privilege of system alter directly, not through roles.

    GRANT ALTER SYSTEM TO JOHN;
    

    Please read the articles below, you should restrict the sessions that can be killed, according to what will be your implementation.

    It could be useful.
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:226613885088
    http://DBA-Oracle.com/t_granting_alter_system_kill_session.htm

  • ORA-00984: column not allowed here, when you try to use a default UDF

    I am wanting to create a table that has a default value of a user-defined function, and because this default is intended to be used in a few different places so I would use a function rather than in the table definition.

    This is my current code that works very well:
    CREATE TABLE DEPT_HIST
    (
      DEPTNO      NUMBER(2) not null,
      DNAME       VARCHAR2(14),
      LOC         VARCHAR2(13),
      SQL_ACTV_C  CHAR(1) not null,
      EFFT_STRT_S TIMESTAMP(6) default SYSTIMESTAMP not null,
      EFFT_END_S  TIMESTAMP(6) default TO_TIMESTAMP('9999/12/30 00:00:00.000000', 'YYYY/MM/DD:HH24:MI:SS.FF6') not null,
      DELT_F      CHAR(1) default 'N' not null
    );
    but I would get something similar to this work:
    CREATE OR REPLACE FUNCTION EOT
       RETURN timestamp
    IS
       Result   timestamp;
    BEGIN
       RETURN (TO_TIMESTAMP ('9999/12/30 00:00:00.000000',
                             'YYYY/MM/DD:HH24:MI:SS.FF6'));
    END EOT;
    /
    
    select eot from dual;
    
    EOT
    ---------------------------------------------------------------------------
    30/DEC/99 12:00:00.000000000 AM
    
    CREATE TABLE DEPT_HIST
    (
      DEPTNO      NUMBER(2) not null,
      DNAME       VARCHAR2(14),
      LOC         VARCHAR2(13),
      SQL_ACTV_C  CHAR(1) not null,
      EFFT_STRT_S TIMESTAMP(6) default SYSTIMESTAMP not null,
      EFFT_END_S  TIMESTAMP(6) default EOT not null,
      DELT_F      CHAR(1) default 'N' not null
    );
    but I get an error of:
      EFFT_END_S  TIMESTAMP(6) default EOT not null,
                                       *
    ERROR at line 8:
    ORA-00984: column not allowed here
    Any ideas? I guess I could use a trigger but not exactly what I'm after.

    Hello

    Sorry; No function defined by the user in the DEFAULT clause.
    From SQL, under "CREATE TABLE Statement" language manual
    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_7002.htm#sthref7119

    Restriction on default column values


    A DEFAULT expression cannot contain references to the functions PL/SQL or other columns, the nickname CURRVAL, NEXTVAL, LEVEL, PRIOR and ROWNUM, or date constants that are not completely specified.

    I wouldn't use a trip just for that. If you need a trigger for other reasons, then maybe you can include the definition of this column in the trigger, too, but, in general, avoid triggers when there is an alternative.

  • I get an error "fix computer clock" when I try to use windows media center with netflix

    I downloaded the software you need to watch your netflix on Windows Media Center. Once I'm inside the Windows Media Center, I click on Netflix, my user name and password for netflix pops up, then I think that enter to go... I get an error message that says "Please update the computer clock you and or update your timezone. '. Both are already up to date, but I get this error message.

    Check your time zone. If all goes well, then it's a question with netflix. You can contact the support of netflix.

    Alternatively, you can try to reset your information newspaper: -.

    http://www.hack7mc.com/2009/11/resetting-Netflix-login-information-in-Windows-Media-Center.html

  • error device 80070052 received when you try to use USB on Vista

    I tried to transfer documents from my PC to my USB, but rode with erorr 0 x 80070052. What is - this and how to fix it?

    Discover the next thread with several solutions proposed for this specific error message on a USB key:http://social.technet.microsoft.com/Forums/en-US/itprovistasetup/thread/bf17ed76-5164-4380-9140-16bd74e7c8c7.

    Here is another proposed solution (same error and also a USB key) that is not formatting the drive:http://www.quickonlinetips.com/archives/2007/09/how-to-fix-error-0x80070052-on-usb-flash-drives/.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • 2072 AND 2126 ERROR when you try to use the printer

    ERROR 2072 AND 2126 WHEN YOU TRY TO USE THE PRINTER?

    Hello

    1. What is the brand and model of the printer?

    2. What is the exact error message you get?

    3 when was the last time you were able to use the printer?

    4 did you a recent software or changes to the material on the computer?

    Method 1:

    I suggest you to go through the steps mentioned in the link and the Coachman.

    Printer in Windows problems

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    If the issue does not get resolved, then you can move on to method 2.

    Method 2:

    Tips for solving common driver problems

    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-driver-problems

    Hope this helps and keep us informed if you need help.

  • Error of insufficient privileges on the creation of model running in a stored procedure

    Hello

    I get the error of insufficient privileges on execution of the DBMS_DATA_MINING. Script CREATE_MODEL in a stored procedure.

    If I run the same DBMS_DATA_MINING. Script CREATE_MODEL in an anonymous block with just begin... end;

    I am able to create a model successfully, but if I do the same thing after having stored the script in the stored procedure, it is throwing error of insufficient privileges.

    Scripts:

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    Model_name = > < template name >

    mining_function = > dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME = > < data table name >

    CASE_ID_COLUMN_NAME = > < case ID >

    target_column_name = > < target column >

    SETTINGS_TABLE_NAME = > < settings table >

    DATA_SCHEMA_NAME = > < schema >

    SETTINGS_SCHEMA_NAME = > < schema >

    );

    END;

    The foregoing, works very well and created a model with the model given with success.

    But if I keep the above, in a stored procedure as - MINING_TESTING

    create or replace procedure MINING_TESTING as

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    Model_name = > < template name >

    mining_function = > dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME = > < data table name >

    CASE_ID_COLUMN_NAME = > < case ID >

    target_column_name = > < target column >

    SETTINGS_TABLE_NAME = > < settings table >

    DATA_SCHEMA_NAME = > < schema >

    SETTINGS_SCHEMA_NAME = > < schema >

    );

    END;

    Compiles correctly.

    Enforcement - EXEC MINING_TESTING;

    Error message throw sufficient privileges.

    The error message complete below:

    Error report:

    ORA-01031: insufficient privileges

    ORA-06512: at "SYS." DBMS_DATA_MINING', line 1798

    ORA-06512: at "MIS_ORABI_ODM.CA_MINING_TESTER", line 3

    ORA-06512: at line 1

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    Hello

    DataMiner UI grants privileges to a role, so if you're depending on these privileges you must proceed as follows when you create a stored procedure.

    Your stored procedure was created with the default authid which is definers. It will not use the privileges for the role. Solution is to create the stored procedure with authid current_user. This will pick up the privileges for the role. Another option is to apply the following subsidies directly to the user account:

    grant CREATE MINING MODEL

    CREATE THE TABLE,

    IN ORDER TO CREATE

    Example of stored procedure:

    create or replace procedure MINING_TESTING AUTHID CURRENT_USER as

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    MODEL_NAME =>

    mining_function-online dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME =>

    CASE_ID_COLUMN_NAME =>

    target_column_name =>

    SETTINGS_TABLE_NAME =>

    DATA_SCHEMA_NAME =>

    SETTINGS_SCHEMA_NAME =>

    );

    END;

    Thank you, Mark

  • insufficient privileges when executing stored procedure

    Hello gurus,
    I'm new to plsql, working on a stored procedure.
    Basically, trying to create a temporary table by using the dynamic sql... Here is my code, the runtime, I'm encoutering error of insufficient privileges. not sure where I'm wrong. any help is appreciated, thanks

    -successfully - compiled code
    SQL > CREATE or REPLACE procedure stp_temp (i_table in varchar2)
    2 is
    3 table_creation_stmt varchar2 (4000): = ";
    4 start
    5
    6 table_creation_stmt: = 'CREATE of TABLE TEMPORARY GLOBAL' | i_table | ' AS select * from TABLE_STGG';
    7 dbms_output.put_line (' query is :'|| table_creation_stmt);
    8 execution immediate table_creation_stmt;
    9 end;
    10.

    Created procedure.

    SQL > exec stp_temp ('table123');
    Request: CREATE TEMPORARY TABLE global table123 AS select * from TABLE_STGG
    BEGIN stp_temp ('table123'); END;

    *
    ERROR on line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "E3US9T. STP_TEMP', line 8
    ORA-06512: at line 1


    -table gets created to copy/paste on top of the output (that is the query)

    SQL > CREATE GLOBAL TEMPORARY TABLE table123 AS select * from TABLE_STGG;

    Table created.

    Why the hell you create a TWG in a stored procedure?

    Create once and be done with it.

    To answer your question, your create table privilege granted to you via a role. Roles are not in pl/sql, you need the privilege granted to you directly.

  • Discovered using a function of package in the other schema gets 01031. 00000 - "insufficient privileges".

    Nice day.  I have a package to Schema1 that contains a function.  I created a view in Schema2 that uses arrays of Schema1 and function of this package of Schema1 - it works very well.  I created a schema3 view that uses only the display in Schema2.  When I try to compile, I get 01031. 00000 - "insufficient privileges".  When I try to run the query from the view as the user schema3 schema3, I get the data very well.  Anyone know how I can fix this, please?

    Note: If I delete the use of Schema1.sag_online_action.get_compcode (sag.sagseqnum), everything works fine.

    TIA.

    Schema1 Package:

    function get_compcode (p_iSagseqnum in number) return varchar2 AS

    VARCHAR2 (3) l_cCompcode: = ";

    BEGIN

    Select DECODE ('Y', sag.add_metal, "[1]",

    SAG.add_gc, "[2]."

    SAG.add_acid, "[3]."

    SAG.add_hplc, "[4]."

    SAG.add_icpms, "[5]."

    SAG.add_other, '[6]' ") 'compcode.

    in l_cCompcode

    SAG

    where sagseqnum = p_iSagseqnum;

    Return l_cCompcode;

    END get_compcode;

    View Schema2:

    CREATE OR REPLACE FORCE VIEW 'Schema2. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

    AS

    SELECT sag.sagseqnum 'id,'

    trim (sag.substance |) » '|| Schema1.sag_online_action.get_compcode (SAG.sagseqnum)) "microorganisms"

    'Fresh,' Decode(SAG.subcontracted_flag,'Y','',SAG.fee_per_sample)

    Decode(SAG.subcontracted_flag,'Y','',additional_analyte_fee) "addl_fee"

    sag_symbols_key (sag.sagseqnum, sag_parameter.parmname, sag_parameter.prod) "icons."

    MethodDef.MethodDesc 'method ',.

    SAG.method_notes "notes."

    "Technical," SAG.technique

    SAG. Medium "colMedium."

    sag_shelf_life (SAG.sagseqnum) "shelf life."

    SAG.air_vol "airVol"

    SAG.sampling_rate 'samplingRate ',.

    Decode(SAG.subcontracted_flag,'Y','',sag_parameter.) LoQ) "LD",

    "OrderNum, SAG.orderby_seq

    (sag.osag_updated - to_date('01/01/1970','MM/DD/RRRR')) * 86400 "updated."

    SAG.online_update_action "online_update_action".

    SAG.

    sag_parameter,

    MethodDef

    WHERE sag.sagseqnum = sag_parameter.sagseqnum

    AND sag.methodref = methoddef.methodref (+)

    AND DECODE(sag.activeflag,,'N',sag.activeflag) = 'Y '.

    AND DECODE(sag.internalflag,,'Y',sag.internalflag) = n

    AND DECODE (sag.technique, NULL, 'XXX', sag.technique) = "microscopy".

    ORDER BY sag.substance,

    SAG. Medium;

    Schema3 notice:

    CREATE OR REPLACE VIEW "schema3. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

    AS

    SELECT "id."

    "microorganisms"

    "charges."

    "addl_fee,"

    "icons."

    'method ',.

    "notes."

    "technique."

    "colMedium,"

    "shelf life."

    "airVol,"

    'samplingRate ',.

    "LD",

    "orderNum."

    "to date,"

    'online_update_action '.

    OF Schema2.osag_microbials;

    Try

    Grant execute on sag_online_action to schema2 with grant option

  • connection mysql and oracle ORA-28545: error diagnosed by Net8 when connecting to an agent

    Hi all

    I have Oracle 10.2.0.5 server and MySQL 5.3 on windows environment. all are 64-bit.

    I want to connect to MySQL. I do the following

    Configure Listner.ora

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME = PLSExtProc)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (= Extproc PROGRAM)

    )

    (SID_DESC =

    (GLOBAL_DBNAME = ORCL)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (SID_NAME = ORCL)

    )

    (SID_DESC =

    (SID_NAME = mysql)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (PROGRAM = HSODBC)

    (ENVS = LD_LIBRARY_PATH = C:\oracle\product\10.2.0\db_2\LIB)

    )

    )

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oradev.hct.org) (PORT = 1521))

    )

    Tnsnames.ora configuration

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oradev.hct.org) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )
    MySQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST= 10.153.103.5) (PORT = 1521))
    (CONNECT_DATA =
    (SID = mysql)
    )
    (HS = OK)
    )

    create file initodbc.ora in the folder hs

    HS_FDS_CONNECT_INFO = mysql

    HS_FDS_TRACE_LEVEL = OFF

    Restart the listner

    tnsping

    C:\users\administrator > tnsping mysql

    AMT Ping Utility for 64-bit Windows: Version 10.2.0.5.0 - Production 08-NOV-2
    015 13:02:52

    Copyright (c) 1997, 2010, Oracle.  All rights reserved.

    Use settings files:
    C:\oracle\product\10.2.0\db_2\network\admin\sqlnet.ora


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.153.103.5)
    (PORT = 1521)) (CONNECT_DATA = (SID = mysql)) (HS=OK))
    OK (0 msec)

    Create the connection odbc for Unicode

    the test is successful

    now, I create the dblink

    create public mysql database link to connect to cssDBTeam identified by oracle using "mysql";

    then try to select from a table inside the MySQL database

    SQL > select * from appeal@mysql;

    Select * from appeal@mysql

    *

    ERROR on line 1:

    ORA-28545: error diagnosed by Net8 when connecting to an agent

    Cannot retrieve the text of the message NETWORK/NCR 65535

    ORA-02063: preceding 2 lines of MYSQL

    How could I solve this problem?

    Thank you.

    Hello

    I realize that your problem is that 10.2 HSODBC was never focused on the Windows 64-bit platform and was only available on 32-bit Windows.  You can not install the 32-bit on WIndows 64-bit HSODBC.

    Your only option is to install 11.2 DG4ODBC on your platform Windows 64 - bit, or if you have a RDBMS 10.2 installed on another platform, then you could use HSODBC as part of this installation and connect from the RDBMS on Windows 64 - bit using the links in the database.  HSODBC 10.2 software could not be installed as a stand-alone product and was only available as part of an RDBMS install.

    Kind regards

    Mike

  • ORA-28545: error diagnosed by Net8 when connecting to an agent

    Hi all

    This question was asked several times in this forum and I went to many discussions in this forum, but unfortunately I failed.

    I want to connect to MySQL database to oracle. I have the following configurations.

    1. Oracle database edition company 12 c (12.1.0.2.0) 64 bits on 64-bit Windows server 2012
    2. I have 5.6.11 MySQL on windows 7 64 bit
    3. I downloaded the driver site for delivery of oracle ODBC (MySQL Connector/ODBC 5.3.4 MSI for Windows x 86 (64 bit))
    4. I have install ODBC on my oracle server, a full install which installs the Unicode and Ansi versions.
    5. I create the connection ODBC for Unicode by going to control panel-> administrator tools-> (64-bit) ODBC Data Sources-> system DSN. I test and the test succeeded.
    6. I have set up my files Listner.ora, Tnsname.ora and initmysql.ora as below;

    Listner.ora

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = c:\app\Administrator\product\12.1.0\dbhome_1)
    (= Extproc PROGRAM)
    (ENVS = "EXTPROC_DLLS=ONLY:c:\app\Administrator\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
    (SID_DESC =
    (SID_NAME = mysql)
    (ORACLE_HOME = C:\app\Administrator\product\12.1.0\dbhome_1)
    (PROGRAM = dg4odbc)
    (ENVS = LD_LIBRARY_PATH = C:\app\Administrator\product\12.1.0\dbhome_1\LIB)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))
    )

    Tnsnames.ora

    PDBORCL =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    )

    (CONNECT_DATA =

    (SERVICE_NAME = pdborcl.hct.org)

    )

    )

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl.hct.org)
    )
    )

    MySQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = N410FS02)(PORT = 1521))
    (CONNECT_DATA =
    (SID = mysql)
    )
    (HS = OK)
    )

    initmysql.ora (C:\app\Administrator\product\12.1.0\dbhome_1\hs\admin\)

    HS_FDS_CONNECT_INFO = mysql

    HS_FDS_TRACE_LEVEL = OFF

    then I stop and start the listener, the listener status is less than

    LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on April 23, 2015 09:16
    : 52

    Copyright (c) 1991, 2014, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=ORADEV.hct.org) (PORT = 152
    (1)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    TNSLSNR for Windows 64-bit version: Version 12.1.0.2.0 - Prod
    ction
    Start date April 23, 2015 09:13:56
    Uptime 0 days 0 h 2 min 59 sec
    Draw level off
    Security ON: OS Local Authentication
    SNMP OFF
    C:\app\Administrator\product\12.1.0\dbhome_1\network\a Listener parameter file
    dmin\listener.ora


    C:\app\Administrator\diag\tnslsnr\ORADEV\listener\aler log listener
    t\log. XML
    Summary of endpoints listening...
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=ORADEV.hct.org) (PORT = 1521)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))
    Summary of services...
    Service 'CLRExtProc' has 1 instance (s).
    Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
    "Mysql" service has 1 instance (s).
    "Mysql", status UNKNOWN instance, has 1 operation for this service...
    Service 'orcl.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    Service 'orclXDB.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    Service 'pdborcl.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    The command completed successfully

    tnsping MySQL

    AMT Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 23-APR-2
    015 09:17:54

    Copyright (c) 1997, 2014, Oracle.  All rights reserved.

    Use settings files:
    c:\app\Administrator\product\12.1.0\dbhome_1\network\admin\sqlnet.ora


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = N410FS02)
    () (PORT = 1521)) (CONNECT_DATA = (SID = mysql)) (HS = OK))
    OK (40 msec)

    then I open sqlplus and connect to my plug-in database as user sys and create a link from public database for the test scheme that I have created in the MySQL database.

    create public database link mysql connect to test identified by test using 'mysql';
    

    then I try the table1 which lies in the scheme of test of MySQL to sqlplus as below

    SQL> select * from table1@mysql;
    select * from table1@mysql
                         *
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from MYSQL
    
    

    I have tried versions of Ansi and Unicode ODBC, but the same question.

    where is the problem in my setup?

    Thank you.

    You use the wrong host name in the tnsnames.ora.

    Take a look at the Oracle listener - it is configured with the address: (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    In your tnsnames.ora you specified in the mysql alias: (ADDRESS = (PROTOCOL = TCP) (HOST = N410FS02)(PORT = 1521))

    It does not work. Alias configured in the tnsnames.ora AMT must reference an Oracle listener who begins the process of bridge, so in your case at ORADEV.hct.org.

    So please correct your tnsnames.ora entry:

    MySQL =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    (CONNECT_DATA =

    (SID = mysql)

    )

    (HS = OK)

    )

  • Once again - ORA-28545: error diagnosed by Net8 when connecting to an agent

    I am trying to connect to a SQL server server 2012

    I make the connections ODBC (called MOFIBO2, MOFIBO3, MOFIBO4) and I have a successful connection to then SQL server.

    The Oracle database is:

    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

    I made 3 versions of the initdg4odbc.ora and they all look the same:

    # This is an example of initialization file of the agent that contains the HS settings

    # necessary for the database to ODBC gateway

    #

    # HS init parameters

    #

    HS_FDS_CONNECT_INFO = MOFIBOx (MOFIBO2, MOFIBO3 and MOFIBO4)

    HS_FDS_TRACE_LEVEL = off

    #

    # Required for the non-Oracle system environment variables

    #

    #set < varenv > = < value >

    My lisener.ora look like this:

    listener.ora # Network Configuration file: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = RESP-ora01)(PORT = 1521))

    )

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME = PLSExtProc)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (= Extproc PROGRAM)

    )

    (SID_DESC =

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (SID_NAME = RESPTEST)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO2)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO3)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO4)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    )

    ADR_BASE_LISTENER = C:\app\Administrator\product\11.2.0\dbhome_1\log

    And my share of tnsnames.ora mofibo then look like this (I did three variants as different "manual" using different methods):

    MOFIBO2 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SID = MOFIBO2)

    )

    (HS = OK)

    )

    MOFIBO3 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SID_NAME = MOFIBO3)

    )

    (HS = OK)

    )

    MOFIBO4 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = MOFIBO4)

    )

    (HS = OK)

    )

    When tnsping to all three versions I get this:

    C:\users\administrator > tnsping mofibo2

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:17

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SID = MOFIBO2)))

    HS = OK))

    OK (10 ms)

    C:\users\administrator > tnsping mofibo3

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:23

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SERVER = DELTOMBE

    (RELATED) (SID_NAME = MOFIBO3)) (HS = OK))

    OK (10 ms)

    C:\users\administrator > tnsping mofibo4

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:27

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SERVER = DELTOMBE

    (RELATED) (SERVICE_NAME = MOFIBO4)) (HS = OK))

    OK (0 msec)


    I created three database link with then in following (user name and password was in the wright case):

    create database MOFIBODB2 link to connect to the "username <>' identified by"password <>"with"MOFIBO2 ";

    create database MOFIBODB3 link to connect to the "username <>' identified by"password <>"with"MOFIBO3 ";

    create database MOFIBODB4 link to connect to the "username <>' identified by"password <>"with"MOFIBO4 ";


    When I tried to select from a table (select * from clients @ < DATABASELINKHERE >) I get errors (replace MOFIBO2 with MOFIBO3/4 and the same error occurs):

    SQL > select * from customers@MOFIBODB2;

    Select * from customers@MOFIBODB2

    *

    ERROR on line 1:

    ORA-28545: error diagnosed by Net8 when connecting to an agent

    Cannot retrieve the text of the message NETWORK/NCR 65535

    ORA-02063: preceding 2 lines of MOFIBODB2


    What was my mistake?


    Hello

    In the listener.ora, you have the host as -

    (HOST = RESP-ora01)

    but in tnsnames.ora entries you have.

    (HOST = RESP-ouA02)

    The tnsnames.ora host must be the same as the host of the listener.

    Unless you have a listener running on the RESP-ouA02 it is not clear why the tnsping returns a result.

    Change the host in the tnsnames.ora and let us know what happens.

    Kind regards

    Mike

  • 1068 error when I try to use Windows

    When you try to use Windows I askd to my RTC for auto, when this operation and clicking on start I get 'Error 1068'.
    I CBA find any help on the windows site. Anyone?

    Hello Smith

    Can you please tell us which model of laptop you have and be so kind and let me know what are RTC?
    Are you wrote on the subject of Vista repair tool - http://support.microsoft.com/kb/940520/en-us?

    Such a thing is not for me. I mean when the laptop has factory settings all muss work well. Have you noticed some problems with Vista before?

  • Error message when you try to use Toshiba Disc Creator

    I recently upgraded to Vista SP1 SP2 and now I get an error message when I try to use Toshiba Disc Creator 2.0.1.3. "An unexpected error has occurred. Error code 32007C-26-00000001 "it worked perfectly before.

    This is the first time that I used it since the update so I think that SP2 may be part of the problem, but I'm not sure. I could not find updates for TDC. My system is a Satellite L305-S5919 with Vista 32 bit.
    Someone has an idea of what could be the cause of this error?
    Thank you

    Have you tried to roll back the OS in time and checking the previous features once again, just to be sure, it has something to do with the installation of SP2?

    I put t know if anyone here can offer a solution but I m quite pessimistic in this topic and don t think that Toshiba provide new version.
    AFAIK Toshiba disc creator is always available with single and also downloadable image recovery application.

Maybe you are looking for

  • Load the Mac Book Pro

    I am able to charge my Mac Book Pro, in countries outside the United States without having to buy a converter?

  • Satellite L850-1V0 - Fan error popped up while I was playing a game

    Recently, I got an error that displayed so I was playing a game, he said that the cooling fan had a problem and that I should stop it immediately and send it for service. It's the first time that I had this, I have a program called Speccy that tells

  • DV6929NR backlight isn't on.

    Hello I got this laptop for Christmas from my grandparents and have been using it frequently. I started it this morning with no problems, the screen is very bright, as if it were usually. I closed it to say things to save energy while it was plugged,

  • Problems of fonts Windows 2012 R2

    Hi all We have recently migrated an application by name 'Engine' of 2008 R2 to 2012 R2 server. After you migrate that we have questions about fonts and the checkboxs. When you run this application on the server some ch eckboxs are cut with the edge.

  • Can someone help me with the message of outlook express error 0x800CCC0D. I can't receive emails

    I get the following error message: the host 'pop.ipa.net' is not found. Please check that you have entered the server name correctly. Account: * address email is removed from the privacy * Mail account ', server: 'pop.ipa.net', Protocol: POP3, Port: