goodk
asked on
I am using a shared MS SQL server on Godaddy. I noticed this morning that my each record was duplicated 5 times
Is it possible at all that godaddy server did this? I cannot think of any queries I have run to make this possible.
Please please help!!
Please please help!!
ASKER
Msg 7983, Level 14, State 36, Line 2
User 'kenkenken' does not have permission to run DBCC checkdb for database 'kenkenken'.
User 'kenkenken' does not have permission to run DBCC checkdb for database 'kenkenken'.
ASKER
Use [kenkenken] DBCC CheckDB
Then contact the support.. it maybe database or index corruption.
ASKER
id description date timestamp
13707 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
14646 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15546 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15809 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
13707 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
14646 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15546 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15809 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
I suspect you had a JOIN on the INSERT that caused additional rows to be generated. But on the extremely limited info so far, there's no way to really know what happened.
id description date timestampHow did you inserted these rows?
13707 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
14646 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15546 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
15809 Borrowed from BO Starcity 2014-08-27 00:00:00.000 2014-11-24 12:07:58.237
Those are all columns in the table?
ASKER
Yes they are columns in the table. There is a possibility in my code that it is adding extra records. Not sure what is going on? I am planning to review the code.
ASKER
How can I delete all other identical records except with the lowest ID
Can you suggest a SQL query?
Can you suggest a SQL query?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thank you
Just run a DBCC CHECDB to test the database integrity.