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 2008 Forums
 Replication (2008)
 Allow overwrite ([SQLSTATE 42S01] (Error 2714)

Author  Topic 

Michael Trabjerg
Starting Member

2 Posts

Posted - 2011-09-27 : 09:11:28
Hi there

I have setup a link between MySQL and MSSQL. I could replicate the DB from MySQL the first time, but afterwards I get this error:

Executed as user: NT AUTHORITY\NETWORK SERVICE. There is already an object named 'access_right' in the database. [SQLSTATE 42S01] (Error 2714). The step failed.

How can I allow MSSQL to overwrite the existing tables?

Thanks

-M

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-27 : 15:37:55
By dropping it. How are you copying from mysql to mssql? Data import wizard has an option to drop/create. SSIS, you handle this manually with a DROP TABLE statement.
Go to Top of Page

Michael Trabjerg
Starting Member

2 Posts

Posted - 2011-09-28 : 01:46:19
quote:
Originally posted by russell

By dropping it. How are you copying from mysql to mssql? Data import wizard has an option to drop/create. SSIS, you handle this manually with a DROP TABLE statement.



Thanks. I actually created this from a script. In SQL a link as been setup between the two servers. A scheduled job copies the DB from MySQL to MSSQL and then copies the tables to the right DB in MSSQL.

Where can I add the DROP TABLE statement?

Thanks

-M
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-28 : 07:26:14
Add a job step before the tables are copied. Or truncate them, and just copy the data instead of creating the table every time.
Go to Top of Page

mingmei0909
Starting Member

2 Posts

Posted - 2011-10-16 : 06:28:29
Thanks. I actually created this from a script. In SQL a link as been setup between the two servers. A scheduled job copies the DB from MySQL to MSSQL and then copies the tables to the right DB in MSSQL.
http://www.ezibuystore.com
Where can I add the DROP TABLE statement?
http://www.okeysale.com
Thanks
http://www.realjerseysshop.com

Go to Top of Page
   

- Advertisement -