Get a list of Duplicate URLs in the Broker DB

If you have duplicate URLs in your broker, your website will be unhappy at best and will probably throw an error when it tries to get the content of the page from the broker for a given URL.

 

This situation can occur when you publish a page for example called "index.htm" then you rename the page to "index_old.html" and then create a new page called "index.htm" and publish out that new page.

 

to find all the duplicates in the Broker DB run the following

select *
  from PAGE a
  join (SELECT PUBLICATION_ID , URL
               FROM PAGE
               GROUP BY PUBLICATION_ID, URL
               having count (*) > 1 ) b
    on a .PUBLICATION_ID = b.PUBLICATION_ID
   and a .URL = b.URL
 

Usual disclaimer

Run as a read only user, not supported by SDL support etc.