How to put a SQL Agent Job wait in the trigger while the job is running.

Hello!
I am not a geek in writing t-sql code so I am seeking forum help in completion of my task.
I have a trigger which fires upon a action and with in that code, I am starting a job via t-sql like
EXEC msdb.dbo.sp_start_job N'JobName';
Now, I want to check the condition like that, If the trigger got invoked while the job is running, it should wait till the successfully completion of the job.
Thanks for your time and help on this.

You can use Context_info with Wait for delay 
Below are some useful links..
http://www.sqlservercentral.com/articles/T-SQL/2765/ 
http://technet.microsoft.com/en-us/library/ms180125(v=sql.110).aspx 
http://ask.sqlservercentral.com/questions/42786/how-to-avoid-a-stored-procedure-to-be-executed-par.html
Thanks,
Saurabh 
http://www.linkedin.com/in/sbhadauria http://www.experts-exchange.com/M_6313078.html

Similar Messages

  • HT5621 I have changed my apple id recently and the changes have been reflected on my iPad for both the apps store and the iCloud, however, my iphone still insist on using my old apple id for the iCloud while the app store is fine. how can i correct the pr

    I have changed my apple id recently and the changes have been reflected on my iPad for both the apps store and the iCloud, however, my iphone still insist on using my old apple id for the iCloud while the app store is fine. how can i correct the problem?
    Thanks

    Hi Baem_leeds
    Welcome to the Support Communities!
    If you change your Apple ID you will need to sign in with the new information or password the next time you use an Apple service or feature that uses Apple ID. If you have multiple devices that use features and services that require an Apple ID, you will need to sign in again on each device.
    The links below will provide additional information:
    Where can I use my Apple ID?
    http://support.apple.com/kb/HT5616
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    Cheers,
    Judy

  • How do I inactivate the silence while the iphone is locked

    How do I inactivate the "silence while the iphone5s is locked", under settings, under do not disturb?

    Not sure I completely understand your question but you have the option to silence the phone 'Always' or 'Only while the iPhone is locked'. 
    If DND is on and you don't want it on, just swipe up from the bottom of the screen and bring up control center and press the crescent moon-shaped icon and it will turn it off.

  • How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication

    Hi ALl,
    I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
    . This package runs fine if i click the server connection properties type the password and save it.
    Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying 
    "Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
    Can someone please help me with any suggestions on how to do this?
    I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
    So, If someone can please throw any suggestions or ideas on this it would be great.
    Thanks

    You need to add password as a config item and set it from the file source or sql table
    see this as an example
    http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How do I get SQL Agent to perform an FTP connection through a SSIS package?

    I have created a number of SSIS packages that I am running through SQL Agent in various jobs.  I have set up a Credential / Proxy for the job steps and for the most part everything runs no problem.  The issue I have is with the step where I make
    a connection to a FTP server and download files.  In BIDS the step works fine but in SQL Agent the step times out.  I presume that it has to do with the account that it is being run under but that is what I thought the Credential / Proxy was supposed
    to handle (as it does for all the other steps).  I am running on SQL Server 2008 R2.  I have created a test job that has only one step which is to connect to the FTP server and download some text files.  I have tried utilizing package configuration
    files and have tried various ProtectionLevels to no avail.
    Anyone have any thoughts or direction for me to take?  Will continue to research and will post if I resolve this.
    Thanks, Andrew

    On the dev environment the ProtectionLevel is set to EncryptSensitiveWithUserKey and that is what I tried first on the prod server.  Subsequently I also tried utilizing a package config file (with ProtectionLevel then of DontSaveSensitive) and have
    also tried working with the ServerStorage.
    For deployment I copied the relevant dtsx files to a solution on the prod server.  I verified that the packages all had tested connections in the Connection Manager.  I have run all the packages in the BIDS on the prod server and they all worked. 
    I have created a test package from scratch on the prod server to test the ftp connection.  This test package runs from BIDS fine.  I have set the SQL Agent file to access through the file system (no luck) and have saved the package to the SSIS Packages
    and had the job step access from there (no luck either).

  • How to put a few pages together as a panel group in the same screen ?

    Dear Friends,
    Hello. I am developing the accounting application of Journal Entry module. I have developed 5 pages for a journal entry: Journal header, Journal Line, Journal total, Journal Error and Journal Approval. I want to put 5 pages together as a panel group in the same screen so that users are convenient to use them. The format is as follows:
    Header | Lines | Total | Error | Approval
    When a user click on Header or Lines or Total or Error or Approval, its related page is displayed below it on the screen. But I don't understand how to put "Header", "Lines", "Total", "Error" and "Approval" together as above format and link them to its related page. Can anybody tell me how to do that ? Thanks.
    Lucy

    Mike,
    It's correct to make 5 pages as a seperate component.
    I am developing an accounting system using PeopleTools by myself.
    Because you understand PeopleSoft financial application, please tell me the 2 questions as follows:
    First, In Journal Line page, when select "edit Journal" and click button "process", the system check the Journal against Budget, if it's Ok, the System assign Journal ID for the Journal and put "valid" into the field of "Budget Status" and "Journal Status" in Total page. If it's not OK, the system send error message into Error page. Do you know how developer do that ?
    Second, In Journal Line Page, when select "Submit Journal" and click button "process", the system send the Journal to Approval page for approval. Do you know how developer do that ?
    Lucy

  • I have a 16gb touchscreen zune i dont know how to put music or pics on it is itunes compatible with the zune?

    Is itunes compatible with a touchscreen zune i dont know how to put music or pics on it

    There's a lot of information about Zune here:
    http://en.wikipedia.org/wiki/Zune
    and it looks like you have the Zune HD?
    http://en.wikipedia.org/wiki/Zune_HD
    I've looked but I can't find anything obvious on those pages indicating it will work with iTunes - maybe someone in the iTunes for Windows Forum would know?
    Regards,
    Colin R.

  • How to put a text in upper left hand corner for all the application?

    I want to put a text in upper left hand corner for all the pages on application?
    I don't want to put one page by another.
    Thank you.

    If you put it in a region on page zero, it will be inherited by all pages of the application.. Literally in the upper left corner? Even the login page? You could also modify the template page that your using from your theme, so that all pages would have this attribute, whichever you are more comfortable with..
    Thank you,
    Tony Miller
    Webster, TX

  • How do I get values into a vi from a subvi while the subvi is still running within the vi?

    Hello
    This is my problem. I have a subvi that runs an experiment. At different point in the experiment different instruments are on or off and I have a boolean array display this info. It is updated at various points of the experiment via a local variable. That works fine. Here is the problem though. I run that subvi from a main vi program (that runs it several times for several experiment cycles). I would like to pass the status of that array onto the mainvi to display there too. The problem is that the array in the main vi is not updated until the subvi is done running and thus displays only the array status at end of experiment (instead of changing
    as the status changes within the subvi). I tried using a global variable to write to it in the subvi every time there is an update, and read from it in the mainvi, but that doesn't work, it still displays just the status at the end of the subvi execution. Does anyone know how to make this work, or if there is a workaround this? Thanks.

    If you have LabVIEW 6i, you can update indicators of a calling VI from
    a SubVI, while the subVI is running.
    In your case you need
    1) an indicator on the main VI panel to display the boolean array
    2) to pass a reference to that indicator to the subvi when you call it
    3) to use this reference in the subVI, connect a property node to it and
    write the values to be displayed to the 'value' property of this node
    If you don't have version 6, you can write the values to be displayed to
    a global and display this global in the main VI from within a while loop
    which must run in the main VI in parallel to the running subVI.
    It's more complicated, since you need a mechanism to gracefully shut
    down the while loop after subVI finishes. You could do this with
    another global control boolean which is not displayed but just connected
    to the repeat terminal of the while loop. Don't forget to put a 'Wait' of,
    say, 50...100 msec in that while loop.
    -Franz
    zkajan schrieb:
    > Hello
    > This is my problem. I have a subvi that runs an experiment. At
    > different point in the experiment different instruments are on or off
    > and I have a boolean array display this info. It is updated at
    > various points of the experiment via a local variable. That works
    > fine. Here is the problem though. I run that subvi from a main vi
    > program (that runs it several times for several experiment cycles). I
    > would like to pass the status of that array onto the mainvi to display
    > there too. The problem is that the array in the main vi is not
    > updated until the subvi is done running and thus displays only the
    > array status at end of experiment (instead of changing as the status
    > changes within the subvi). I tried using a global variable to write
    > to it in the subvi every time there is an update, and read from it in
    > the mainvi, but that doesn't work, it still displays just the status
    > at the end of the subvi execution. Does anyone know how to make this
    > work, or if there is a workaround this? Thanks.
    Franz Josef Ahlers
    Section Semiconductor Devices
    Physikalisch-Technische Bundesanstalt
    Bundesallee 100
    D-38116 Braunschweig
    phone: (+49) 531 592 2410
    fax: (+49) 531 592 2405

  • How to safely turn off the computer while the motion servo is still enabled?

    When we use PCI-7344 and set it for serve closed control, I have found a very serious problem
    in using the control card in this mode.
    As the card is able to control motors only with the computer at power on status, but if we are very
    carelessly to shut down the computer and without the notice to turn off motor driver power first
    we would always get serious sudden moves of the motors, and might cause damages to the system. The same situation also applies to when control the motors under open/closed loop stepper mode.
    How should I do to prevent the above situation?
    (note: in my system, we have hook up relays and timers if we could set DIO bits before shut down
    the computer. But
    still, there are a certain occassions that the operator would still forget to set the DIO bits
    and turn off the computer directly)

    The Inhibit output pin of the motion controller (also called drive enable) is the best way to achieve this. It is basically a signal that most power drives take in as an active low input so that when the powergoes out of the computer, the line goes low and immediately kills the axis so that no servo ouptut command affects the motor.
    Best regards,
    Alex Games

  • How did my ipad make a facetime call all by itself while the app was closed and the ipad was in it's case sitting all by itself?

    My ipad made two facetime calls to a number (my son's iphone) that is not listed in my facetime contacts while the app was closed and my ipad was in it's case untouched in my backpack.  How/why did this happen?

    Did you make an facetime call using your iphone?

  • How to use pl/sql procedure or function as part of validate the entity obj?

    Hi,
    we are migrating from oracle forms to jdeveloper 11g.
    I have a req. that,i wanted to use oracle pl/sql procedure to validate a attribute in an entity created with ADF BC?
    Is it possible to implement this?
    And how to show the error message from pl/sql procedure?
    Regards
    Murali.

    Hi,
    It is possible by using a method validator for the entity attribute.
    Create a transient attribute 'X'.
    In the validation section of the attribute to be validate, choose method validator.
    In the Error Message tab set error message as {0}.
    Below the value for tokentoken should source.X (X is the transient attribute name)
    In the java code of method validator, call the stored procedure and set the value of transient attribute X with the error message from SP.
    Use setX("ErrorMessage").
    Regards,
    Srinidhi

  • HT2492 I am using Snow Leopard and the icon for dashboard was removed from the dock.  Does anyone knopw how to put it back?  I have searched Finder, Trash and the Applications folder but i can't find it.  It works when i press F4 so it must still be there

    I have searched Finder, Trash and the applications folder but i can't find where it is kept.  I want to put the icon for Dashboard back in the dock - how can i do this?

    The combo update may replace anything you have inadvertently deleted.
    Mac OS X 10.6.8 Update Combo v1.1
    You can reapply it over the top of any previously downloaded version.  I see that your profile says 10.6.8.
    Then software update to pick up any new security, iTunes updates.

  • How can i install windows 7 on my second hard disk while the first hard disk running with windows 8.1

    I have Toshiba laptop P-75 model :
    this model have two slots for the hard disks , on my first hard disk i am running the default windows 8.1 which came with the original condition (when i bought my laptop) , since i am a civil engineer many of my field programs  is not working on the
    windows 8.1 version and the rest programs barely works appropriate!
    I want to download windows 7 on the second hard disk, thus having dual boot in order to chose which windows i want to use.
    thanks in advance 
    ENGR. Saeed Al-Khaled 

    You need to consult with Toshiba as this is a hardware specific problem and you may not be able to install Windows 7 dues to lack of hardware drivers and/or the laptop being configure for Secure Boot which Windows 7 does not cope with either.
    It is your responsibility to do the research for this project to ensure compatibility and needed hardware drivers.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • How to declined the call while the screen is locked on io7 ?

    Guys I tried to declined call while the screen is locked I can find any option to cancel the call
    However you can do if the screen is in locked

    Double tap the power button.

Maybe you are looking for

  • Printing Issues with HP D145 and multiple users from G5

    Hi - I've a HP D145 All-In-One connected via USB to a G5 (as described below). The machine has multiple accounts on for different members of my family. The printer is directly connected to the G5 via USB connection but is shared with other Macs. Prin

  • Confused between getting an APPLE TV or VGA cables...

    Hey Folks. Im not sure if I should get an APPLE TV or a VGA cable to connect my MacBook Pro to my LCD TV... what do you recommend. Im a heavy film buff, so I watch a lot of movies - with that said, APPLE TV seems like a good selection since I can pur

  • RAC Installation ---- Hardware Requirment Doubt

    Hi All, I have to install 10g RAC at home for learning purpose. I have two PC's with same version of linux (Oracle Enterprise Linux 32 bit each) installed, but having different hardware. One machine is laptop and other is desktop. So, will it be poss

  • Acrobat 9 shuts down over fake license issue. Is this Adobe's way off forcing me to buy a new one?

    I've had Acrobat 9 for years. Yesterday it started shutting down saying I do not have a license. The message says I need to uninstall and reinstall the software. I haven't seen that disk for years. Is this Adobe's way of forcing me to buy a new one?

  • Yosemite doesn't boot from internal SSD, Mavericks does

    Hey guys, I've just wasted 2.5 days with this: - I've had Yosemtie running fine on my Early-2011 MacBook Pro (upgraded 8GB RAM) but my HDD started to fail so I've bought an SSD. - First one was Sandisk Ultra II 240GB but I've had massive lag problems