SQL Maintenance job - Manual run/Scheduled run

  • Hi All,

    We have a weekly full backup job, daily differential backup job and hourly transaction log backup on our servers. These jobs are run through bespoke scripts written (not through regular SQL maintenance plans).

    During the week, we often get requests from developere for latest full backup of the databases. Whenever we get such requests, we manually take the full backup of database 'WITH COPY_ONLY' option so that the differential backup chain is not broken.

    However, is there any way to amend our scripts in such a way that - whenever the job runs through 'schedule' it should run normally; but if not through schedule ( if initiated manually) then it should take copyonly backup. Is there anyway to check who is running the job ( SQLagent schedule or anyother) dynamically and go to the appropriate step.

    We are just trying to avoid to create an additional job for copyonly backups to run whenever a developer's request comes....

    Thank you

    [font="Verdana"]Renuka__[/font]

  • Hi

    iam not good at coding but i can suggest a logic

    1.create a script through a maintenance plan if it not runs normally

    2.goes full backup copy-only

    also search for the scripts options in this site may be any needful there

    and i am not so good iam a starter if my suggestion is not correct

    reply with the correct answer to me any how you will find soon

    i too want the solution now for this issue

    Thanks
    Naga.Rohitkumar

  • Hi,

    Thanks for your reply. We created a seperate SQL job that takes COPYONLY backups. We run this job (or particular step for specified database) whenever there is a request from developer.

    Thank you

    Renuka__

    [font="Verdana"]Renuka__[/font]

  • Hi, Renuka

    can u say how u created the job which takes only copy-only backups even i want to know the process.

    Thanks
    Naga.Rohitkumar

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply