Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Your duplicate script

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-10-29 : 22:36:13
Alex writes "Hi,

I was using your duplicates for a while, but now my database exceeds 700,000 records , and I suspect over 100,000 of them are duplicates... When I try to run the duplication script now it gives me the following error, please advise:

"Server: Msg 1101, Level 17, State 8, Line 2
Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."

The script I use is the following and I run it on SQL Server 7:
--remove duplicates
DELETE FROM useddomains WHERE useddomains.domain_id IN
(SELECT F.domain_id FROM useddomains AS F WHERE Exists
(SELECT name, ext, Count(domain_id) FROM useddomains
WHERE useddomains.name = F.name AND useddomains.ext = F.ext
GROUP BY useddomains.name, useddomains.ext HAVING Count(useddomains.domain_id) > 1))
AND useddomains.domain_id NOT IN
(SELECT Min(domain_id) FROM useddomains AS F
WHERE Exists (SELECT name, ext, Count(domain_id)
FROM useddomains WHERE useddomains.name = F.name
AND useddomains.ext = F.ext
GROUP BY useddomains.name, useddomains.ext
HAVING Count(useddomains.domain_id) > 1)
GROUP BY name, ext);

Regards
Alex"
   

- Advertisement -