473,769 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modifying SQL Server 2000 Maintenance Plans through Scripting

pk
I have a problem that I would like to resolve through scripting, but
I'm not sure how to go about it (or if it's even possible.)

We're trying to work around a bug (
http://support.microsoft.com/default...&Product=sql2k
) that requires us to split up our maintenance plan into two parts.
In the first, we backup "All User Databases". This runs fine. The
second maintenance plan backs up the transaction logs and then is
SUPPOSED to delete the ones older than 4 days. If you read that
knowledge base article I referenced above, you'll see that this
doesn't happen. Our company creates a lot of databases every day and
it's not feasible for me to check every one by hand every night before
I head home to make sure that they get backed up correctly.

I would like to have a script that checks for all user databases that
are set to FULL Recovery Model

SELECT name, DATABASEPROPERT YEX(name, 'Recovery') as RecoveryModel
FROM master.dbo.sysd atabases
WHERE DATABASEPROPERT YEX(name, 'Recovery') = 'FULL'
ORDER BY 2

and re-enters them all into the second maintenance plan (obviously not
as duplicates) right before it runs. I don't think my scripting
knowledge is up to par, so I'm really looking for someone to help me
out. You can bet I'll study the solution after I get it though.

Thanks in advance.

-pk

Apr 24 '07 #1
0 1461

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5593
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and stuffing quite a lot of data (from and MS SQL database) into them. On Windows 2000 server, everything is fine. If the data structures get really big it slows down, but for normal operation it's no problem. Recently our hosting provider moved to...
2
1995
by: jwbeaty | last post by:
Here's a weird one. I'm running SQL Server 7 and when I run a backup something weird happens. When I perform the backup via Enterprise Manager by right clicking on the database I want to backup, I click on OK but no progress blocks show up in the window showing you the status of the backup. The completion window pops up saying that the DB has been backed up. OK--Fine, maybe the backup is really quick. Then, through Explorer, I look...
3
2549
by: Greg Adourian | last post by:
Hi, Still in the design process of a Windows 2003 web server with a SQL backend. Expecting to have about 2000 visitors a day accessing lists and search queries on a 200-300 MB db. This server will be collocated in a datacenter. I have a few scenarios that I would appreciate in getting some comments/criticism on: Scenario 1: Box 1, SBS 2003 Premium (with SQL 2000), 2GB RAM, Raid 5 HD
2
1371
by: Ali Syed | last post by:
I am having problems trying to get SQL server Agent to run an unattended backup of my databases. I setup (or think I did) a schedule in maintenance but it doesn't work. Is there a website or link where I can get step by step instructions for setup of a backup using sql server agent or anything regarding unattended backups in sql server 7?
6
2075
by: Christine Wolak | last post by:
I'm looking for assistance on a problem with SQL Server. We have a database where a particular query returns about 3000 rows. This query takes about 2 minutes on most machines, which is fine in this situation. But on another machine (just one machine), it can run for over 30 minutes and not return. I ran it in Query Analyzer and it was returning about 70 rows every 45-90 seconds, which is completely unacceptable. (I'm a developer, not...
5
2138
by: dananrg | last post by:
I've created a small company database where the tables reside in a SQL Server database. I'm using Access 2000 forms for a front end. I've got a System DSN set-up to SQL Server and am using links within Access 2000 to get to the SQL Server tables. My forms worked fine until I made a few minor changes to the database schema on SQL Server (e.g. added a foreign key, or added a column). After that, all the links break - I click on a table...
0
1379
by: Larry Maturo | last post by:
I noticed that in SQL Server Management Studio, under Management, there is a Legacy folder with maintenace plans created by adding entries to the system tables dbo.sysmaintplan_* tables (i.e. all the maintenace plans created in sql server 2000). Where are the new maintenance plans kept? Is there any API interface to it? -- Larry Maturo
3
2231
by: datapro01 | last post by:
I am a DB2 DBA that has been asked to become familiar enough with SQL Server in order to become actively involved in its installation, implementation, and to review database backup/recovery procedures. SQL Server will be used by a vendor packaged application. The problem is that we are awaiting word on whether it will be SQL Server 2000 or 2005 we will be working with. I have been told that there are considerable differences between the...
23
14042
by: Nishant Saini | last post by:
Dear All, We have a database which contains many tables which have millions of records. When We attach the database with MS SQL Server 2005 Standard Edition Server and run some queries (having joins, filters etc.) then they take very long time to execute while when We execute same queries on Enterprise Edition then they run 10 times faster than on standard edition. Our database does not use any features which are present in Enterprise
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10212
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.