Replication-Distribution Database already exists problem

  • Hi All,

    When i complete the replication wizard it will try to run through, but the following error message appears:

    Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data\distribution.MDF' because it already exists. Change the file path or the file name, and retry the operation.

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

    Changed database context to 'master'. (Microsoft SQL Server, Error: 5170)

    I have checked in the system database folder and the Distribution database isnt there. However, the mdf and ldf files reside in the following location:

    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA.

    Question 1. Can i delete these two files?

    Question 2. will the replicaiton wizard create a new mdf and ldf?

    thanks in advance guys!

  • with which Login you are looking for the database. Is this a member of sysadmin?

    are there any results starting this query:

    SELECT name

    FROM master..sysdatabases

    or

    EXEC sp_databases

  • Hi, thanks for your reply.

    the select query shows all my db's tht i have on the server, it does not display the distributor.

    The account is a domain account. I've checked with Networks that it has full access rights to the correct path and publisher etc.

    I've got replication setup on another server using the same account and its working fine for months. if i deleted these two files on the new server i am trying to set the replication will this pose any issues?

    thanks for your help.

  • .. Can you try attaching it and drop it ? Just my thinking... Other experts might guide you..

  • Hey, yeah i decided to delete them after all they did not contain any subscriptions. It has allowed me to set the replication back up on the new server.

    Thanks Guys for your replies!:-)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply