Showing posts with label plan. Show all posts
Showing posts with label plan. Show all posts

Friday, March 30, 2012

Running Backup through Maintenance Plan

I am receiving an Event 208 when running our autmated backup in Enterprise
Manager. The job use to run fine however possibly a change in password
caused this to stop working? The error states:
Event Type:Warning
Event Source:SQLSERVERAGENT
Event Category:Job Engine
Event ID:208
Date:11/21/2006
Time:8:45:00 AM
User:N/A
Computer:CROMWELL-DBPROD
Description:
SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'DB
Maintenance Plan1'' (0x8E8A44BEA81D964CAAF7E3F3338674D3) - Status: Failed -
Invoked on: 2006-11-21 08:45:00 - Message: The job failed. The owner () of
job DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1' does not
have server access.
How can I become owner of this job?
Check the properties for the job named
DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1'
and change the owner to your login if you want to be the
owner.
-Sue
On Tue, 21 Nov 2006 06:57:02 -0800, Andrew Harlan
<AndrewHarlan@.discussions.microsoft.com> wrote:

>I am receiving an Event 208 when running our autmated backup in Enterprise
>Manager. The job use to run fine however possibly a change in password
>caused this to stop working? The error states:
>Event Type:Warning
>Event Source:SQLSERVERAGENT
>Event Category:Job Engine
>Event ID:208
>Date:11/21/2006
>Time:8:45:00 AM
>User:N/A
>Computer:CROMWELL-DBPROD
>Description:
>SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'DB
>Maintenance Plan1'' (0x8E8A44BEA81D964CAAF7E3F3338674D3) - Status: Failed -
>Invoked on: 2006-11-21 08:45:00 - Message: The job failed. The owner () of
>job DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1' does not
>have server access.
>
>How can I become owner of this job?

Monday, March 12, 2012

Run Maintanance Plan As Agent Job Step

Hi Everyone,
I have created a maintanance plan to generate a full database backup with no
schedule.
I have then created a new Agent job with multiple steps, most of the steps
execute TSQL and these seem to be working. One of the job steps is to execute
the Full database backup SSIS package generated by the Maintanance plan. This
step executes in less than 1 second without an error and does not generate
the backup.
If I execute the maintanance plan directly via the right click EXECUTE
command it works as expected.
I have checked to ensure that the Agent job owner is a member of the
sysadmin so I don't think access rights are an issue.
Does anyone have any ideas?
I have considered copying the TSQL the maintanance plan generated and
executing this in the step instead of the SSIS package but I would like to
know why my existing configuration will not work.
Please help
ACM
On Jun 11, 12:58 pm, ACM <A...@.discussions.microsoft.com> wrote:
> Hi Everyone,
> I have created a maintanance plan to generate a full database backup with no
> schedule.
> I have then created a new Agent job with multiple steps, most of the steps
> execute TSQL and these seem to be working. One of the job steps is to execute
> the Full database backup SSIS package generated by the Maintanance plan. This
> step executes in less than 1 second without an error and does not generate
> the backup.
> If I execute the maintanance plan directly via the right click EXECUTE
> command it works as expected.
> I have checked to ensure that the Agent job owner is a member of the
> sysadmin so I don't think access rights are an issue.
> Does anyone have any ideas?
> I have considered copying the TSQL the maintanance plan generated and
> executing this in the step instead of the SSIS package but I would like to
> know why my existing configuration will not work.
> Please help
> ACM
Hi
Try running dtexec with verbose reporting see
http://msdn2.microsoft.com/en-us/library/ms162810(SQL.90).aspx
John

Run Maintanance Plan As Agent Job Step

Hi Everyone,
I have created a maintanance plan to generate a full database backup with no
schedule.
I have then created a new Agent job with multiple steps, most of the steps
execute TSQL and these seem to be working. One of the job steps is to execute
the Full database backup SSIS package generated by the Maintanance plan. This
step executes in less than 1 second without an error and does not generate
the backup.
If I execute the maintanance plan directly via the right click EXECUTE
command it works as expected.
I have checked to ensure that the Agent job owner is a member of the
sysadmin so I don't think access rights are an issue.
Does anyone have any ideas?
I have considered copying the TSQL the maintanance plan generated and
executing this in the step instead of the SSIS package but I would like to
know why my existing configuration will not work.
Please help
ACMOn Jun 11, 12:58 pm, ACM <A...@.discussions.microsoft.com> wrote:
> Hi Everyone,
> I have created a maintanance plan to generate a full database backup with no
> schedule.
> I have then created a new Agent job with multiple steps, most of the steps
> execute TSQL and these seem to be working. One of the job steps is to execute
> the Full database backup SSIS package generated by the Maintanance plan. This
> step executes in less than 1 second without an error and does not generate
> the backup.
> If I execute the maintanance plan directly via the right click EXECUTE
> command it works as expected.
> I have checked to ensure that the Agent job owner is a member of the
> sysadmin so I don't think access rights are an issue.
> Does anyone have any ideas?
> I have considered copying the TSQL the maintanance plan generated and
> executing this in the step instead of the SSIS package but I would like to
> know why my existing configuration will not work.
> Please help
> ACM
Hi
Try running dtexec with verbose reporting see
http://msdn2.microsoft.com/en-us/library/ms162810(SQL.90).aspx
John

Wednesday, March 7, 2012

run backup (maintenance plan) from Batch (.bat) file

What is the method to execute backups from batch (.bat) files on the server running SQL Server. I have tried the sqlmaint command - doesn't seem to execute, looked into the xp_sqlmaint with no luck. I'm sure the problem lies in my lack of DOS batch programming skills. If anyone has an example of a batch file that executes a backup would you mind sharing. thanksHave you tried using OSQL from within a batch file?|||just stumbled onto that option this morning. I'm not much of a SQL guru, tring to set up some backups of DB contained in SQL from an COTS package. Do you know how this would all fit together? It appears I would create a file with (possiblely) the SQLMAINT (statement and parms) contained within. Then execute it from within the OSQL statement. Does this sound like I'm on the right track? Do you use the OSQL statement in any .BAT files? I would love to see an example of a (.BAT & sqlmaint) file that I could mimic the context of.|||personally I do not use maintenance plans. I script out all of my maintenance using BACKUP and DBCC t-sql statements. And yu can probably do this with osql in a batch file.

Why may I ask are you taking this approach? Do you need to schedule these to run at a specific time? If so, why not use a sql server agent job?|||I want to have it executed by the server backup software right before the backup system: tivoli, TSM, (not sure of the specific tool) runs. I also want to include some file ZIPs and versioning (file rolls - moves - to specific folders) to mimic the backup/DR process used for other products on the server (a comprehebnsive backup/recovery porocess used for our COTS tools)|||you can use jobs in the sql server agent to do all of that. I would go to SQL Server books Online-->Contents-->Administering SQL Server--> Automating Administrative Tasks-->Implimenting Jobs and do some reading.

you may also want to read xp_cmdshell for the file copies|||thanks I will...I just can't believe that there isn't a fairly easy way to do it extrnally so that I can leverage my existing BAT files and scheduling software (autosys)

Run a Maint Plan from a bat file?

Is it possible to run a Maintenance Plan Job called from a bat file?
I need to have a Perl script finish running its job before the Maintenance
Plan is called so there's no interference because of the locked tables while
doing the reindexing.
I can run the Perl script from a bat file so it would be great if I could
have the 2nd line of the bat file call the Maint Plan.
SQL 2000
Any insight or suggestions appreciated.
Don
Sure. You can call OSQL.EXE and in there execute sp_start_job.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
> Is it possible to run a Maintenance Plan Job called from a bat file?
> I need to have a Perl script finish running its job before the Maintenance
> Plan is called so there's no interference because of the locked tables while
> doing the reindexing.
> I can run the Perl script from a bat file so it would be great if I could
> have the 2nd line of the bat file call the Maint Plan.
> SQL 2000
> Any insight or suggestions appreciated.
> Don
|||ahhhh...beautiful!!
thx!
Don
"Tibor Karaszi" wrote:

> Sure. You can call OSQL.EXE and in there execute sp_start_job.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
> news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
>

Run a Maint Plan from a bat file?

Is it possible to run a Maintenance Plan Job called from a bat file?
I need to have a PERL script finish running its job before the Maintenance
Plan is called so there's no interference because of the locked tables while
doing the reindexing.
I can run the PERL script from a bat file so it would be great if I could
have the 2nd line of the bat file call the Maint Plan.
SQL 2000
Any insight or suggestions appreciated.
DonSure. You can call OSQL.EXE and in there execute sp_start_job.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
> Is it possible to run a Maintenance Plan Job called from a bat file?
> I need to have a PERL script finish running its job before the Maintenance
> Plan is called so there's no interference because of the locked tables whi
le
> doing the reindexing.
> I can run the PERL script from a bat file so it would be great if I could
> have the 2nd line of the bat file call the Maint Plan.
> SQL 2000
> Any insight or suggestions appreciated.
> Don|||ahhhh...beautiful!!
thx!
Don
"Tibor Karaszi" wrote:

> Sure. You can call OSQL.EXE and in there execute sp_start_job.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
> news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
>

Run a Maint Plan from a bat file?

Is it possible to run a Maintenance Plan Job called from a bat file?
I need to have a Perl script finish running its job before the Maintenance
Plan is called so there's no interference because of the locked tables while
doing the reindexing.
I can run the Perl script from a bat file so it would be great if I could
have the 2nd line of the bat file call the Maint Plan.
SQL 2000
Any insight or suggestions appreciated.
DonSure. You can call OSQL.EXE and in there execute sp_start_job.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
> Is it possible to run a Maintenance Plan Job called from a bat file?
> I need to have a Perl script finish running its job before the Maintenance
> Plan is called so there's no interference because of the locked tables while
> doing the reindexing.
> I can run the Perl script from a bat file so it would be great if I could
> have the 2nd line of the bat file call the Maint Plan.
> SQL 2000
> Any insight or suggestions appreciated.
> Don|||ahhhh...beautiful!!
thx!
Don
"Tibor Karaszi" wrote:
> Sure. You can call OSQL.EXE and in there execute sp_start_job.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
> news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
> > Is it possible to run a Maintenance Plan Job called from a bat file?
> >
> > I need to have a Perl script finish running its job before the Maintenance
> > Plan is called so there's no interference because of the locked tables while
> > doing the reindexing.
> >
> > I can run the Perl script from a bat file so it would be great if I could
> > have the 2nd line of the bat file call the Maint Plan.
> >
> > SQL 2000
> >
> > Any insight or suggestions appreciated.
> > Don
>