Replication And Schema Modifications

Mar 30, 2000

SQL Server 7.0 (Service Pack 1 )

A table is currently set up with Transactional Replication. A new field needs to be added to the table. The system needs to continue to be live. What is the best way to handle this kind of situation?

The database model cannot be frozen once replication is in place, and a fresh snapshot cannot be taken each time this occurs since this is very timely on large tables, and errors could occur with other tables replicating since there are foreign key constraint in the Target database.

I haven't been able to find a way to be able to continue replicating the old records which may have been in the log during the addition of the field, as well as the new records with the new field. I must be missing something, since the model must be able to be altered once replication is in place, without the shuting down of the entires system.

View 5 Replies


ADVERTISEMENT

Schema Changes After Replication

May 18, 2006

I see from help books that table changes are not allowed using Enterprise Mgr. after a publication exists. The only way to make db changes is to use T-SQL. I found the correct sp to make changes below.

I am using

sp_repladdcolumn <tablename>,<columnname>,<datatype(25)>

sp_repladdcolumn does not allow datatype length to be supplied. Result defaults to 1 and sets to NULL.

I need a variable length on my datatype. Is this a syntax error on my part or am I not able to supply this parameter?

How to accomplish?



thx..bt

View 1 Replies View Related

Replication Of The Schema Of A SQL Database

Nov 12, 2007

Hi all,
I am doing a replication of a SQL Server 2005 database from one server to another server, everything worked fine. Now, when I added some fields to this database, the replication stopped. can I do replication of a schema of a SQL database? how? Should the replication work even if I add some fields.

View 3 Replies View Related

Schema Changes And Transactional Replication

Feb 9, 2004

Hi

If a column is added to a table which is a published article in a transactional replication, is it sufficient to do the following?

- drop subscribers
- amend the publication by dropping the affected table, then re-adding it
- re-pushing to subscribers

Or do I have to drop the entire publication and recreate it?

TIA

View 8 Replies View Related

Schema Changes And Merge Replication

Jan 23, 2006

Hi there,

I wonder if I can ask for some advise? I wish to use SQL 2005 and merge replication but I have a few concerns over the schema changes that I am allowed to do on the publisher.

Ideally I want sql replication to push all my schema changes from the publisher to the subscribers but I don't know if it can. or even if it is recommended.

I see the BOL suggesting that schema repl. was mainly intended for ALTER type of statemenets, but can I use it for CREATE and DROP type DDL too?

For example, if I add a new table at the publisher I presume I have to add a new article too for this table. Then how can I create a new snapshot? Is this even the right way of doing it? Similarly if I want to DROP a table at the publisher I'm guessing I have to also delete any existing articles too, then recreate the snapshot.

Are there better / safer ways of doing schema changes? Perhaps I'm best disabling publishing and asking each remote site / db to update their schema manually and then re-enabling the publisher?

Any help would be much appreciated.

Regards.

View 4 Replies View Related

Three Level Replication Schema

Nov 24, 2006

Hi I have to questionsproblems I would need help with. First I am creating a three level merge replication. I mean I have a main
publisher with its distributor, a subscriber/publisher and also with
it's own distributor and lastly a subscriber.
I start by creating the relation between subscriber/Publisher and the
subscriber and than I move up to the main Publisher and
SubscriberPublisher relation. After this second merge I get the
following errors and the articles in my SubscriberPublisher are
lost...


The merge process could not retrieve article information for
publication 'I-Test-Publisher'.
(Source: Merge Replication Provider (Agent); Error number: -2147201017)


---------------------------------------------------------------------------­­------------------------------------


Cannot insert the value NULL into column 'tablename', table
'@tmp_table'; column does not allow nulls. INSERT fails.
(Source: DEVSERVER3MSDE (Data source); Error number: 515)
---------------------------------------------------------------------------­­------------------------------------


Failed to allocate new identity range.
(Source: DEVSERVER3MSDE (Data source); Error number: 21197)
---------------------------------------------------------------------------­­------------------------------------



Secondly








I have set up a two level merge replication with a publisher and a
subscriber and had modified the structure of a table in the publisher
with sp_repladdcolumn. During the day all was fine I continuously
tested it by adding more columns, droping columns and testing the
replication itself with data entry, but when I got back
the next morning my test table and all other table I presume had lost
its data and structure. The conflict table for the corresponding test
table had kept it's structure but no data were present since no
conflict had occured. This is a recuring problem that some colleagues
had.
Does anyone have any idea what might cause this problem and why it
happenned.
Thanx

View 7 Replies View Related

Unmatched Schema - Transactional Replication

Mar 18, 2008

Can you use Transactional replication for exchange data between tables where schema is not matching?



------------------------
I think, therefore I am - Rene Descartes

View 6 Replies View Related

Schema Change - Snapshot Replication

Apr 16, 2007

How can I keep schema changes in the subscriber's database when I replicate the snapshot from the publisher?



I just want to move data from a remote server, but it seems that the tables are being dropped which is not good as we use the subscriber as a development box.



Please advise

View 7 Replies View Related

SQL Server 2008 :: Snapshot Replication To Different Schema Name

Apr 25, 2015

I need to setup snapshot replication for 1 large table.

Source table: SourceDatabaseName.dbo.MyTable1
Target table: TargetDatabaseName.CustomSchema.MyTable1

In the above example, how can I specify the target DB's CustomSchema name (it's currently creating dbo, not CustomSchema)

View 1 Replies View Related

SQL Server 2008 :: Schema Changes With Transactional Replication

Jun 15, 2015

How do we know our schema changes will propagate to subscriber without breaking the replication? Is there any t-sql command to find out the option true or false?

View 2 Replies View Related

Merge Replication Between Same Schema Databases But Different Data

Jan 25, 2007

Hi all.

I 'm trying to set up merge replication between two servers that have the same schema databases. The two database have the majority of there data the same but as well as data inserted at a later time independently on the two servers. (The two servers were connected in a merge replication scheme that failed at some later  time and replication was paused, but users continout to insert data indepentedly at the two servers.)

I need to get them up and running.

I cleaned replication at both servers, I recreated the publication at the puplisher distributor and all is fine.

When I create a push subscription to the subscriper I get the error invalid column name 'rowguidcol' .

I so far managed to have merge replication running on two identical databases (schema and data).

Just some thoughts. After some reading I found that it might be related to identities and identity range or indexes.  I set the identity seed  and increment at 2, 2 at publisher and at 1,2 at subscriper. (On the same tables at  puplisher and subscriber.) Is that ok? is that the way to do it?

Digging a bit more  Using the SQL Profiler I can locate the error to happen when sp_MSaddmergetriggers executes.

Thanks allot for any help

Version.

Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)   May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

View 5 Replies View Related

Merge Replication Schema Sync Problems

Sep 10, 2007


I am using a merge publication set to synchronize schema changes. Why am I getting the following message when I try to sync after having added columns in the publication database using ALTER TABLE statements?

The schema definition of the destination table ... in the subscription database does not match the schema definition of the source table in the publication database. Reinitialize the subscription without a snapshot after ensuring that the schema definition of the destination table is the same as the source table.

Also, why doesn't reinitializing the subscription with @upload_first = false not fix the problem?

View 1 Replies View Related

How To Reflect Schema Changes At Subscriber Using Transactional Replication

May 16, 2007

Hi

I need to setup transactional replication for a production server.

The tables (articles) at publisher being replicated can expect schema changes.



Is there any way to reflect schema changes at subscriber using transactional replication.



Early Thanks,

Salman Shehbaz.

View 1 Replies View Related

Error In Merge Replication The Schema Script...

Jun 25, 2007

I'm trying to set up a merge replication. Publication is created successfully and snapshot also, but when I create pull subscription on subscriber server and merge agent starts, after some time I get an error message of this type:

The schema script '\ANILREPLDATAuncANIL_BEJK_BEJK20070625142735dl_HF_vMSCene_3836.sch' could not be propagated to the subscriber.
It seams there is a problem with certain Views and SPs, because tables are successfully created, and some Views and SPs also.

I tried to exclude problematic articles, but every time another one pops up. Up until now, I excluded 7 articles from publication (1 Stored Procedure and 6 Views) but I still get errors.

I gave up because I can't exclude half of the Views and SPs just to make it work.

Is there something that can be done to solve this problem?

Thanks!

View 3 Replies View Related

Table Schema Changes Not Being Propagated - Merge Replication

Dec 9, 2005

Hi,

View 9 Replies View Related

How Can I Made SQL Modifications That I Can Do At EM ?

Aug 14, 2006

Hi all, this probably is a stupid question, but here I go.
I have read in some places that you can't set up an already existent column as IDENTITY, but in Enterprise Manager, you can do it. My question is, how EM can do this? Because I need to do this in a lot of databases, and I have to do this by SQL.

Kind Reggards
Dirceu

View 4 Replies View Related

Schema Properties/attributes Not Transferred By Transactional Replication

Jun 15, 2004

Apart the IDENTITY property, what other properties or attributes are not transferred to the target schema?

I know that one can use NOT_FOR_REPLICATION for identities, but I am interested in a (complete?!) list of metadata objects that transactional replication *prefers* not to transfer across to the target by default.

TIA

View 2 Replies View Related

Replication: Any Way To Change Table Schema W/o Reinitializing Subscriptions

Mar 23, 2004

Hi all,

I'm admitedly a bit new to the world of replication, so please bear with me. I've got two SQL Server 2000 servers running in different locations. Server A does transactional replication over a push subscription to server B. If I need to make a minor change to one of the replicated tables (for example, dropping a no longer used column or changing a varchar field's length) do I need to drop the subscription, make the changes and then re-initialize the schemas and data?

For minor changes, I really hate having to knock out the site runnign off server B while the subscription is re-initialized and data is bulk copied back over. If I want to just make the changes manually on both servers will that cause problems down the line?

Any help is greatly appreciated.

tia.

-m

View 2 Replies View Related

Replication :: Merge Rep Schema Change And Processing Order

Jul 14, 2015

Question re Merge rep (pull) and processing order.  We have a group of changes associated with an app upgrade, the scripts run fine on the publisher.   Part of the change includes creation of a new table , followed by altering a view to use new table.Following the change at the publisher, when the sync is kicked off from the subscriber, it fails - the alter of the view throws an'invalid object' error with regard to the new table.  Seems as if the view alter is attempted before the dependant table has been created. 

I have tried to amend the processing order of the view using sp_changearticle, which executes (quickly) with a 0 return code.But it is to no avail , the error still occurs.   is it possible to change the processing order for a view article , which will be applied to schema changes ? Have

View 4 Replies View Related

How To Handle Schema With Sql Server 2000 Merge Replication

May 29, 2007

I have a problem with sql server merge replication in sql server 2000.
If my db owner €œdbo€? and replication setup under €œsa€? account it works with out any problem. But when I use another db owner it can not work properly.
For an example I have customer table ([dbo]. [Customer]) When I setup merge replication under sa account it€™s work properly.
Again I was setup merge replication using another db owner ([INV]. [Customer]) It doesn€™t work.

View 3 Replies View Related

Snapshot Replication And Schema Change On Sql Server 2000

Aug 10, 2006

can a sql server 2000 snapshot replication

solution handle a schema change.



as far as i know i can't drop a table involved in replication

View 4 Replies View Related

Replication - Are Schema Changes Replicated If The Sanapshot Agent Runs On A Schedule

Mar 4, 2003

I have Snapshot set up as a schedule task between server A and server B.

If I make changes to the db schema on server A - the changes are not replicated to server B.

Is this normal?

Do I have to restart the Sanapshot agent each time there is a schema change?

Thanks,

Bianca

View 1 Replies View Related

SQL Server Admin 2014 :: Skip Schema Changes For Transaction Replication

Jun 6, 2015

Whenever I am doing reinitialization, publisher table schema is applying at subscriber level

I don't want to apply all changes ...

How can I skip the schema changes for transaction replication ...

View 1 Replies View Related

Need To Track Stored Procedure Modifications

Nov 29, 2007

can any body provide me any idea
i need to know who had made changes to any particular stored procedure (when and from whose machine) 
any thing regarding to any kind of tracking of stored procedure 

View 1 Replies View Related

Replicate Table Additions And Modifications

Feb 23, 2007

I am new at replication and it has been going well, but have more of an information question that a problem. Basically I have transactional replication without updates. So i am pushing from the publisher to the subscriber only. I have added a table to the publisher side, and it is not replicating to the subscriber. Data pushes fine. I have read about reinitializing, adding article, etc. I do not know which is the way to go, I need it to happen automatically.

Which way and how? Any help is appreciated greatly.

Thanks

View 1 Replies View Related

Problem : Extreme Activity - Slow Merge Replication - From A Schema Update

Jul 4, 2007

Hi there,



We have a big problem here with merge replication, specifically whenever a schema change occurs. We are replicating schema changes, and triggers/stored procedures. The example is that we changed about 150 stored procedures and about 30 triggers. This is then replicated to the subscriber database (which is also a merge publisher for further remote systems that were offline at the time) over a 10Mb link - hardly low bandwidth. However, the replication process takes about an hour and a half - considering the SQL on the primary server took less than a minute to run this is a big suprise.



We've run a trace to see if we can identitfy what is going on. There seems to be a great number of calls to sp_MSunmarkschemaobject - we are still waiting for a trace to complete to fully analyse this however it looks like it calls this repeatedly for every stored procedure in the database. We are currently re-testing to one of the remote servers with the merge agent set to the slow profile (not much hope that this will alter the poor performance).



This task looks to be excessive - and certainly does not seem to function in a sensible manner. Has anyone else had similar issues or have any suggestions. This is very infuriating as it means that the servers are effectively offline for a minimum of and hour and a half (in fact the remoter servers take over 4 hours !).



Thanks.

View 2 Replies View Related

2005 - Direct Modifications To Systems Catalogs

Jul 20, 2007

In 2000 there was a server level setting you could change in EM, to allow direct modifications to systems catalogs.

in 2005 I would like to update some sids in sysusers tables, do I also need to find and set this option first

View 6 Replies View Related

Database Table Data Modifications With PK/FK Relationship

Mar 21, 2007

I have two tables (T1 and T2). In T1 I have a field FT1 that is aprimary key in T2 I have a field FT2 that is a foreign key linked toFT1. These fields have been populated with data. Lets say that in onerow of data I have in T1 under FT1 "my cell" as the data entry,similarly with T2 under FT2 I have 2 rows of data that also have "mycell" as the data entry. What is the best line of action is I wantedto change "my cell" to "my data"?

View 3 Replies View Related

SQL Server 2012 :: Case When Statement - N Number Of Years Without Modifications

Feb 4, 2014

Below is the scenario which I have currently in my query. I need to write this query without any hardcode values , so that it will work til n number of years without modifications.

Startdate =
CASE WHEN
Trandate between '06-04-2013' and '05-04-2014' then '06-04-2013'
Trandate between '06-04-2012' and '05-04-2013' then '06-04-2012'
Trandate between '06-04-2011' and '05-04-2012' then '06-04-2011'
Trandate between '06-04-2010' and '05-04-2011' then '06-04-2010'
Trandate between '06-04-2009' and '05-04-2010' then '06-04-2009'
Trandate between '06-04-2008' and '05-04-2019' then '06-04-2008'
END

View 5 Replies View Related

Transact SQL :: Trigger Saves Modifications On Table Including UserID Of One Who Does The Changes

Jun 24, 2015

How can i pass my .net application's Userid to the trigger? I have a audit trail trigger on myTable. I dont know how to pass the userid (not the sql server user) to the trigger when a user delete a record from the application(.NET Application).

The trigger saves the modifications on the table including the userid of one who does the changes.

View 4 Replies View Related

SQL Server 2012 :: Modify Stored Procedure Opens Does Not Open For Modifications As Earlier

Jan 5, 2015

when i click on the modify option on a stored procedure it is not opening for editing as earlier. it opens as if for scripting.for example i clicked modify procedure on stored proc. "text" and the result is as follows.

/****** Object: StoredProcedure [dbo].[test] Script Date: 05/01/2015 7:50:08 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[test]') AND type in (N'P', N'PC'))

[code]....

View 4 Replies View Related

The 'System.Web.Security.SqlMembershipProvider' Requires A Database Schema Compatible With Schema Version '1'.

Sep 27, 2007

Locally I develop in SQL server 2005 enterprise. Recently I recreated my db on the server of my hosting company (in sql server 2005 express).I basically recreated the tables and copied the data in it.I now receive the following error when I hit the DB:The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'.  However, the
current database schema is not compatible with this version.  You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.I heard something about running aspnet_regsql.exe, but I dont have that access to the DB. Also I dont know if this command does anything more than creating the membership tables and filling it with some default data...Any other solutions/thought on what this can be?Thanks!

View 4 Replies View Related

Transferring Objects Form Schema A To Schema B In One Shot....!

May 27, 2008

I have 35+ tables and 15+ stored procedures with SchemaA, now I want to transfer them to SchemaB.

I know how to do one by one...!

alter schema SchemaB transfer
SchemaA.TableA

but it will take long time...!

Thanks,

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved