Showing posts with label legacy. Show all posts
Showing posts with label legacy. Show all posts

Sunday, March 25, 2012

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solved

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solvedsql

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solved

Deleting Legacy maintenance plans

Hi,
I am not able to delete the Legacy maintenance plans created:
for example I created a maintenance plan: "MyPlan" with:
master.dbo.xp_sqlmaint
and the plan created at:
Management\Legacy\Database Maintenance Plans\MyPlan

After this I tryed to delete this using SQL Server Management Studio, it is
deleted (right click on the plan and select delete menu item)
But when I refresh the server, the "MyPlan" is back again.

Any idea how to delete Legacy Maintenance plans?

Thanks,
Venkat

What service pack level are you on? This is something that could potentially have been resolved in SP2. Or even SP1 if you are on RTM. At any rate here are a couple

At any rate here are a couple links that might point you in the right direction... http://mssqltips.com/tip.asp?tip=1137 that article explains where these plans are stored (you can also run profiler while you drill into that section - note it gets populated before you click on maintenance plans, so start your trace before you even click the plus before Legacy.. It may stay cached so maybe just start Management Studio from scracth. That trace should confirm above and show a query towards the tables indicated. This will not be supported and should be tested thoroughly first but you should be able to delete from the tables referenced once you understand the information for the plan you are discussing.

Here is another forum article of someone who also had issues and there results..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=454044&SiteID=1

|||

Hi,

i am using the following SQL 2005 software:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I resolved the problem by explicitly depeting the records from the maintenance plan tables.Looks like the deletion from UI has some serious problem, it says deleted, but when i reopne the SQL Server management studio, i can still see my plans.

Any way the problem was solved, hopefully this will get fixed by MS in later service packs.

Thanks,

Venkat

|||

So it sounds like the links to the tables helped you out then.


Just a quick point, you say you hope this will be fixed in a later service pack.. You are not currently on the latest version of SQL Server 2005. You might want to try and upgrade first and see if it is fixed in a "later" service pack.

Tuesday, February 14, 2012

Delete matched query

I'm working with a legacy application that stores its data in a SQL Server 2
K
database. I want to write a delete query to delete items from table A, wher
e
there is no match in table B, where the match is based on matches of the two
PK fields.
I tried the following, but got an error: Incorrect syntax near the keyword
'LEFT'
DELETE FROM A
LEFT JOIN B
ON A.ExerciseID = B.ExerciseID
AND A.UserID = B.UserID
WHERE B.UserID IS NULL
Any help would be greatly appreciated.
DaleHow about this?
DELETE A
FROM A
INNER JOIN B
ON A.ExerciseID = B.ExerciseID
AND A.UserID = B.UserID
WHERE B.UserID IS NULL|||Try
DELETE A
From A LEFT JOIN B
ON A.ExerciseID = B.ExerciseID
AND A.UserID = B.UserID
WHERE B.UserID IS NULL
But beware, when you use this syntax, if you uswe Table Aliases, i.e., if
the Tables are actually name dTableA and TableB, then the First line has t
ouse the Alias, not the actual Table Name,. i.e.,
DELETE A
From TableA A Left Join TableB B
ON A.ExerciseID = B.ExerciseID
AND A.UserID = B.UserID
WHERE B.UserID IS NULL
A Much clearer way to code this is to use SQL that mirrors exactly what you
want
Delete TableA
Where Not Exists
(Select * From TableB
Where PK = TableA.PK)
"Dale Fye" wrote:

> I'm working with a legacy application that stores its data in a SQL Server
2K
> database. I want to write a delete query to delete items from table A, wh
ere
> there is no match in table B, where the match is based on matches of the t
wo
> PK fields.
> I tried the following, but got an error: Incorrect syntax near the keyword
> 'LEFT'
> DELETE FROM A
> LEFT JOIN B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> Any help would be greatly appreciated.
> Dale|||I meant
Delete TableA
Where Not Exists
(Select * From TableB
Where ExerciseID = TableA.ExerciseID
And UserID = TableA.UserID)
"CBretana" wrote:
> Try
> DELETE A
> From A LEFT JOIN B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> But beware, when you use this syntax, if you uswe Table Aliases, i.e., if
> the Tables are actually name dTableA and TableB, then the First line has t
> ouse the Alias, not the actual Table Name,. i.e.,
> DELETE A
> From TableA A Left Join TableB B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> A Much clearer way to code this is to use SQL that mirrors exactly what yo
u
> want
> Delete TableA
> Where Not Exists
> (Select * From TableB
> Where PK = TableA.PK)
> "Dale Fye" wrote:
>|||Try this
Delete From A
Where Not Exists(
Select * From B Where B.Col1=A.Col1 And B.Col2=A.Col2
)
Dmitriy
"Dale Fye" <dale.fye@.nospam.com> wrote in message
news:B16B3312-7EDD-4D85-A2D0-7806F2064BEE@.microsoft.com...
> I'm working with a legacy application that stores its data in a SQL Server
2K
> database. I want to write a delete query to delete items from table A,
where
> there is no match in table B, where the match is based on matches of the
two
> PK fields.
> I tried the following, but got an error: Incorrect syntax near the keyword
> 'LEFT'
> DELETE FROM A
> LEFT JOIN B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> Any help would be greatly appreciated.
> Dale|||Dale Fye wrote:
> I'm working with a legacy application that stores its data in a SQL Server
2K
> database. I want to write a delete query to delete items from table A, wh
ere
> there is no match in table B, where the match is based on matches of the t
wo
> PK fields.
> I tried the following, but got an error: Incorrect syntax near the keyword
> 'LEFT'
> DELETE FROM A
> LEFT JOIN B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
Try this:
DELETE FROM A
WHERE NOT EXISTS (SELECT * FROM B
WHERE B.ExerciseID = A.ExerciseID
AND B.UserID = A.UserID)
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/ AwUBQjX6lIechKqOuFEgEQIHQQCfe67DnoBuMAKw
lKtCX8+H7Wd9ANAAmwS2
sbyoMnwLgSk2DmyMUtxtgESf
=hYSb
--END PGP SIGNATURE--|||Thanks to all who responded. I've been working in Access so long, I forgot
about Exists and Not Exists.
"CBretana" wrote:
> Try
> DELETE A
> From A LEFT JOIN B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> But beware, when you use this syntax, if you uswe Table Aliases, i.e., if
> the Tables are actually name dTableA and TableB, then the First line has t
> ouse the Alias, not the actual Table Name,. i.e.,
> DELETE A
> From TableA A Left Join TableB B
> ON A.ExerciseID = B.ExerciseID
> AND A.UserID = B.UserID
> WHERE B.UserID IS NULL
> A Much clearer way to code this is to use SQL that mirrors exactly what yo
u
> want
> Delete TableA
> Where Not Exists
> (Select * From TableB
> Where PK = TableA.PK)
> "Dale Fye" wrote:
>