Delete Junk Record From Production Table
Application Type
Traditional Web

Somehow, there are two rows of junk record added in production table (during complex import). Now I need to delete just those 2 records from the table (in production)

What is the best way to delete the data from production table?

Do I need to write a timer which calls server action that deletes the unwanted record? ( timer should be deployed to production)

I can think of deleting using MS SQL Server Studio, but it may look dirty ( I need to find the physical table name where the record resides)

What are all other options? And the best option? Please suggest.

(We are already fixing the logic which left the junk record from file import, now the need is to get rid of junk record)

mvp_badge
MVP

The best move is not create junk records.

Deleting in OS will need two publishes: one to place the correction, other to remove it.

The fastest way is to go to SQL and delete those rows (search in table ossys_Entity, the column name will match your entity name.)


Hello Arunkumar,

Writing a timer and then deleting junk record looks a much more organised option and you can write the timer in a very general manner so that in future if any more junk records are inserted you can use the same timer for them also.

But yes if deleting them is on high priority, the going by SQL is the only option.

Another option which i can suggest for managing such scenario is writing a SSIS package if you have a on-prem sever. I have seen this in use by multiple clients(note- This is not a native OS solution).


Thanks,

Krunal

Hi ArunKumar,

It looks like  this is only 1 time activity which you want to do to remove junk records from production data, so there is no point to do it through timer. Since, timer is for generally used for repetitive tasks. So, as suggested by @Nuno Reis it would be better to go to directly to SQL and then delete those 2 junk records from that entity.

Thanks & Kind Regards,

Sachin

Champion

Hi

Like other replies suggested, If it's just a one-time thing, then using sql directly is the best way.

If it's may happen again regularly you can think create a timer to do the job.

Kind regards,

Hello Arun

1. If the data has been uploaded while import and you want to delete the same onetime only then deleting through SQL is the better option. 

2. If on every import you want to check that data and avoid to get uploaded, you can use timer 

3. As Nuno said, the better approach is to check the Junk data should not go into the DB. 

Thanks for the answers. Given the nature of one time activity, I will go for SQL delete.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.