Friday, March 23, 2012
Help on how to 1 way push data
Maybe Im missing something but..
I have a order tracking system running on sales peoples laptop's. When they connect to the company Network (via dialup) at Night I want to push all off there orders to a named SQL, and then remove those orders from their own laptop.
So in a sense, Its like a one way merge with a delete, or even a push from MSDE to the main SQL server.
I dont want existing data pushed back to the laptop.. SO its all one way.
Any ideas? or help
Ryan,
I have seen merge used for this - you can have a filter of 1=2 on the
tables. This ensures that subscriber inserts are replicated to teh
publisher, and then deletes are replicated back because the filter is not
satisfied. However, this can be a bit buggy if inserts are still carried out
on the subscriber while the merge agent is running (some of the new rows
won't be removed when next running the merge agent). Provided you can
prevent this, or it won't happen in your particular business, then this is a
viable solution.
Alternatively, each laptop could be configured as a transactional publisher
with HO as a central subscriber and for the delete command, 'none' is
entered to prevent the replication of deletes.
Finally, you could use DTS/linked servers to accomplish the same thing.
Regards,
Paul Ibison
|||Hi Paul
Thanks for your reply. Could you just explain the
> you can have a filter of 1=2 on the
> tables. This ensures that subscriber inserts are replicated to teh
> publisher, and then deletes are replicated back because the filter is not
> satisfied.
please as this sounds about the right way - as the users will not be adding new records at the time of syncronisation (they are basically using the Win Xp Syncronisation tool i.e. Annonymous.
|||Ryan,
in the filter section of the publication properties, on the filter rows tab
you specify this filter:
SELECT <published_columns> FROM [dbo].[yourtable] WHERE 2=1
HTH,
Paul Ibison
Wednesday, March 7, 2012
help me~~about sql server 2005
use AdventureWorks
go
select * from sales.customer --it's error!why?
select * from Sales.Customer--it's right!
how to let sqlserver2005 IgnoreCase ?
This issue is related to your database collation setting.
You can search Books online for more information on collation.
You can try run this to find out what your database collation is:
SELECT databasepropertyex(AdventureWorks','collation')
The collation of your database makes your query case sensitive.
If you want a quick change, you can change your database to another collation which is not case sensitive, for examle:
ALTER DATABASE AdventureWorks COLLATE SQL_Latin1_General_CP1_CI_AS
|||
THANKS!
but when i run follow:
ALTER DATABASE AdventureWorks COLLATE SQL_Latin1_General_CP1_CI_AS
it throw error and prompt some view ,table etc,depend on the current collation
~~
NOW!HOW CAN I TO DO ?
|||
There are some limitations on altering collation of a database, maybe there are some SCHEMABINGING views in the database. Please refers to SQL2005 Books Online, and locate:
'ALTER DATABASE (Transact-SQL)' topic ->'Remarks' section->'Changing theDatabase Collation'.