PL/SQL Callback notification with aq$_jms_text_message

Hi,
i want to set up a notfication for a pl/sql callback procedure. The message in my queue is enqueued via propagation from another instance. This is my setup (using oracle 10.2.0.3):
-------- the queue (multiconsumer): --------------
begin
dbms_aqadm.create_queue_table(queue_table => 'zmon_evt_in_qtable',queue_payload_type => 'sys.aq$_jms_text_message', multiple_consumers => true);
dbms_aqadm.create_queue(queue_name => 'zmon_evt_in_queue',queue_table => 'zmon_evt_in_qtable' );
dbms_aqadm.start_queue( queue_name =>'zmon_evt_in_queue' );
end;
-------- the callback-procedure (simply inserting an entry in a table called 'test'): --------------
create or replace procedure evt_in_callback(
context IN RAW,
reginfo IN SYS.AQ$_REG_INFO,
descr IN SYS.AQ$_DESCRIPTOR,
payload IN VARCHAR2,
payloadl IN NUMBER) is
begin
insert into test(textfeld) values ('RECEIVED!');
commit;
end evt_in_callback;
-------- the subscriber: --------------
begin
dbms_aqadm.add_subscriber(queue_name => 'zmon.zmon_evt_in_queue',
subscriber => sys.aq$_agent('zmon_evt_in_subscriber',null,null));
end;
-------- the notification: --------------
declare
reginfo sys.aq$_reg_info;
reg_list sys.aq$_reg_info_list;
begin
reginfo := sys.aq$_reg_info(name => 'zmon.zmon_evt_in_queue:zmon_evt_in_subscriber',
namespace => DBMS_AQ.NAMESPACE_AQ,
callback => 'plsql://zmon.evt_in_callback',
context => HEXTORAW('FF')
reg_list := sys.aq$_reg_info_list(reginfo);
DBMS_AQ.REGISTER(reg_list => reg_list,
reg_count => 1);
end;
The callback-procedure is not fired on arrival of a message in the queue. But i can see the the appropriate notfication-entry in sys.reg$.
Any suggestions why this doesn't work ?
BTW: can anybody tell me the meaning of the context-Parameter in the aq$_reg_info-Type ? Everybody uses HEXTORAW('FF'), but I don't understand what that means...
Jens
Edited by: dschenzl on Jun 4, 2009 11:13 AM

Finally, it's done.
The subscriber used in the propagation has to be the notification-subscriber (zmon_evt_in_subscriber). I used another subscriber, which was not registered for notification.
I found the solution in this thread: Callback trouble from mesage via propagated message.
Two days filled up with frustrating work - man, how i hate that...
Greetings to the community,
Jens

Similar Messages

  • AQ PL/SQL registered notifications

    Suppose I want to see what registered notifications exist for AQ plsql notifications.
    What I'm talking about are those notifications to PL/SQL callback procedures that have been registered using DBMS_AQ.REGISTER.
    I've searched and searched for data dictionary information about this but cannot find it.
    How can I use DBMS_AQ.UNREGISTER if I do not know what is already registered ?
    I would have thought that SYS.ALL_STREAMS_MESSAGE_CONSUMERS would have been a good guess but it doesn't have any rows and I have a working PLSQL notification active.
    Database is v10.2.
    Anyone know where to find this information ?
    Thanks.

    Hello,
    Unfortunately there is not a user view which is definitely an oversight. As suggested you could be granted the necessary privilges on sys.reg$ to overcome this.
    However, this whole area has been re-invigorated by the Database Change Notification feature which came in in 10.2. So much so that in 11.1 onwards you have the SUBSCRREGISTRATIONS and other v$ views as per http://download.oracle.com/docs/cd/B28359_01/server.111/b28420/aq_views.htm#sthref1151.
    The EMON process architecture has been changed to the now standard Coordinator/slave architecture as well. So with this investment in development in this area the robustness, scalability and diagnosability is improving.
    Thanks
    Peter

  • SQL Server Notification Services Removed from SQL Server 2008

    It comes as no surprise to us that 2008 will not be supporting notification services.  Several years ago our company developed our product line of alerting applications and gave some long and serious thought into using SQL Notification services. 
    Besides the fact that the NS desktop alerting component itself was rather bland/limited, (an acknowledge button, image, hyperlink) at the time it just made no sense to create a core component of the business plan around such a 3rd party dependent widget. 
    While a look at this MS page shows only a few companies who have built alerting systems around NS,
    http://www.microsoft.com/sql/technologies/notification/partners/appsoftware.mspx
    ….there is actually quite a few companies who have done this and must now consider a total rewrite of their alert system.
    Quite frankly, looking forward at MS's new family of Communications servers,
    http://msdn2.microsoft.com/en-us/office/aa905499.aspx
    I am not sure that things are changing much.
    "Welcome to the Microsoft Office Live Communications Server developers' home on MSDN. Live Communications Server 2005 provides your business with an enterprise-ready instant messaging, presence awareness, and an extensible platform that connects people, information, and business processes—enabling better decisions faster."
    Remember this?
    MSN Buys MessageCast for Real-Time Alerts
    http://www.eweek.com/c/a/Messaging-and-Collaboration/MSN-Buys-MessageCast-for-RealTime-Alerts/
    MessageCast was a serious product on the up.  They sold out and poof.  The whole fiasco was a joke.
    As it pertains to alerting platforms, the good call just may be having a architecture that is somewhat autonomous ( i.e.  Ok, perhaps Windows OS, .Net Framework and SQL Server as prerequisites is ok) to MS embedded components and not reliant on “Live Server" licenses.  Seems like just a better bet hands down all day long.
    I can tell you that about 5% of all alerts our clients create are sent to inform end users “Exchange is Down”.  It’s hard to get a OutLook Desktop Alert when Exchange is down.
    So, an alert system designed from scratch in-house (the hard way) may just be the heads up alert your customer needs to see.  If for nothing else, you can control your products destiny….unless of course MS Windows is made obsolete.  <wink>  Unlikely.  Hey....without MS products, we would not be in business.  They make some of the best software in the world.  But that does not mean your campany is not capable of the same.

    I'm coming to the discussion of the fate of Notification Services a bit late as it is now December. It is my view that Microsoft should rethink its position on Notification Services, and should continue to support and evolve it until such time as it might be migrated to the future "alerting" solution Microsoft devises for at least the following 2 reasons:
    (1) Notification Services addresses an enterprise application integration need complementary to Microsoft's web service strategy. This is a place Microsoft has not gone before, but needs to go. Why? EAI vendors won't modify their infrastructure to make them web service oriented ... they can't because it is legacy. Instead, they try to buy something and attach it to legacy ... but that doesn't work too well. Microsoft already has started/built greenfield. Further, Microsoft has commoditized such so that with notification services and its other .NET-based products (at least they evolve to such) a full complement of architectural components is being or has been assembled. Why would Microsoft make such an investment ... across the portfolio of server products ... and then back off of it? Microsoft has not been in the enterprise space before to the degree it has wished. It has intimated, at least, that it will be at the periphery with its variety of services and products. An integration broker is necessary for success at the periphery, and it provides a bridge to the enterprise back office that has the property of loose coupling, which is both good for Microsoft and its clients. 
    (2) Microsoft claims to be working to develop a server platform suitable to provision notification services. This server platform could be productized as Microsoft intends, and then notification services could be made to work on that platform and then it could be open sourced. If Microsoft intends to provide a kind of application server foundation that would make it possible for non-Microsoft development teams to build out services on a Microsoft stack that can be hosted with the same set of services as, say, IIS, Biztalk, SQL Server, etc., then it seems that Notification Services could easily be migrated to this server framework once such is ready for prime time. Functional expansion of such could be accomplished by an open source community if Microsoft chooses to not further extend it on its own dime ... maybe even on its own nickel.
    I've read some of the reasons justifying Microsoft's rationale to discontinue its Notification Services product line. One was that not many people used it. Blogs have listed a number of companies that have used it. The number may not be to the scale Microsoft would like ... one could look at Biztalk and suggest that Workflow Foundation represents Microsoft's belief that Biztalk too should be deprecated. Maybe so. But the strategy Microsoft is taking with workflow does not drop support for a core architectural capability. Why not keep Notification Services and give people time to learn how to architect in enterprise fashion with Microsoft infrastructure? Why not use it to seed an open source community? It probably costs you little ... and you have an open source community option that could get Microsoft further into an enterprise than it has previously been ... right into the middle ... leveraging Microsoft web service innovations in spades at substantially less cost than traditional EAI vendors, IBM, and other competitors could afford. People have to learn how to use Microsoft products in an enterprise context ... aside from specialized applications and OS vmware, what products have you put out that systematize infrastructure?
    I've also heard that Microsoft is considering incorporation of Notification Services as part of Reporting Services. Please pardon me but that seems ack basswards ... events are not reports, but reports could be events if you view reports as correlations over critical business activities instead of some statically produced bit of information to be shoved off into someone's mailbox or file system or even web site. Reports are static. Events are part of a dynamic and learning enterprise platform. Isn't that what you're attempting to build infrastructure for? Isn't that exactly what Microsoft needs to secure its position at the back of an enterprise just as it has the front?
    Please reconsider your position. And please contact me at tommy  at zipa dot deedoodah dot com to discuss. I'm as opinionated as everyone else, and I think you have a good product here that you're throwing away. If you don't want it, I will take it ...
    Sincerely,
    Tom Winans

  • PL/SQL Callback to Dequeue

    I have a procedure that automatically dequeues from a PL/SQL callback (9iR2) in a single consumer queue within the same instance. The same procedure functions when manually called agaist a propogated queue in a separate instance, but it will not work via PL/SQL callback.
    Callback code:
    DECLARE
    reginfo1 SYS.aq$_reg_info;
    reginfolist SYS.aq$_reg_info_list;
    BEGIN
    -- register for the pl/sql procedure notifyCB to be called on notification
    -- AQNMDLINK: schema owner
    -- CFR_QUEUE_DEST: prop queue
    -- NMD: consumer
    reginfo1 :=
    SYS.aq$_reg_info ('AQNMDLINK.CFR_QUEUE_DEST:NMD',
    1,
    'plsql://AQNMDLINK.p_dequeue_cfr_submit',
    HEXTORAW ('FF')
    -- Create the registration info list
    reginfolist := SYS.aq$_reg_info_list (reginfo1);
    --SYS.DBMS_AQ.unREGISTER (reginfolist, 1);
    SYS.DBMS_AQ.REGISTER (reginfolist, 1);
    COMMIT;
    END;

    Perhaps this guide can help you:
    Application Developer's Guide - Advanced Queuing Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96587.pdf
    Joel P�rez

  • Regarding sql server notification service

    i never use sql server notification service. so i like to know what it does. does it notify when data changed? suppose i have one win apps by which our employee insert/update/delete data. i want that when data will be inserted/updated/deleted then this notification
    service notify my win apps that data change and also provide technique to know which data change or inserted or delete. i use sql dependency but it has draw back like it can only notify client about something has happened but never say like which data is inserted
    or updated or deleted.
    anyone can guide me how to notify my win client from sql server with changed data like push notification with data to win client. thanks

    can u please point me to any good article which help me to write that kind of trigger which can capture data change and push the change to client. thanks
    I couldn't find an article with a cursory search so I created the example below to illustrate this basic technique that you can customize and extend for your purposes.  The trigger creates an XML document with the before/after images of the inserted/updated/deleted
    rows.  The application executes the change notification target service proc in a loop to receive change messages as they become available.
    This method will work for a single application instance that receives change notifications.  If you have multiple users, I suggest a mid-tier service to receive these notifications and then multicast to clients using a publish/subscribe pattern. 
    In the case of frequent data changes, it would be better to use a single long-running conversation with the conversation handle saved to a state table instead of starting a new conversation for each message in order to reduce service broker overhead.
    Note that the trigger will write messages to the queue regardless of whether an application is listening for messages.  For that reason, it would generally be best to run the mid-tier service continuously or at least consume/ignore all of the pending
    messages at startup.
    Be aware that there are a number of variations of this general pattern but I think this should get you started.  Post questions specific to Service Broker to the related forum:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlservicebroker
    CREATE DATABASE ExampleDatabase;
    ALTER AUTHORIZATION ON DATABASE::ExampleDatabase TO sa;
    ALTER DATABASE ExampleDatabase SET ENABLE_BROKER;
    GO
    USE ExampleDatabase;
    GO
    CREATE TABLE dbo.Product(
    ID varchar(50) NOT NULL
    CONSTRAINT PK_Product PRIMARY KEY
    , ProductName varchar(50)
    , ProductDescription varchar(1000)
    GO
    CREATE TRIGGER TR_Product
    ON dbo.Product
    FOR INSERT, UPDATE, DELETE
    AS
    DECLARE
    @ConversationHandle uniqueidentifier
    ,@ChangedRows xml;
    SELECT @ChangedRows = (
    SELECT
    SELECT ID, ProductName, ProductDescription
    FROM dbo.Product
    FOR XML PATH('Before'), TYPE)
    SELECT ID, ProductName, ProductDescription
    FROM dbo.Product
    FOR XML PATH('After'), TYPE)
    FOR XML PATH('Changes'), TYPE
    BEGIN Dialog @ConversationHandle
    FROM SERVICE [ProductChangeNotificationInitiatorService]
    TO SERVICE 'ProductChangeNotificationTargetService'
    ON CONTRACT [ProductChangeNotificationContract]
    WITH ENCRYPTION = OFF;
    SEND ON CONVERSATION @ConversationHandle
    MESSAGE TYPE [ProductChange]
    (@ChangedRows);
    GO
    CREATE MESSAGE TYPE [ProductChange] VALIDATION = WELL_FORMED_XML;
    CREATE CONTRACT [ProductChangeNotificationContract](
    [ProductChange] SENT BY INITIATOR
    CREATE TABLE dbo.ProductChangeNotificationErrors(
    ErrorTime datetime NOT NULL
    ,conversation_handle uniqueidentifier NOT NULL
    ,service_name sysname
    ,message_type_name nvarchar(256) NOT NULL
    ,message_body varbinary(MAX) NULL
    GO
    CREATE PROCEDURE dbo.usp_CleanupProductChangeNotificationInitiatorQueue
    AS
    SET NOCOUNT ON;
    DECLARE
    @conversation_handle uniqueidentifier = '00000000-0000-0000-0000-000000000000'
    ,@service_name sysname
    ,@message_type_name nvarchar(256)
    ,@message_body varbinary(MAX)
    ,@description nvarchar(3000);
    WHILE @conversation_handle IS NOT NULL
    BEGIN
    SET @conversation_handle = NULL;
    WAITFOR (
    RECEIVE TOP (1)
    @conversation_handle = conversation_handle
    ,@service_name = service_name
    ,@message_type_name = message_type_name
    ,@message_body = message_body
    FROM dbo.ProductChangeNotificationInitiatorQueue)
    ,TIMEOUT 1000;
    IF @conversation_handle IS NOT NULL
    BEGIN
    IF @message_type_name = N'http://schemas.microsoft.com/SQL/ServiceBroker/EndDialog'
    BEGIN
    END CONVERSATION @conversation_handle;
    END
    ELSE
    BEGIN
    INSERT INTO dbo.ProductChangeNotificationErrors(
    ErrorTime
    ,conversation_handle
    ,service_name
    ,message_type_name
    ,message_body)
    VALUES(
    GETDATE()
    ,@conversation_handle
    ,@message_type_name
    ,@service_name
    ,@message_body)
    SET @description = 'Unexpected message type ' + @message_type_name + ' received';
    END CONVERSATION @conversation_handle WITH ERROR = 1 DESCRIPTION = @description;
    END;
    END;
    END;
    GO
    CREATE QUEUE ProductChangeNotificationInitiatorQueue
    WITH ACTIVATION (
    PROCEDURE_NAME = dbo.usp_CleanupProductChangeNotificationInitiatorQueue,
    MAX_QUEUE_READERS = 1,
    EXECUTE AS SELF);
    CREATE SERVICE [ProductChangeNotificationInitiatorService]
    ON QUEUE ProductChangeNotificationInitiatorQueue ([ProductChangeNotificationContract]);
    CREATE QUEUE ProductChangeNotificationTargetQueue;
    CREATE SERVICE ProductChangeNotificationTargetService
    ON QUEUE dbo.ProductChangeNotificationTargetQueue (ProductChangeNotificationContract);
    GO
    CREATE PROCEDURE dbo.usp_ProductChangeNotificationTargetService
    @Timeout int = 5000
    AS
    SET NOCOUNT ON;
    SET XACT_ABORT ON;
    DECLARE
    @conversation_handle uniqueidentifier
    ,@service_name sysname
    ,@message_type_name nvarchar(256)
    ,@message_body varbinary(MAX)
    ,@description nvarchar(3000);
    WAITFOR (
    RECEIVE TOP (1)
    @conversation_handle = conversation_handle
    ,@service_name = service_name
    ,@message_type_name = message_type_name
    ,@message_body = message_body
    FROM dbo.ProductChangeNotificationTargetQueue)
    ,TIMEOUT @Timeout;
    IF @conversation_handle IS NOT NULL
    BEGIN
    SELECT CAST(@message_body AS xml) AS ChangedRows;
    END CONVERSATION @conversation_handle;
    END;
    GO
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Change Notification with C#

    I am trying to get a test application to work using Oracle Change Notification with C#, but I am not receiving the callback notification in my application. Oracle DB version is 11.2.0.1.0. Oracle.DataAccess v.2.112.30. I can confirm the query gets registered in Oracle by viewing SYS.USER_CHANGE_NOTIFICATION_REGS and SYS.USER_CQ_NOTIFICATION_QUERIES. However, nothing ever appears in SYS.DBA_CHANGE_NOTIFICATION_REGS.
    The registration persists until I commit a transaction on the table. The registration disappears after a few seconds after the commit and my application does not received the notification.
    I have made sure my computer is listening on the correct port and have even tried turning off any firewall that could be blocking the port.
    I do have GRANT CHANGE NOTIFICATION to MYSCHEMA, GRANT EXECUTE ON DBMS_CHANGE_NOTIFICATION TO MYSCHEMA, and the JOB_QUEUE_PROCESSES is set to 1.
    Questions:
    1) Should the registration be visible in SYS.DBA_CHANGE_NOTIFICATION_REGS and, if so, what could be causing it not to be when it is visible in SYS.USER_CHANGE_NOTIFICATION_REGS and SYS.USER_CQ_NOTIFICATION_QUERIES?
    2) What could be causing the registration to disappear after a commit?
    3) What could be causing the failure of the notification to my application?
    Here is the C# code I am using and it is basically the same as from the Oracle website:
    using System;
    using System.Threading;
    using System.Data;
    using Oracle.DataAccess.Client;
    namespace NotifyTest
    public class Program
    public static bool IsNotified = false;
    public static void Main(string[] args)
    string constr = "User Id=mySchema;Password=myPassword;Data Source=myOracleInstance";
    OracleDependency dep = null;
    try
    using (var con = new OracleConnection(constr))
    Console.WriteLine("Registering query...");
    var cmd = new OracleCommand("select * from mySchema.NOTIFY_TEST", con);
    con.Open();
    OracleDependency.Port = 1005;
    dep = new OracleDependency(cmd);
    dep.OnChange += OnMyNotificaton;
    int queryRegistered = cmd.ExecuteNonQuery();
    // If oracle returns -1, then the query is successfully registered
    if (queryRegistered == -1)
    Console.WriteLine("Query Registered...");
    Console.WriteLine("Listening for Callback...");
    else
    Console.WriteLine("There was an error...");
    catch (Exception e)
    Console.WriteLine(e.Message);
    // Loop while waiting for notification
    while (IsNotified == false)
    Thread.Sleep(100);
    public static void OnMyNotificaton(object sender, OracleNotificationEventArgs arg)
    Console.WriteLine("Table change notification event is raised");
    Console.WriteLine(arg.Source.ToString());
    Console.WriteLine(arg.Info.ToString());
    Console.WriteLine(arg.Source.ToString());
    Console.WriteLine(arg.Type.ToString());
    IsNotified = true;
    }

    Just wanted to provide an update as to how I resolved this issue. I changed my Oracle.DataAccess.dll from v.2.112.3.0 to v.2.112.1.2 and it works fine.

  • Unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1

    I am unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1. Log message is as follows:
    Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
    Failed to verify Authenticode signature on DLL 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\xplog70.dll'.
    Error: 17750, Severity: 16, State: 0.
    Could not load the DLL xplog70.dll, or one of the DLLs it references. Reason: (null).

    Hi JFriedley,
    According to your error message, there might three reasons for this issue.
    xplog70.dll is corrupt, you need to check if you have any SQL Server running on same file version and same production
     edition. If xplog70.dll is corrupt, you can copy it from the new server where agent is running fine to your problematic server.
    Native client not installed properly. If you try applying any latest Service Pack or Cumulative Update then check if the SQL Server Agent can start, if that also doesn’t solve issue then try to reinstalling SQL Server Native client from SQL Server setup
    files.
    There is a similar issue about error 17750, you can review the following article.
    http://blogs.lostincreativity.com/sqldba/sqlserver-error-17750-could-not-load-the-dll-xpstar90-dll/
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Setting fields defined in SQL updateable report with a process

    I have SQL statement defined in a SQL updateable report with hidden fields. I want to be able to update these hidden fields with values from other displayed fields on the page. How do I reference these hidden items - I have referencign them as :my_field but get and error telling me thats its underfined.

    But, the reason I am doing this is because I want to format the page with 6 columns in one <TD> cell with some extra text and formatting etc - I don't want 1 column per <TD>. Thats why I am using the APEX_ITEM.TEXT so I can format the 1 <TD> the way I want it (with 6 columns it there).
    In the short term can you tell me how to reference hidden fields please.
    I will create the case in apex.oracle.com in the next few days to make it clearer.
    P.S. see my previous post: SQL QUERY updateable report with APEX_ITEM fields to update hidden columns

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • Integrate KDE notifications with Openbox?

    Hi,
    I'm using openbox with whole set of KDE programs (I prefer it this way over KDE with OB as WM).
    Is there any way of integrating KDE notifications with OB to make it look neat?
    Cheers
    vi3dr0

    What do you mean "integrating KDE notifications with OB" ?
    If it's related to launching KDE applications from OB menu, you can have entries like that :
    <menu id="apps-editors-menu" label="Editors">
      <item label="Kwrite">
        <action name="Execute">
          <command>kwrite</command>
          <startupnotify>
            <enabled>yes</enabled>
          </startupnotify>
        </action>
      </item>
    </menu>
    in your ~/.config/openbox/menu.xml
    If it's something else, explain and give an example of what you want.

  • Is there a way to create SQL Dev reports with validated binds?

    Is there a way to create SQL Dev reports with validated binds similar to the way user defined extensions can have <prompts> with a <value> that is a SQL statement returning a list of possible values?
    This sure would make select appropriate values for binds in reports easier and less error prone.

    Maybe a forum search on "Windows registry" would turn up some useful things. You're not the first to ask this. You might save yourself and everyone else some time if you'd simply do that.

  • Error in calling SQL plus program with parameter from Shell script

    This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
    PARAMETERS=`echo $1 |tr -d '\"'`
    DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
    CONN_STRING=$DB_USER_ID
    REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
    timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
    timestam=`date +%y-%m-%d`
    sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
    chmod 755 statement.sh
    . statement.sh
    My Sql plus program is like this.
    set pagesize 0
    set heading off
    set feedback off
    spool $GEC_TOP/log/ge_ar_statement.sh
    select output_file_name
    from fnd_concurrent_requests
    where trunc(actual_completion_date) = '&2';
    spool off;
    exit;
    When i run the concurrent program, i am getting the following error:
    ar_statement: line 14: REQ_DATE: command not found
    Enter value for 2:
    User requested Interrupt or EOF detected.
    ar_statement.sh: line 1: Enter: command not found
    ar_statement.sh: line 2: User: command not found
    ar_statement
    Program exited with status 127
    I am not strong at Unix Porgamming and i would request someone who can
    help me out as soon as possible.
    I need this solution quickly and thank everyone in advance.
    Thanks.

    Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
    Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
    ORACLE_SID=my_instance_name
    ORACLE_HOME=/my_path_to_oracle_home_directory
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$ORACLE_HOME/bin:$PATH
    I remember some slightly different way of coding to handle the sqlplus return codes.
    For instance:
    sqlplus -s /nolog > /dev/null <<-EOF
    connect system/manager
    @ssm.sql
    whenever oserror exit failure
    whenever sqlerror exit failure
    EOF
    sql_err=$?
    if [ $sql_err -ne 0 ]; then
       echo "FAILURE"
    else
       echo "SUCCESS"
    fiThe - in -EOF supresses tab's
    Using connect will prevent ps from showing your login credentials
    In some versions of bash the ending EOF needs to be at the beginning of the line to work.
    Edited by: waldorfm on Jul 14, 2010 7:05 PM
    complaining about putting code between code delimiters and forgot myself ;-)
    Edited by: waldorfm on Jul 14, 2010 7:08 PM
    Btw, if you "source" a script running it like . .script, than an exit in that script will log you out.

  • Difference between database features - SQL Server 2008 R2 navtive vs SQL Server 2012 with SQL Server 2008 compatibility set?

    I am investigating the impact of upgrading from SQL Server 2008 R2 to SQL Server 2012. To reduce the impact of the upgrade, I am planning to restore / create our application database onto SQL Server 2012 with compatibility level 100 (SQL Server 2008 and
    SQL Server 2008 R2).
    Are there any differences in feature support for database running in native mode on SQL Server 2008 R2 vs a database installed on SQL Server 2012 with compatibility level 100 set?

    Are there any differences in feature support for database running in native mode on SQL Server 2008 R2 vs a database installed on SQL Server 2012 with compatibility level 100 set?
    Yes there can be difference and impact there are few features deprecated in SQL Server 2012 you must be aware about that. Please see
    Deprecated Database Features in SQL Server 2012
    Deprecated SQL Server features in SQL Server 2012
    After you migrate database to 2012 please don't move ahead with production unless you have tested your application to new created database
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • SQL Server 2012 with SP1 on Windows 8.1 Pro

    Can I install "out-of-the-box" SQL Server 2012 with Service Pack 1 Enterprise Edition or SQL Server 2012 Developer Edition on my Windows 8.1 VM?
    Thanks.

    Hello,
    SQL Server 2012 SP1 is fully supported by Windows 8.1, and there is no need to install any SQL update for the installation.
    Enterprise Edition is not supported on client operating systems like Windows 8.1 but setup won’t prevent you from installing.
    Developer Edition is fully supported on client operating systems.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to enable high availability on SQL Server 2005 with Windows Server 2008 Enterprise R2

    Dear Folks,
    I would like to ask you about this thing. I'm working for IT department for bank in Myanmar. Our bank have up to 96 branches across all of Myanmar including H.O. We are using Microsoft SQL Server 2005 with Windows Server 2008 for our banking
    information system. My main problem is having to backup and restore the database backup files every time the servers in branches goes down for whatever reasons. I want to deploy this feature of high availability and failover cluster using Windows Server 2008
    and SQL Server 2005. Our branches have 2 Servers. One is for Primary and other is for Backup. What I want to do is that, I want to change Backup Server to Primary Server whenever the Primary Server goes down for whatever reasons. All the working data and databases
    from Primary will immediately replicated into Backup Server along with all the IP information of Primary Server. Please give me step by step guide for this process.

    Try below
    http://blogs.msdn.com/b/cindygross/archive/2009/10/23/checklist-for-installing-sql-server-2005-as-a-clustered-instance.aspx
    I will recommend you to upgrade SQL server to newer version for support as well as flexibility.
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

Maybe you are looking for

  • PP CC 2014 and AE CC 2014 issues an nMacPro

    My frustration with the combination of Adobe and the new MacPro grows. I’ve posted in here before and everyone has been helpful, I’m hoping you can help shed some light once more. First I’ll explain the issue then let you know how the system is arran

  • Coherence not update database

    Hi I'm new in Coherence and I have a doubt about the synchronization between Coherence+JPA and the database. I have created a data model with JPA Entities which has an entity Role with their privileges Map. Privileges Map is <String><PrivilegeList> a

  • LC10: system error

    when in LC10:Livecache mornitoring, error occurs: Name and Server     : HLC - hgapodev DBMRFC Function     : DBM_EXECUTE Command             : dbm_version Error               : System Error Error message       : check RFC destination:SAPDB_DBM ERROR 

  • Field conversion from char .

    Dear member ,             Is there any way to reduce the prefix zero from sale order 10 digit char .            EG: if 0053549980 is the so no I want to make it 53549980  . I have transfered  the vale into integer variable but error is coming  data o

  • Lost Pre-Order Receipt

    I pre-ordered Grand Theft Auto V for PC on Febuary 10th, back when I picked up my pre-orders for Evolve. Normally I keep all my pre-order receipts in a specific envelope, but I think this was one of a few times they stapled my pre-order receipt to th