Tuesday, October 15, 2013

[MS SQL Server] Copy data between 2 networks

[MS SQL Server] Copy data between 2 networks


Copy data between 2 networks

Posted: 15 Oct 2013 12:40 AM PDT

Hi Friends,I have around 100 tables to copy from one server to another. The problem is that these 2 servers are not in the same network. Is there any way in which I can achieve this. May be copy data in a disc and and then copy it to the other servers.Please could you suggest few ways of doing this. Thanks

Intangible updates at the publisher database

Posted: 14 Oct 2013 11:32 PM PDT

Good day, colleagues . I encountered with a problem and need advice. SQL Server 2008R2. I have a merge replication with publisher and N subscribers.Periodically an update conflict occurs in replication. It is not a problem, it's okay if both sides have updated record, but in my case the record is updated with only one side.Why so adamantly. First, all user stored procedures which updates a values in record has a script that logs the date and time of renewal in special columns, secondly - the application-layer forbids updating records when current user did not create them, and thirdly, today I created the triggers on the table at the publisher who write all DML operations in the log table.So in the log-table I see the event of creating new record, it was created at the Subscriber and come with replication on the publisher – ok! Then user updates a record on subscriber and I see the update conflict for this record, but I do not see any fact of update that record in the log-tables on publisher. Conflict viewer says to me that both the Publisher and Subscriber data is changed but I do not see a time of renewal in special columns, and all other values are identical. The question is: how Publisher can update records in the table, so that the triggers do not fire? Or which process and why, for some reason generates updates system tables ("genhistory" or "contents"), which leads to conflict?Sorry my poor English, did not have enough practice last time.

Triggers

Posted: 14 Oct 2013 12:59 PM PDT

Hi,I have a table simple nothing to complicatedCREATE TABLE [dbo].[RHH] ([UNIQUE_ID] varchar(50) NULL,[First_Name] varchar(50) NULL,[Last_Name] nvarchar(50) NULL,[email] nvarchar(50) NULL)ON [PRIMARY]with this table all the data gets inserted via an application except the UNIQUE_ID. This I am looking to increment as the data is inserted. Also it has to be in the format of say RHH100100 +1.Im thinking an on insert trigger to update the column but not sure how to get the last value and increment that. ?

No comments:

Post a Comment

Search This Blog