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 2000 Forums
 SQL Server Administration (2000)
 Location of retention days in system tables?

Author  Topic 

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-09-19 : 05:53:42
When a maint plan is setup it, there is an option to set the number of retention days. Can anyone tell me where those days are stored? It appears to write the number of days directly into the job step, but when recalling the plan up again in EM, it must be retrieving the days from somewhere. Any ideas?

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-09-19 : 06:01:59
You can start profiler while recalling plan in EM and check which system table is hit.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-09-19 : 06:33:04
I tried that Harsh this morning, and though it was querying tables, recreating those queries in QA didn't bring up that data.

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-09-19 : 11:27:55
No, it's stored in the job. See sp_help_maintenance_plan.
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-09-19 : 11:35:08
This proc doesn't appear to return the number of retention days.

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-09-19 : 11:42:15
You are correct, it doesn't. What it does is look up the job, which is where the information is stored.
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-09-19 : 11:48:20
I see.

So do you think that the GUI is retrieving that data from the job step string?

EXECUTE master.dbo.xp_sqlmaint N'-PlanID 9486846E-40F6-4DB8-B1D5-A518CB880846 -Rpt "C:\Program Files\Microsoft SQL Server\MSSQL\LOG\System Databases4.txt" -DelTxtRpt 2WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB -UseDefDir -DelBkUps 2WEEKS -CrBkSubDir -BkExt "BAK"'

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-09-19 : 11:51:12
Yeah I'm fairly certain it is. But I could be wrong.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-09-19 : 12:12:30
For a SQL Server 2000 maintenance plans, almost all the information is stored in the job.

Actually, about the only thing that is stored in the database in the maintenance plan name and the list of databases.




CODO ERGO SUM
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-09-20 : 04:03:08
Right. Must be using string functions to extract the info then.

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page
   

- Advertisement -