Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Maintenance plan problem

Author  Topic 

dsasys
Starting Member

8 Posts

Posted - 2009-11-23 : 18:02:15
Hi guys. I am trying to setup a maintenance plan to backup a database but when I try and test it by executing the plan it fails. I get the following at the bottom when I check the job history

"Executed as user: <Removed this bit>. Microsoft (R) SQL Server Execute Package Utility Version 10.0.1600.22 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. The SQL Server Execute Package Utility requires Integration Services to be installed by one of these editions of SQL Server 2008: Standard, Enterprise, Developer, or Evaluation. To install Integration Services, run SQL Server Setup and select Integration Services. The package execution failed. The step failed.
"

I tried to install the integration services, but we only have SQL server 2008 workgroup which doesn't have the option to install the service. I also downloaded SQL server 2008 from Microsoft

http://www.microsoft.com/SQLserver/2008/en/us/trial-software.aspx

but it doesn't have the option either under features to install the service? Any ideas? Its a pain having to manually do a backup of the database each day.

Cheers,

Jason.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-23 : 18:17:02
Don't use maintenance plans on Workgroup edition, instead you can use custom scripts. Here's what I use and wrote: http://weblogs.sqlteam.com/tarad/archive/2009/09/08/Backup-SQL-Server-2005-and-2008-Databases.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-23 : 20:16:20
quote:
Originally posted by tkizer

Don't use maintenance plans on Workgroup edition, instead you can use custom scripts. Here's what I use and wrote: http://weblogs.sqlteam.com/tarad/archive/2009/09/08/Backup-SQL-Server-2005-and-2008-Databases.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."



Thanks Tara will take a look
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-23 : 21:51:17
You're welcome. Let me know if you need any help with it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-23 : 22:14:50
Hi Tara,

I ran the following line and got the errors below. It didn't create a file. Any ideas?

osql -U sa -S (local) -d ISRP71 -i c:\isp_Backup.sql

610> 611> 612> 613> 614> 615> The module 'isp_Backup' depends on the missing ob
ject
'master.dbo.xp_backup_database'. The module will still be created; however, it
cannot run successfully until the object exists.
The module 'isp_Backup' depends on the missing object 'master.dbo.sqlbackup'.
The module will still be created; however, it cannot run successfully until the
object exists.
The module 'isp_Backup' depends on the missing object 'master.dbo.sqlbackup'.
The module will still be created; however, it cannot run successfully until the
object exists.
The module 'isp_Backup' depends on the missing object 'master.dbo.sqlbackup'.
The module will still be created; however, it cannot run successfully until the
object exists.
1>
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-23 : 23:34:05
Those actually aren't errors. They are warnings and should be ignored. It just means your system doesn't have Quest's SQL Litespeed or Red Gate's SQL Backup products installed. isp_Backup will still work without those. They are third party backup tools that improve SQL backups. When you don't have them installed, you just pass 'NV' for @bkpSwType input parameter.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-23 : 23:42:05
quote:
Originally posted by tkizer

Those actually aren't errors. They are warnings and should be ignored. It just means your system doesn't have Quest's SQL Litespeed or Red Gate's SQL Backup products installed. isp_Backup will still work without those. They are third party backup tools that improve SQL backups. When you don't have them installed, you just pass 'NV' for @bkpSwType input parameter.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."



Ok but it didn't create a backup file to the directory I specified in the line below

@path = 'C:\ISRP-backup\',

IS there something I missed? Is my osql line correct?

Thanks for your help.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-23 : 23:44:24
Could you show me the contents of isp_Backup.sql?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-23 : 23:45:00
Oh wait, did you put my code in there? If so, then that code is just to create the custom object. You now need to call it. Check the comment header block for an example.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-24 : 22:28:19
ok so I can't run it via command line with osql? I have never setup a job in sql. Seems a little complicated without using a wizard. Do you have any more detailed instrutions on how to use your script under SQL Server Agent - Jobs?

Cheers,

Jason.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-24 : 22:41:52
Yes you can run it via osql, but you need to run just the EXEC isp_Backup call. You only run isp_Backup.sql once to get the object created, you then have to call the object via EXEC.

Here's what my job step looks like in production: http://weblogs.sqlteam.com/tarad/archive/2008/06/30/SQL-Server-jobs-on-production-instances.aspx

It's referring to an old version though. I changed @liteSpeed parameter to be @bkpSwType, so you'll want @bkpSwType = 'NV' instead.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-25 : 18:03:14
Thanks. I added the following under the command section in the step for the backup job I created. Getting an error about it not finding isp_Backup.sql file. How do I tell the backup job where to call this script from? Or have I setup the job wrong? Cheers.

EXEC isp_Backup.sql
@path = 'C:\ISRP-backup\',
@dbType = '-ISRP71',
@bkpType = 'Full',
@retention = 5,
@bkpSwType = 'NV',
@archiveBit = 0,
@copyOnly = 0
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-25 : 19:10:37
isp_Backup gets put into a database. I use a database named DBA. Once the object has been created, you no longer need the sql file. Now you just execute it. Here's an example:

EXEC DBA..isp_Backup
@path = 'C:\ISRP-backup\',
@dbType = '-ISRP71',
@bkpType = 'Full',
@retention = 5,
@bkpSwType = 'NV',
@archiveBit = 0,
@copyOnly = 0

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dsasys
Starting Member

8 Posts

Posted - 2009-11-25 : 23:16:38
Ok will give that a go. Thanks
Go to Top of Page
   

- Advertisement -