Sql delete mania!


(system) #1

 Hey Pelletier,


Any relation to Mike Pelletier, the evengelist?


Anyhow, if you think your problem is really caused by junk hanging out in the job tables that is no longer related to a job, you could always find them using a left join.  Something like this:


SELECT * FROM Epicor905..JobProd    // the related table

LEFT JOIN Epicor905..JobHead on JobProd.JobNum = JobHead.JobNum // the join to jobhead

WHERE JobHead.JobNum IS NULL // find only orphan rows





---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

I can’t disagree with Vic, hopefully it’s feasible to do a recent restore. Epicor likely won’t touch you with a 10 ft pole, they watch the forum

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Vic Drecchio
Sent: Friday, October 25, 2013 3:38 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] sql delete mania!

 

 

Nope.  “Someone” in your company should not have access to delete.  And I would probably fire “someone”.

 

Wow, you’re in a very, very bad situation.  There’s only one thing I can think of that may be worse: “DELETE DATABASE MfgSys”

 

This is precisely why Epicor frowns upon direct SQL access to the data.  One person should have full access only.  None of this helps you now, however.

 

My only helpful comment:  Depending on when this occurred (1 hour ago? 2  days ago?) you may have to do a database restore and suck it up and repeat the day’s transactions.

 

Happy Friday.

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of amelie.pelletier@...
Sent: Friday, October 25, 2013 4:19 PM
To: vantage@yahoogroups.com
Subject: [Vantage] sql delete mania!

 

 

Hi everybody.

 

Big problem here!  Someone in my company deleted mrp jobs related to forecast with sql...  So he deleted everything he found on the different job tables about forecast.  

 

Now, Mrp is running on the forecast, do some buying suggestions, but no more job suggestions, because there is always a kind of demand link in the system that remain and we are not able to get rid of it, so the mrp thinks there is already mrp jobs for the forecast!!!

 

Did you ever encounter something like that before?  Do you know a way I could delete those demand that aren't related to anything anymore?  Have a consultant working on it and he can't think of anything.

 

Thanks


(system) #2
Hi everybody.

Big problem here!  Someone in my company deleted mrp jobs related to forecast with sql...  So he deleted everything he found on the different job tables about forecast.  

Now, Mrp is running on the forecast, do some buying suggestions, but no more job suggestions, because there is always a kind of demand link in the system that remain and we are not able to get rid of it, so the mrp thinks there is already mrp jobs for the forecast!!!

Did you ever encounter something like that before?  Do you know a way I could delete those demand that aren't related to anything anymore?  Have a consultant working on it and he can't think of anything.

Thanks

(system) #3

Nope. “Someone” in your company should not have access to delete. And I would probably fire “someone”.

 

Wow, you’re in a very, very bad situation. There’s only one thing I can think of that may be worse: “DELETE DATABASE MfgSys”

 

This is precisely why Epicor frowns upon direct SQL access to the data. One person should have full access only. None of this helps you now, however.

 

My only helpful comment: Depending on when this occurred (1 hour ago? 2 days ago?) you may have to do a database restore and suck it up and repeat the day’s transactions.

 

Happy Friday.

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of amelie.pelletier@...
Sent: Friday, October 25, 2013 4:19 PM
To: vantage@yahoogroups.com
Subject: [Vantage] sql delete mania!

 

 

Hi everybody.

 

Big problem here!  Someone in my company deleted mrp jobs related to forecast with sql...  So he deleted everything he found on the different job tables about forecast.  

 

Now, Mrp is running on the forecast, do some buying suggestions, but no more job suggestions, because there is always a kind of demand link in the system that remain and we are not able to get rid of it, so the mrp thinks there is already mrp jobs for the forecast!!!

 

Did you ever encounter something like that before?  Do you know a way I could delete those demand that aren't related to anything anymore?  Have a consultant working on it and he can't think of anything.

 

Thanks


(system) #4

I can’t disagree with Vic, hopefully it’s feasible to do a recent restore. Epicor likely won’t touch you with a 10 ft pole, they watch the forum

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Vic Drecchio
Sent: Friday, October 25, 2013 3:38 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] sql delete mania!

 

 

Nope.  “Someone” in your company should not have access to delete.  And I would probably fire “someone”.

 

Wow, you’re in a very, very bad situation.  There’s only one thing I can think of that may be worse: “DELETE DATABASE MfgSys”

 

This is precisely why Epicor frowns upon direct SQL access to the data.  One person should have full access only.  None of this helps you now, however.

 

My only helpful comment:  Depending on when this occurred (1 hour ago? 2  days ago?) you may have to do a database restore and suck it up and repeat the day’s transactions.

 

Happy Friday.

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of amelie.pelletier@...
Sent: Friday, October 25, 2013 4:19 PM
To: vantage@yahoogroups.com
Subject: [Vantage] sql delete mania!

 

 

Hi everybody.

 

Big problem here!  Someone in my company deleted mrp jobs related to forecast with sql...  So he deleted everything he found on the different job tables about forecast.  

 

Now, Mrp is running on the forecast, do some buying suggestions, but no more job suggestions, because there is always a kind of demand link in the system that remain and we are not able to get rid of it, so the mrp thinks there is already mrp jobs for the forecast!!!

 

Did you ever encounter something like that before?  Do you know a way I could delete those demand that aren't related to anything anymore?  Have a consultant working on it and he can't think of anything.

 

Thanks


(system) #5
Ouch!.
 
Restore from backup is the best suggestion....If you are not sure when the event occurred, restore to anther location and validate the data first.
 
Simon Hall