SQL Server Scheduler Question

I've got a simple package that I want to build. It appears that I will not be able to meet the scheduling requirements on it though. 
It needs to run on the 16th of every month - UNLESS the 16th is a weekend day, in which case it needs to run on the following Monday.
I can run it on the 1st, 2nd, (etc) Monday ... or the 1st, 2nd, (etc) weekday ... of the month.
It seems like I need some combination of available options - and I don't see them.
I believe I'd define my requirement as "First Weekday after the 15th day of the Month".
I doubt this is available - but if anyone has any ideas, I would love to hear them.
Thank you.
Scott MacDonald
Tucson, AZ

Hello,
Could you please take a look at the comment posted by THaouet on the following post?
http://blogs.msdn.com/b/mwories/archive/2005/10/24/smosample-createjob.aspx
Using programming he assigns a date for the job to start, the frequency, end date, etc.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • SQL Server Procedures Questions

    Hello,
    I needed some simple help in SQL Server, given below are my two questions.
    I am looking at making a SQL Server Procedure which uses cursors to detect some data entry 
    mistakes. 
    1) I have a query joining two or three tables and returning me a list of rows. I would like to compare the Name column in this list using a like operator and report back any names which are similar. How can this be done ? If possible please send me a brief
    skeletal code to do the same.
    2) I am using a query to join names of employees with languages they speak. The query works fine but for employees who speak more than 1 language, the record gets repeated with a new line for every new language they speak, instead of doing this, I would
    like to concatenate their languages in 1 column and report back 1 row per employee. Is this possible ?
    If yes please send me the brief skeletal code to do this on [email protected]
    Thanks
    Irfan

    >> If yes please send me the brief skeletal code to do this on [email protected]
    Good day Irfan
    This is not a paid supporting center, where you get private support, by commercial company, but a public forum where communities members helps each other. Public posts, answers, and discussions have a huge advantage! Other people might learn from the thread
    as well.
    >> I have a query joining two or three...
    Please check Tom
    Cooper's answer, and if this is not what you are looking for, then please post more information and less stories (I mean codes). Please show us the query instead of describe it. the code describe it better :-) Moreover, pls post DDL+DML
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Running multiple SSIS packages using SQL Server Agent question.

    I have a multitude of SSIS packages I want to run using SQL Server Agent.  What would the best practice be for running these jobs using SQL Server Agent?  One job per package or running all pakages from one job?  If you have an answer can
    you explain the technical reasoning behind your answer?  Thanks in advance.
    Stan Benner

    Hi, maybe a bit more analysis will give a better answer
    Do all the packages have to run in sequence? (if yes, single job better)
    Can the list of packages to be executed be grouped by dependency (ex package 1,2 and 5 must run in sequence and can be executed by one job, while package 3,4 are not dependent on package 1,2 and 5 can be run by a separate job).
    Can any jobs be run in parallel?
    How often will the package execution sequence change?
    How will you deploy your packages and job? (the more jobs to create the more install script needed and upgrade scenarios become messy).
    My personal preference:
    I create ONE ssis package which is executed by ONE sql agent job. lets call this 'PackageExecutionWrapper.dtsx'
    PackageExectionWrapper then contains multiple 'Execute Package' tasks for the packages you want to execute.
    In the package you can apply any package execution rules - which packages have to run after the other, which packages can run concurrently, which packages should only run if previous succeeded.
    If you need to change the sequence, simple, just update the PackageExecutionWrapper package.

  • SQL Server - Feq Questions to clarify

    Hello All,
    1. If i have my Latest full backup on Sunday , and there by i have my differntial Backups daily ( mon, tue till sat) , and if i want to restore on friday, Tell me the procedure
    Ans : I am not sure i am right - but sharing my view and correct me if i am wrong - I will take the latest full backup on sunday , and there by i will pick all the Differntial Backups ( Mon, TUe, Wed, thur) & Start restoring all one by one
    i.e  - sunday Fullbackup + Monday Diff Backup + Tuesday Diff Backup + Wednesday Diff Backup + thurs Diff Backup .
    If i am wrong, please guide me the right formate of restoring
    Q2 : If my DB is configured to Replication And my secondary Server DB 's Ldf file has grown and i have to shrink , Whats the method i should adopt, Is it normal shrinking process which we adopt for stand alone DB or is there different process to shrink if
    the DB if its configured for replication.
    Q3 : What is the best way to identify the if the sql instance is  suffering from Memory issue or an CPU ? please suggest me the best way , apart from using tools like solar winds etc.
    hemadri

    1. nope
    Differential means it will contain all changes from last full backup
    so all that you would require to apply would be the last full backup on Sunday + latest differential backup on Thur
    2. see if this helps
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/dae1484d-1a7e-4008-b55a-1e9f41de3c2b/shrink-database-for-replicated-db?forum=sqlreplication
    You cant shrink T- Log directly though if its a replicated db
    3. One method is to use query involving DMVs
    Another way is using performance counters
    http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Error while executing bts_ConfigureBizTalkLogShipping with SQL Server 2012 and BTS 2013

    Hi,
    while configuring the DR site for Log shipping (http://msdn.microsoft.com/en-us/library/aa560961(v=bts.10).aspx)
    exec bts_ConfigureBizTalkLogShipping @nvcDescription = '<MyLogShippingSolution>',
    @nvcMgmtDatabaseName = '<BizTalkServerManagementDatabaseName>',
    @nvcMgmtServerName = '<BizTalkServerManagementDatabaseServer>',
    @SourceServerName = null, -- null indicates that this destination server restores all databases
    @fLinkServers = 1 -- 1 automatically links the server to the management database
    Getting errors while trying to execute the stored procedure "bts_ConfigureBizTalkLogShipping".
    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Login timeout expired".
    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible.
    Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    Msg -1, Level 16, State 1, Line 0
    SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
    This is very strange because with the same server name (which I am passing in above query) I am able to connect from SQL Server Studio from DR site.
    Any help would be much appreciated.
    Thanks!
    Regards,
    Gautam
    Thanks! Regards, Gautam

    You need to check the DTC Connectivity between your DC and DR SQL Instance. The Linked Server requires DTC connectivity. Secondly this activity is better done from the SQL Server in question (the DC server in your case).
    You can also manually add the Linked Server. Refer
    http://msdn.microsoft.com/en-IN/library/ms188279(v=sql.105).aspx - Linking Servers and
    http://msdn.microsoft.com/en-IN/library/ff772782(v=sql.105).aspx - Creating Linked Servers.
    After having created the Linked Server(s) you can run the log shipping configuration again BUT using @fLinkServers = 0.
    Regards.

  • Can't Create a Data Source - Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    Hi there,
    I am having a serious issue with The Power BI Data Management Gateway which I am hoping that someone can help me with.
    Basically I am setting a connection between a Power BI demo site and a SQL 2012 Database based on Azure. The Data Management Gateway and is up and running, and Power BI has managed to connect to it successfuly.
    By following the tutorials at
    here I was able to successful create my Data Connection Gateway with a self-signed certificate.
    However, when trying to create the data source I come into problems. The Data Source Manager manages to successfully resolve the hostname, as per the screenshot below:
    Bear in mind that I exposed the require ports in Azure as endpoints and I managed to modify my hosts file on my local machine so I could access the SQL server hosted in Azure using its internal name -- otherwise I would not be able to get this far.
    However the creation of the data source also fails when trying to created it whilst logged in the SQL server in question:
    The Data Source Manager returns the error when using the Microsoft OLE DB Provider for SQL Server:
    Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
    I tried using the SQL Server Native Client 11.0 instead but I also get an error. This time the error is:
    Failed to test connection. Login timeout expiredA network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.Named Pipes Provider: Could not open a connection to SQL Server [53]. 
    Some considerations
    If I provide an invalid username/password, the Data Source Manager does say that the username and password is incorrect.
    Firewall is turned off in the SQL Server (either way, this error also happens if I try top use the Data Source Manager whilst logged in the SQL Server itself).
    SQL Profiler does not show any attempt of connection.
    The SQL server instance in question is the default one.
    The error happens regardless if I select the option to encrypt connection or not.
    In SQL Configuration manager I can see that all protocols are enabled (TCP/IP, Named Pipes and Shared Memory.
    The Event Viewer does not provide any further errors than the one I have copied in this post.
    I'm at a loss here. Could someone please advise what might I be doing wrong?
    Regards,
    P.

    Here is what I had to do to solve this issue:
    Basically I had to add the MSSQL TCP/IP port as an end-point in Azure. After I did that, then I was able to create the data-source. However, I was only able to authenticate with a SQL account, as any domain account would return me an error saying that the
    domain isn't trusted.
    What puzzles me here is how come the Data Source Manager would inform me that an account username/password was invalid, but it would fail/timeout if I provided valid credentials (!?!?!!?)

  • MS SQL Server 2005 Developer Edition

    Hi,
    We are developing a legal management product on SAP platform
    We would have  SQL Server to be used as a database for SAP ECC 6.0 in DEVELOPEMENT environment
    The landscape of the planned development  environment  has a total of 8 servers. We understand that a separate MS SQL Server 2005 ( Question :- Enterprise / standard / Developer ??? ) edition is required for all the servers Each server will run its own instance. Each server will have 2 Intel Xeon CPUs with quad cores.
    We understand that there will not be any users accessing the database directly. Instead, the SAP ECC software will create its own schema and users ( at most 4).
    1) Please let us know which edition is best suitable for us for above scenario .
    2) Does SAP ECC work on SQL Server 2005 Developer edition ?
    3) Can we have  one instance of SQL Server be used and multiple databases for dev, qa and prod be created from it
    Your prompt response will much be appreciated
    Thanks a ton !

    1) Please let us know which edition is best suitable for us for above scenario .
    SAP ONLY supports Enterprise edition.
    2) Does SAP ECC work on SQL Server 2005 Developer edition?
    No SAP willnot work on SQL Server 2005 edition.
    3) Can we have one instance of SQL Server be used and multiple databases for dev, qa and prod be created from it.
    Yes, technically it is possoble. But not at all recommended by SAP.
    Regards,
    SK

  • Insert data from oracle  to sql server

    we have running R12.1.1 .
    our company wants to deploy some CRM Application with sql server database. Continuously we have to insert data ( some fields from some tables of Order Management module ) from ORACLE -----------> SQL Server
    My Questions are :
    1. What are possible methods to insert data from ORACLE -----------------> SQL Server ?
    2. What are pros and cons of each method ?
    3. What is performance over load of each method ?
    PLease share your valuable knowledge / ideas / suggestions
    thanks

    What is a maximal latency for data changed in Oracle come into MS SQL?
    this data will be updated in CRM after 24 hours.Does it mean that data replicated from Oracle will be updated in MS SQL and should be replicated back?
    i want to know more details about these APIs etc and middle layer.what API? In MS SQL you can use Linked server and write SQLs that select from Oracle tables via that linked server and insert/update/delete into MS SQL. You can organize these SQLs into T-SQL procedures and run them in jobs.
    Also you can use MS SQL replication, snapshot or transactional, which is ugly because it places triggers on Oracle tables. I doubt that this will be approved by app vendor.
    Also you can use Oracle Streams via Transparent Gateway for MS SQL, which will be quite heavy solution.
    Also, if real-time replication is needed, you can use "middle layer" Oracle Golden Gate, which may be quite pricy for 30 tables.
    Also, if real-time replication is needed, you can use 3-rd party middle layer like DataCurrents or others.

  • SSIS Package Fails when Scheduled as a SQL Server Agent Job

    I have an SSIS package that runs without any problems when executed through BIDS.
    However, when I schedule the SSIS as an Agent job, it fails completely or part way through. When it partially runs, the part that it is failing on is a Script Task that moves the source data file to an archive folder (on the same server).
    I have tried using my domain account as the owner of the job, then the job fails straight off and I get an error:
    Unable to determine if the owner (Domain\MyID) of job JobName has server access (reason: Could not obtain information about Windows NT group/user 'Domain\MyID'
    If I change the owner to the 'sa' account , then the job partially runs, but then fails because 'sa' is a SQL account and does not have access to the filesystem.
    I have managed to get it to work by using the SQL2008_Local account and granting modify permissions to the affected folders.
    My question is - what is the advised way of doing this?
    Thanks
    Gary

    Hi Garyv.King,
    When you see a SSIS package fails running in a SQL Agent job, you need to first consider the following conditions:
    1. The user account that is used to run the package under SQL Server Agent differs from the original package author.
    2. The user account does not have the required permissions to make connections or to access resources outside the SSIS package.
    For more detailed information about the issue, please following this KB article:
    An SSIS package does not run when you call the SSIS package from a SQL Server Agent job step
    http://support.microsoft.com/kb/918760 
    You can check SQL Server Agent’s activity logs, Windows Event logs and SSIS logs to get more clues. Also the tool Process Monitor is helpful to track the cause of registry or file access related issues.
    The following 4 issues are common encountered in the SSIS forum.
    1. The package's Protection Level is set to EncryptSensitiveWithUserKey but your SQL Server Agent service account is different from the SSIS package creator.
    2. Data source connection issue.
    3. File or registry access permission issue.
    4. No 64-bit driver issue.
    For more information about it, please see:
    How do I troubleshoot SSIS packages failed execution in a SQL Agent job:
    http://social.technet.microsoft.com/Forums/en-US/sqlintegrationservices/thread/e13c137c-1535-4475-8c2f-c7e6e7d125fc 
    Thanks,
    Eileen

  • Scheduling SSIS packages through SQL Server Agent

    Hello All!  I have an SSIS question for BPC 7.5 installations across multiple servers.  I have been rebuilding all my DTS packages over to SSIS and trying to learn this more dynamic environment.  Currently I have saved a copy of all my rebuilt packages from BIDS (on web server)  to the MSDB located on the SQL server.  I can manually run packages from Integration Services and load data successfully.  When I try to schedule packages based on the packages stored in MSDB, I get failures.  The errors initially suggested I was passing over a NULL password, so I adjusted the protection level of the package to ServerStorage, as opposed to the default setting.
    Now I have the following error when I schedule and run it:
    Message
    Executed as user: AMERICREDIT\svcbpc_ssis_dev. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  11:48:00 AM  Error: 2011-02-28 11:48:02.05     Code: 0xC0010018     Source: Convert Task 2008      Description: Failed to load task "Convert Task 2008", type "OSoft.Services.Application.DataMgr.Task.SSISConvert, OSoftTaskConvert2008, Version=7.0.112.0, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". The contact information for this task is "".  End Error  Error: 2011-02-28 11:48:02.06     Code: 0xC0010018     Source: DumpLoad Task 2008      Description: Failed to load task "DumpLoad Task 2008", type "OSoft.Services.Application.DataMgr.Task.SSISTaskDumpLoad, OSoftTaskDumpLoad2008, Version=7.0.112.0, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". The contact information for this task is "".  End Error  Error: 2011-02-28 11:48:02.13     Code: 0xC0010026     Source: Convert Task 2008      Description: The task has failed to load. The contact information for this task is "".  End Error  Error: 2011-02-28 11:48:02.13     Code: 0xC0024107     Source: Convert Task 2008      Description: There were errors during task validation.  End Error  Error: 2011-02-28 11:48:02.13     Code: 0xC0010025     Source: Z6_VW_STAT_APLN_CURR      Description: The package cannot execute because it contains tasks that failed to load.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  11:48:00 AM  Finished: 11:48:02 AM  Elapsed:  1.406 seconds.  The package execution failed.  The step failed.
    It appears I cannot execute any of the BPC custom tasks in the SSIS packages.  Any recommendations?

    Thanks, James, your point is well taken.  Originally we were importing packages into the file system, but had the same results when scheduling.
    Below is the message received when I schedule a package located in the stored package file system from my web server:
    Executed as user: AMERICREDIT\svcbpc_ssis_dev. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:36:00 AM  Error: 2011-03-01 10:36:02.56     Code: 0xC0010018     Source: Convert Task 2008      Description: Failed to load task "Convert Task 2008", type "OSoft.Services.Application.DataMgr.Task.SSISConvert, OSoftTaskConvert2008, Version=7.0.112.0, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". The contact information for this task is "".  End Error  Error: 2011-03-01 10:36:02.58     Code: 0xC0010018     Source: DumpLoad Task 2008      Description: Failed to load task "DumpLoad Task 2008", type "OSoft.Services.Application.DataMgr.Task.SSISTaskDumpLoad, OSoftTaskDumpLoad2008, Version=7.0.112.0, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". The contact information for this task is "".  End Error  Error: 2011-03-01 10:36:02.62     Code: 0xC0010026     Source: Convert Task 2008      Description: The task has failed to load. The contact information for this task is "".  End Error  Error: 2011-03-01 10:36:02.62     Code: 0xC0024107     Source: Convert Task 2008      Description: There were errors during task validation.  End Error  Error: 2011-03-01 10:36:02.62     Code: 0xC0010025     Source: Z6_VW_STAT_APLN_CURR      Description: The package cannot execute because it contains tasks that failed to load.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  10:36:00 AM  Finished: 10:36:02 AM  Elapsed:  1.954 seconds.  The package execution failed.  The step failed.
    Could this be a security thing?  If so, what would my security need to be set up from the package level?

  • Migrating from SQL Server 7.0 To Oracle 8i (SQLServer Jobs/ Schedules)

    Hi there,
    How do you schedule jobs in Oracle in a similar way as SQL Server 7.0? So far I have only been able to find a DBMS_JOB.Start and Enable and Disable.
    Apart from this I have a question on maintainence procedures.
    I run the following steps in SQL Server for performance benefits.
    1) Rebuild INdexes
    2) Database Shrink
    3) Recompile Stored Procedures
    4) Recompute Statistics
    5) Make an entry in a table to indicate that these 4 tasks have been completed.
    Do these things matter in Oracle or does the database take care of it on its own? How do you get a similar maintenance schedule up and running in Oracle 8i?
    Please reply.
    Thanks and Regards,
    Ajay

    Hi,
    Version 1.2.5.0.0 will be available for free download from this site within the next two weeks.
    I will migrate both schema and data for a SQL Server 7.0 database.
    Please mail [email protected] with your request.
    Regards
    John

  • Schedule a SSRS report as step in SQL SERVER agent

    Hi All,
    The requirement is that can we schedule a job as a step in SQL Server Agent.
    Scenario: I got a SQL Agent job which got multiple steps. Executing SP's, running SSIS etc. The last setp i want to setup is run a SSRS report where it gives the report of all the steps. It is like a summary report.
    Is that is possible. If so hw can i achieve it.
    Thanks in advance.

    You can use rs utility to render reports using below script file
    http://skamie.wordpress.com/2010/08/11/using-rs-exe-to-render-ssrs-reports/
    and call rs utility from bat file or using xp_cmdshell.
    Then include this script as last step in your job.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    Visakh, I added you to this list:
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/64ad4f52-2fd8-4266-b4a4-5657c8870246/needed-more-answerers?forum=sqlgetstarted
    Thanks!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • SQL Server 2014 supported for scheduled refresh?

    The following link, which lists the supported data sources for scheduled refresh in Power BI, lists all versions of SQL Server from 2005 to 2012:
    https://support.office.com/en-gb/article/Supported-Data-Sources-and-Data-Types-cb69a30a-2225-451f-a9d0-59d24419782e?ui=en-US&rs=en-GB&ad=GB
    However 2014 is not listed. Is this an oversight or is SQL Server 2014 really not supported?
    Thanks,
    Chris
    Check out my MS BI blog I also do
    SSAS, PowerPivot, MDX and DAX consultancy and run
    public SQL Server and BI training courses in the UK

    Chris, have you heard about this?
    I'm checking with our tech writing team. 
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Report Schedule - SQL Server Agent

    Hi,
    We have few SSRS reports which has to run daily after the data is loaded in the database.
    I scheduled the reports on timely based and got the Job Id's using SQL server agent and using SP_START_JOBs stored procedure to run.
    But the problem is it is creating multiple files one for time and one for SP_START_JOBS procedure.
    Any idea how to avoid this?
    I really appreciate any help.
    Thanks,
    Sarah

    If you're going to schedule your SSRS jobs using the agent, don't schedule them in SSRS using subscriptions as well...
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • How to schedule a Stored procedure to run every hour in SQL server express

    Hi,
    I am using SQL server express and I want to schedule a Stored procedure to run every hour.
    The Stored Procedure name is UpdateData.
    Can someone please give an example of how i can schedule this to run every hour, given that I do not have SQL Server agent on my express edition.

    Hello,
    You will find more options on the following thread.
    http://stackoverflow.com/questions/1675206/how-to-run-a-stored-procedure-every-day-in-sql-server-express-edition
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for

  • How to stop GPS auto update on C6

    hi everybody, I have nokia C6. My problem is that its downloading all the time some GPS updates which cost me a lot MB to pay. every day is downloading 12 till 20 hours non stop. My battery is dieing every day becouse of this. Please help, how to sto

  • Can I hook up my Dell Latitude for using iMac as display?

    the Dell has VGA & HDMI so I wonder if it will work using a Moshi Mini DisplayPort to HDMI-adapter or similar?

  • Automatic scheduling of Cproject

    Hi All, We have changed the plan finish date of an item from 31.12.2011 to 31.12.2012. Corresponding Cproject project definition is in Released status. As a part of synchronization the dates on the Cproject project definition changes to 31.12.2012. B

  • How do i unmerge outlook

    how do i unmerge outlook? i restored after it was merged and the next closest backup was 2 months ago.  Can I unmerge those 2800 contacts in outlook?

  • Not getting any buddies with AIM on 2.0

    I have upgraded to 2.0 and my AIM is connecting but not showing any buddies online or offline (0). People on the other end say that they see that I am online and available. They tried sending me a message and nothing happens. I send a message by ente