Pass Parameter to Job which calls a SP with the Parameter provided?

ok, I have a problem that is getting the better of me.
I have an SP called sp_Rep_QTR which expects the following parameters @stardate,@Endate.
Now what I want to do is the following,
Create a Job which will EXEC the sp_Rep_QTR at a time(@active_start_time ) provided and pass the @stardate,@Endate parameters to the SP .
The @stardate,@Endate parameters will be passed to a SP which will create the Job - These are passed from a web page.
I'm completely in over my head on this one so any help would be great.
Thanks..

One way of hacking this problem is by dynamically updating the job step which executes the stored procedure to include the parameters the user provided.  You can do so by using
msdb.dbo.sp_update_jobstep.
So for example, you could create a job named "Test job" and in that job the first step would be to execute your stored procedure.  You would then use the following code to update that step at run time:
execute msdb.dbo.sp_update_jobstep
@job_name = N'Test job',
@step_id = 1,
@command = 'execute my_proc @my_variable = ''my_value'''
You'd then use sp_start_job like so:
execute msdb.dbo.sp_start_job @job_name = 'Test job'
Your job would then execute using the value provided at run time for the @my_variable parameter.

Similar Messages

  • SCCM issue - "LANG_LIST has some locales which does not match with the locale of serial number"

    I have a problem with the error "LANG_LIST has some locales which does not match with the locale of serial number" recurring.
    I am trying to install Acrobat XI Std silently by SCCM.
    I've used the Adobe Customisation Wizard to create a mst which include the volume serial number we have with our licence purchases. Note that I am in Australia. I use the command line in SCCM for the install as "msiexec /i "AcroStan.msi" TRANSFORMS="D&B_AcroStd.mst" /qn" which fails silently. If I install on a local machine using an admin command prompt and changing to /qb at the end, I get the aforementioned error.
    I have a few things to try and resolve, having searched the adobe forums and other forums for the solution. The mst is only trying to install US English & I have even gone so far as to use the direct editor in the customisation wizard and change some values in the property table to resolve this. In the property table I can confirm that LANG_SEL_DEFAULT = ENU, REGIONAL_LIST = ENU, LANG_LIST = en_US, ProductLanguage = 1033
    Is there a way to check the language specified for ym serial number?
    Bryndon

    Update on a couple of details:
    @Sabian,
    Thanks for the location, I've downloaded and then when I tried an install of the newly extracted msi (admittedly on the same computer) I got exactly the same issue. Of note though is that running /qf automatically brought up the same serial number and the same incorrectly spelled company name. Installing on another computer (freshly imaged) doesn't have those inputs already present under /qf. Next when I try using the transfrom (a new one) with /qr it gives an error of the serial number, displaying the entire serial.
    @Sebastian
    I've had a look through yours and it seems our issues could have the same origin. Looks like I may have to call customer support regarding the serial number as Sabian suggested in your thread.
    The bit that gets me is when the same serial number is used in a manual install (or /qf) then it installs ok without any errors.

  • TS2776 i've lost all my entries in my calendar. I was able to call them up with the magnifying glass icon . now it just goes to a search entry. and all my calendar/months have no entries. help please

    i've lost all the entries in my calendar.  i had been able to call them up with the magnifying glass list function, but now it only opens a search function and all my calendars/ entries are blank.  help please

    Lord K.  Thank you. Yes I am within the 90 time period, however I travel Intertionally and I can not receive not make a call to Apple. I was just at the Genius Bar in Chicago and they said, don't worry about it.  It just floats out there, however, I can not recover my messages on a flash drive. I need to go back to my old computer which I don't have with me.  My messages were in folders for a lawsuit.  It is going to take an incredible amount of work for me to, you have no Idea.  We are talking thousands of pages!  I the defendent will have them during discovery so I am not so worried.  However, I can not bring them to him on a Flashdrive when I meet with him without an extraordinary amount of presssure on my part.  THis is not just some little email issue. This is suing EXPEDIA and Tripadviosr.com

  • HT1665 I have the iPhone 4S and would like to purchase docking device6. I have the Otter Box Camo case and would like to know which dock will work with the case ON. Thank you.

    I have the iPhone 4S and would like to purchase a docking device.  I have the Otter Box Camo case and would like to know which dock will work with the
    case ON.   Thank you.

    it might be better to contact otterbox to find out from them what they made it compatible with. 

  • I have an Iphone 4 which I just updated with the latest software, which put in it in Recovery Mode. It has the picture of the plug with Itunes, I downloaded it now its saying its in Recovery Mode, how do I save all of my previous data without Restoring?

    I have an IPhone 4 which I just updated with the latest software, which put in it in Recovery Mode. It has the picture of the plug with ITunes, I downloaded it now its saying its in Recovery Mode, how do I save all of my previous data without Restoring?
    I updated the phone before backing it up on iTunes, now the update wanted me to connect the phone with iTunes and it says the phones in recovery mode and it must be restored before its used with iTunes. I go to click restore and it says it will reset it to factory default and I'll lose all my current data. I have all my sons pictures and videos along with this notes. I can't lose all of this data! Please help!

    You have to restore the iPod, no ifs, ands, or buts...
    After iOS is installed you will be asked if you what to set it up as a new iPod or if you want to restore from a backup.
    If you have a good backup you can restore that and you're good to go.
    If you don't have a good backup, then you end up with a "clean" iPod....

  • Which itrip works best with the nano 7th generation?

    Which itrip works best with the nano 7th generation?

    If you have a budget over the 90$, i schould go for bose "in ears", they seems to produce a really good sound quality (even the basses) and they filtering the noise around you.

  • Which range extender works with the Linksys CIT400 phone?

    Which range extender works with the Linksys CIT400 VoIP phone? Can I use any range extender from any other comany or does it have to be one from Linksys? I am not sure if the CIT400 uses standard frequences.
    On a side note, where's the forum for the phones? I see one in the archives section which seems to be ready only.

    You can use the Linksys WRE54G range expander. For that matter, any 2.4Ghz range expander will work. But what’s more important is what router you would be using the range expander with!! Which router are you using?

  • I have an old TC (A1302) which I've replaced with the newest version.  I'd like to erase everything from the old TC and, perhaps, resell it.  How do I accomplish the complete erase?

    I have an old TC (A1302) which I've replaced with the newest version (A1470).  I'd like to erase everything from the old TC and, perhaps, resell it.  How do I accomplish the complete erase?

    On your Mac.....
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the old TC, then click Edit
    Click the Disks tab at the top of the window
    Click Erase Disk
    Select the Zero Out Data option.....which will take 4-6 hours depending on the size of the drive on the old TC......if you plan to sell the TC. If you plan to keep the TC, use the Quick Erase option.....which will only take a few minutes.
    Click Erase
    Click the Base Station Menu at the top of the screen
    Click Restore Default Settings and follow the prompts
    The disk has now been securely erased and the network settings have been reset back to factory defaults.

  • Setup.exe gives a "LANG_LIST has some locales which does not match with the locale of serial number"

    I ran the Adobe Customization Wizard XI to create a transform file and now when run setup.exe it always come with the error "LANG_LIST has some locales which does not match with the locale of serial number".
    It does the same thing when using msi with the command : msiexec /i  AcroPro.msi TRANSFORMS=AcroPro.mst /qb!
    Here is my setup.ini file
    [Startup]
    RequireOS=Windows XP
    RequireMSI=3.1
    RequireIE=7.0.0000.0
    Require64BitVC10RT=1
    CmdLine=/spb /rs /sl"1036"
    [Product]
    msi=AcroPro.msi
    vcrtMsi=vc_red.msi
    vcrtDir=VC10RT_x64
    Languages=1033;1036
    2052=Chinese Simplified
    1028=Chinese Traditional
    1029=Czech
    1030=Danish
    1043=Dutch (Netherlands)
    1033=English (United States)
    1035=Finnish
    1036=French (France)
    1031=German (Germany)
    1038=Hungarian
    1040=Italian (Italy)
    1041=Japanese
    1042=Korean
    1044=Norwegian (Bokmal)
    1045=Polish
    1046=Portuguese (Brazil)
    1049=Russian
    1051=Slovak
    1060=Slovenian
    1034=Spanish (Traditional Sort)
    1053=Swedish
    1055=Turkish
    1058=Ukrainian
    1025=English with Arabic support
    1037=English with Hebrew support
    6156=French (Morocco)
    CmdLine=TRANSFORMS="AcroPro.mst"
    [Windows XP]
    PlatformID=2
    MajorVersion=5
    MinorVersion=1
    ServicePackMajor=3
    [MSI Updater]
    Path=WindowsInstaller-KB893803-v2-x86.exe
    I don't know what goes wrong as took my serial number on my profile from the adobe web site, same thing for the download of the software.
    Does it means that the serial number provided was invalid for deploying ?
    NB.: My goal is to deploy our Acrobat XI through SCCM in silent mode and I don't know if there is extra consideration for that.  For now it's only not working at the command line.
    Another important point is that the install works great without customization !  If I just run the setup.exe from freshly extracted files and I use my serial number, everything is working fine.
    So what goes wrong ?

    Thanks for the reply brogers_1 and Vinod Dbhal, you gave good hint.
    I retried installing the initial package in French on a Windows 7 English and the software installed properly in French. 
    As I used to work with virtuals for those tests, I rolled back my virtual and redo my test installation with chosing to install it in English on my Windows 7 English and again the installation finished properly but I was surprised when I realized that even if I chose English as language, the software was running in French !
    Of course I can change the language settings (in the edit-preferences-language) to follow the operating system witch is nice.
    That gave me the cue I needed to know.  I started from scratch my customization with choosing only the French language in the "Application Languages" and I left the MUI Languages blank and saved the .mst
    I ran again the same command : msiexec /i  AcroPro.msi TRANSFORMS=AcroPro.mst /qb!
    And everything works fine.
    NB.: As I used the .msi directly, of course I had to install the prerequirement Visual C++ 2010 first.  Otherwise the installation failed without any error message.
    Thanks again to you for your good hint,
    Bob

  • I would like to create the a swatch, add it to the library and import to the swatch panel.  The help pages available relate to earlier versions of Muse, which does not work with the 2014.2 release version that I have.  I have created a library folder, imp

    I would like to create the a swatch, add it to the library and import to the swatch panel.  The help pages available relate to earlier versions of Muse, which does not work with the 2014.2 release version that I have.  I have created a library folder, imported the colour swatch as just 4 colours as a mulib file.  I drag the four colours on to the muse page in design view but that is as far as I get.  Can anyone help?  Thanks

    I don't know since I don't share anything. You'll have to peruse the help files and check the permissions and ACLs on the Shared folder. According to the permissions on the Shared folder everyone can R&W. If you want those to be inherited by everything dropped into the folder, add an ACL for
    everyone allow read, write
    Details in the manpage for chmod. The actual steps are left as an exercise.

  • Hierarchies Job Failing  The job process could not communicate with the dat

    Hi Experts,
    We have a group of hierarchies that run as a separate job on the DS schedules. The problem is this when we schedule the job to run during the production loads it fails but when we run immediately after it fails it runs completely fine. So it basically means that if i run it manually it runs but when its scheduled to run with the production job it fails. Now the interesting thing is If i schedule the job to run anytime after or before the production jobs are done. It works fine.
    The error i get is
    The job process could not communicate with the data flow <XXXXXX> process. For details, see previously logged
                                                               error <50406>.
    Now this XXXXX DF has only Horizontal Flatenning and it does not run as separate process because if i have it has separate process it fails with an EOF . So i removed the run as separate process and changes the DF to use in memory .
    Any Suggestion on this problem...

    Thanks Mike.. I was hoping its a memory issue but the thing i don't understand is when the job is scheduled to run with the production job it fails. when i manually run the job during the production job it runs, this kinda baffles me.
    DS 3.2 (Verison 12.2.0.0)
    OS: GNU/LINUX
    DF Cache Setting :- In Memory
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 26
    model name      : Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
    stepping        : 4
    cpu MHz         : 2933.437
    cache size      : 12288 KB
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 11
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc ida nonstop_tsc arat pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm
    bogomips        : 5866.87
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management: [8]
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 26
    model name      : Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
    stepping        : 4
    cpu MHz         : 2933.437
    cache size      : 12288 KB
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 11
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc ida nonstop_tsc arat pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm
    bogomips        : 5866.87
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management: [8]
    Thanks for your help

  • I recently updated my iTunes with the lates version but now it does not detect my iPhone 5 which it was working with the old version!!!

    I recently updated my iTunes with the lates version but now it does not detect my iPhone 5 which it was working with the old version!!!

    Hi, M_ghaderi.  
    Thank you for visiting Apple Support Communities.
    If your device is not recognized by iTunes, I would recommend the steps in the article below.  Start with the section labeled Verify that the Apple Mobile Device USB Driver is installed > For Windows Vista, Windows 7, and Windows 8 > Update the Apple Mobile Device Driver.
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Cheers,
    Jason H.

  • When will I receive my I phone 6 case which i ordered along with the Iphone6 ?As per the website it says october . How long is the wait time for the Iphone 6 case?

    When will I receive my I phone 6 case which i ordered along with the I phone 6 ?As per the website it says October. How long is the wait time for the I phone 6 case?

    While we have no idea within this Community Forum how long you would have to wait for your iPhone 6 Case, I can tell you that there would not be a "general" answer of value.  Like any product that is available in different materials and colors, the inventory varies based on what you have specifically ordered.  For example, I visited an Apple Store on the day after the iPhone 6 became available and was interested in the "Midnight Blue" Leather"  Apple iPhone 6 Case.  The store had plenty of all the other colors, but that specific case and color had sold out that morning. 

  • TS3276 cannot receive mail after i sent a large photo.   A new folder appeared called "recovered messages" with the over 100 recovered emails of the same email of the one i sent out.  i have read apple support and done everything they suggest.  Help!

    I cannot receive mail after i sent a large photo.   A new folder appeared called "recovered messages" with the over 100 recovered emails of the same email of the one i sent out.  i have read apple support and done everything they suggest.  Help!

    How large is 'large'?

  • Separated trace file which I can read with the log viewer

    Hi All,
    I 'd like to write trace infomation.
    I know I can use the default trace.
    But I 'm looking for a way to write my application information in a separated file,
    which I can read with the log viewer.
    Can someone help me with this
    Thnaks
    Steve

    Hi epexpert,
    thaks for your reply.
    I tried it with the Filelog.
    The Problem is that it logs to the file (its not problematically) but also to the defaulttrace
    and thats not my preferred solution.
    Do you have any other ideas?
    Bye Steve

Maybe you are looking for