X-Received: by 2002:a05:6214:1242:b0:67e:aa84:b08e with SMTP id r2-20020a056214124200b0067eaa84b08emr74718qvv.2.1702485691282; Wed, 13 Dec 2023 08:41:31 -0800 (PST) X-Received: by 2002:a05:6a00:2d97:b0:6bd:f760:6ab7 with SMTP id fb23-20020a056a002d9700b006bdf7606ab7mr396091pfb.4.1702485690825; Wed, 13 Dec 2023 08:41:30 -0800 (PST) Path: csiph.com!1.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: microsoft.public.sqlserver.replication Date: Wed, 13 Dec 2023 08:41:30 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2001:16a2:f888:a500:7dc7:2f0b:f4e9:a182; posting-account=PDxQCgoAAAANGLAgPUukIXRGied6IcU1 NNTP-Posting-Host: 2001:16a2:f888:a500:7dc7:2f0b:f4e9:a182 References: <#h4bWBg7EHA.2180@TK2MSFTNGP10.phx.gbl> <#bNObWg7EHA.1404@TK2MSFTNGP11.phx.gbl> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Merge Replication Error: Column names in each table must be unique. From: =?UTF-8?B?2LnYqNiv2KfZhNmE2Ycg2YHZiti12YQ=?= Injection-Date: Wed, 13 Dec 2023 16:41:31 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: csiph.com microsoft.public.sqlserver.replication:74 =D9=81=D9=8A =D8=A7=D9=84=D8=AE=D9=85=D9=8A=D8=B3=D8=8C 30 =D8=AF=D9=8A=D8= =B3=D9=85=D8=A8=D8=B1 2004 =D9=81=D9=8A =D8=AA=D9=85=D8=A7=D9=85 =D8=A7=D9= =84=D8=B3=D8=A7=D8=B9=D8=A9 10:11:44 =D9=85 UTC+3=D8=8C =D9=83=D8=AA=D8=A8 = Noman Qureshi =D8=B1=D8=B3=D8=A7=D9=84=D8=A9 =D9=86=D8=B5=D9=87=D8=A7: > Thanks for the reply Hilary, Kestutis > We have decided that it is batter to update the applications and rename t= he=20 > problematic column, that will make our DB more compliant to (MS) standard= s=20 > and will be beneficial for us in the future, who knows what we will get i= n=20 > the next patch/sp or future version of SQL . We have forwarded the column= =20 > names provided by Hilary to our development team so they can avoid them i= n=20 > the future. > Thanks again > Regards & Best Wishes > Noman Qureshi > "Even impossible says I M Possible" > "Hilary Cotter" wrote in message > news:O2Rp$Yp7EH...@TK2MSFTNGP12.phx.gbl... > > If your tables are small, you could have the application write to views > > which correspond to the underlying tables, only the column names in the > > underlying tables are correct, but pubid would be in the view. If the= =20 > > tables > > are larger you would have to go with indexed views. > > > > --=20 > > Hilary Cotter > > Looking for a SQL Server replication book? > > http://www.nwsu.com/0974973602.html > > "Noman Qureshi" wrote in message > > news:%23bNObWg...@TK2MSFTNGP11.phx.gbl... > >> Thanks for you reply Hilary > >> The table and column is in use of five applications, is there any othe= r > >> workaround for this problem > >> > >> (else have to modify and recompile all the applications) > >> > >> > >> "Hilary Cotter" wrote in message > >> news:eMHGaLg7...@TK2MSFTNGP14.phx.gbl... > >> > there are some reserved column names in merge replication. PubID is = one > > of > >> > them, others are: reason_code, source_object, reason_text, > >> > conflict_type, origin_datasource, tablenick, and create_time. > >> > > >> > If any of your tables have columns with these names in them, your > > snapshot > >> > will fail with a message similar to the one you are getting. > >> > > >> > You will have to change the column names for this to work. > >> > > >> > --=20 > >> > Hilary Cotter > >> > Looking for a SQL Server replication book? > >> > http://www.nwsu.com/0974973602.html > >> > "Noman Qureshi" wrote in message > >> > news:%23h4bWBg...@TK2MSFTNGP10.phx.gbl... > >> >> Hello All > >> >> > >> >> I am facing problem creating merge replication, searched MS site bu= t > >> >> found nothing on it > >> >> > >> >> I have created a new merge publication with all the tables in a DB, > > this > >> >> error occurs wile snapshot agent starts to create the snapshot erro= r=20 > >> >> is > >> >> > >> >> Snapshot Agent Error Details > >> >> > >> >> Error: > >> >> "Column names in each table must be unique. Column name 'PubID' in > > table > >> >> 'aonflict_NomBilling_PubPage' is specified more than once." > >> >> > >> >> Category =3D Data source > >> >> Source =3D sqlserver1 > >> >> Number =3D 2705 > >> >> > >> >> At this point the snap shot agent aborts > >> >> > >> >> Any advice/solution > >> >> > >> >> Thanks & Regards > >> >> > >> >> Qazi M. > >> >> > >> > > >> > > >> > >> > > > > the best solution : let column name error : dept_no =20 1.create temporary table as name temp_dept_no and pk of table let name de= pt_id 2.copy data of dept_no column into table (temp_dept_no) 3.drop column from each server (dept_no) 4.create column in table from main server name (dept_no) 5.move data from table temp_dept_no using pk of dept_id