Link to home
Create AccountLog in
Avatar of goodk
goodkFlag for United States of America

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!!
Avatar of ste5an
ste5an
Flag of Germany image

If this is the case, then it's an issue for the GoDaddy support.

Just run a DBCC CHECDB to test the database integrity.
Avatar of goodk

ASKER

Msg 7983, Level 14, State 36, Line 2
User 'kenkenken' does not have permission to run DBCC checkdb for database 'kenkenken'.
Avatar of goodk

ASKER

Use [kenkenken] DBCC CheckDB
Then contact the support.. it maybe database or index corruption.
Avatar of goodk

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
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                                      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
How did you inserted these rows?
Those are all columns in the table?
Avatar of goodk

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.
Avatar of goodk

ASKER

How can I delete all other identical records except with the lowest ID

Can you suggest a SQL query?
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of goodk

ASKER

thank you