July 5, 2012 at 7:11 am
please guys help me on this,.,......
drop table dbo.DemoTable1
go
select * into adventureworks.dbo.DemoTable1 from [SSMSB-06\MSSQLSERVER01].AdventureWorks.dbo.DemoTable
go
ALTER TABLE [dbo].[DemoTable1] ADD CONSTRAINT [PK_DemoTable1] PRIMARY KEY CLUSTERED
(
[DemoTableKey] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY]
GO
iam using this kind of script so i think can you understand the script.this script running weekly basis(i mean its scheduled the job) update or inserted records in one database another database.so my question is this script replace we can use replication or SSIs pkg is possible????? but is it possible replication which method is good or same data overwrited in publisher to sunscriber??(becasue we can primary key in tables
source database destination database
A(pk) 60 A(pk) 40
1 90 1 90
is it overwrite the data in A(pk) 60(from Publisher to subscriber)
According above Script:
how to update(drop\create) tables from one server database tables to another server tables
SQL server DBA
July 5, 2012 at 1:37 pm
Why not just keep the table and delete the contents (maybe truncate I am not sure of truncate's impact on replication) and use an Insert Into for the new data?
July 6, 2012 at 1:03 am
Hey Hi Daniel Bowlin,
thank You so much For replying to me...
okay im using insert into like
INSERT INTO dbo.TABLETWO
SELECT col1, col2
FROM dbo.TABLEONE ..but overwrite is not possible..i mean it will shows the for example
source database Dest_dtabase
A(pk) 70 A(pk) 70
b 80 here b 80
A 70 and B 80 it shows the 4 recors..i mean overwrite is not possible....
so pls suggest me i want weekly once update(insert new records)(job agent) the tables from one server to another server tables with overwrite or any other alternate method ..pls help on this situation
SQL server DBA
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply