Adding signature to trigger that executes a procedure on another DB

Posted on 2012-09-07
Last Modified: 2013-02-23
There was a security issue with trigger executing a procedure on another DB. We found a solution that was based on module signing (adding signature from certificate etc.)
I can't find any clear guide to sign procedure / trigger and to make that work.

Can someone please help me?
Question by:lynq
    LVL 68

    Expert Comment

    Does the trigger actually need to wait for the procedure to execute?

    Normally you don't want anything not absolutely required holding up a trigger, least of all something requiring cross-server communication.

    Can you instead use a Service Broker message to alert the other server that code needs to be run on it?

    Author Comment

    I've been talking about cross-DB not cross-server communication.
    Should I still use Service Broker?

    <<Does the trigger actually need to wait for the procedure to execute?
    Do you mean using WAITFOR inside trigger?

    Author Comment

    Will anyone help me?
    LVL 18

    Expert Comment

    If you have two databases on the same server, you should be able to grant any procedure in any of the db's permission to execute from anywhere you need.  Are you getting an error or what.  Post some code and an exact message from the server.

    Accepted Solution

    As I've said in first post the general description of my problem (including error and my code) can be found here
    We've found that this problem can be solved by using code signing.
    What I want to get from experts is clear algorithm how to use code signing in this particular case. Or any other way to make my trigger work.

    Author Closing Comment

    Nobody helped

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now