|
|
Hi,
If I setup only transaction replication it is working fine but when i setup Merge replication in Server A and after that i setup one more Transaction replication then i gave me the errors as mentioned.
Actually i have one server A do merge replication to clients. And now i want to do one more transaction replication in Server A to others but it occurred errors.
can we do Merge replication and transaction replication in the server A?
---
|
|
|
|
|
Basically with merge replication when a synchronization occurs, the final state of the rows is what is merged with the other side. So if I have a stock tracking table which each stock is updated thousands of times between synchronizations only the last value of the stock will be replicated.
With transactional replication with updateable subscribers the changes (the DML) will be replicated as transactions. So if a row in our stock table is updated 1,000 times there will be 1000 indivdual transactions will be replicated.
Now updateable subscribers is being deprecated and will likely not show up in SQL 11 and peer to peer is the desired upgrade path.
So if you need transactions replicated transactionally you would want updateable subscribers, if you want bi-directional synschronization between nodes which are frequently disconnected - merge replication is the way to go.
|
|
|
|
|
hello,
in my application
I have three tables: user, admin, operator
each of these three can send a message to another
the message can be a response to a message sent by the other
or it may correspond to a command (because the user places orders to the admin and the admin can send a message on this order (Order approved, rejected, in process))
all of that concern an application of managment printing
my problem is to determinate how much I need to message tables (because there is a lot of messages (corresponding to order, response, simple message, which is sender and receiver....))
here is the image of my model
http://postimage.org/image/fezebtifp/
Can you help me or give me examples of similar cases
thank you very much
|
|
|
|
|
I wrote a simple messaging application a few years ago and used something like the following:
Message table:
MessageID -- the ID of message
ParentID -- the ID of the immediate parent message
ThreadID -- the ID of the first message in the thread
SenderID -- the ID of the sender
TimeSent -- timestamp
Content... (whatever other columns you require)
Recipient table:
MessageID -- the ID of the message
RecipientID -- the ID of the recipient
Read/Unread indicator
This allowed for multiple recipients for each message. I used GUIDs for IDs, but you could use INTs if you like.
|
|
|
|
|
I think you forget the receiver_id, and what is the utility of thread_id
|
|
|
|
|
ahmadiss wrote: I think you forget the receiver_id
That's the recipient.
ahmadiss wrote: what is the utility of thread_id
Helps find all messages in a thread quickly.
|
|
|
|
|
you are right thank you very much
|
|
|
|
|
I am trying to stop sqlserver 2005 bt unable to do so
error occured - access denied .
can some one help me out.
|
|
|
|
|
login as Administrator. and try.
Vande Matharam - Jai Hind
|
|
|
|
|
We are looking a change on the code to make it watchable and improve it's performance.
Want to change this piece of SQL query into a loop version which
Could `Select-Insert` records by 1000 items per iteration.
On each iteration want to get a print to see what was the last inserted item
and if possible get the elapsed time on the iteration.
The Code :
INSERT INTO [tData2]
(
[Key],
Info1,
Info2
)
SELECT
[Key],
Info1,
Info2
FROM
[tData]
-- Conditions were removed as weren't related to this question
your help is really appreciated.
modified 19-Jul-12 3:50am.
|
|
|
|
|
Performance will suffer if you're going to print each item individually. Insert 50 (or so) records, see if more than a second passed, and write to the terminal that you've done the next batch.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Limiting the loop will slow your performance. There really isn't a nice way of doing it without resorting to pre-import queries or using a cursor. Neither choice will result in faster performance.
Proper indexes on the conditions will improve performance given the query you listed.
If you are moving lots of data into an empty table and you can fully control its integrity, then remove all constraints (except identities) and indexes on the new table - update the table - and put them back on. This can greatly speed up a large insert.
You can also take a look at BULK INSERT if your SQL version will allow.
|
|
|
|
|
@Michael thanks for the info,
I recently made a solution for this used some of your previous advice,
also will consider your recent advice as it's needed.
|
|
|
|
|
Hi
I have a requirement to migrate the data from my standard OLTP database into an OLAP database based on the firing of a particular event. There will be some calculations performed on the OLTP data and the calculated/aggregated data will be inserted into the OLAP database.
I have 2 options to do this.
1. Use a web service to insert data into the OLTP database, make required calculations and then insert the data into the OLAP database from within the web service itself.
2. Use SSIS to migrate the data from the OLTP database into the OLAP database.
I am confused as to which option is better in terms of performance, security, maintainability as well as scalability of the application. My application deals with huge amounts of data which is required to be used for generation of reports.
Thanks
|
|
|
|
|
No you have only 1 option - you have to use SSIS. A web service is for publishing data to be consumed by a client, SSIS is an ETL tool, your job is ETL.
The above description is a simplification of both tools but is essentially correct. This is especially true as you are transforming large volumes.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Member 9270499 wrote: based on the firing of a particular event
Does this mean that the OLAP db have to be kept up to date immediately when the OLTP is updated? Or can it be updated in a batch?
|
|
|
|
|
Hi,
when i run the url http://localhost/reports i n my browser, i get the following error message:
The underlying connection was closed: An unexpected error occurred on a receive.
Home
Can anyone help me to solve that?
Note that I'm running iis 5.1 and both reports and reportserver virtual directories exist in my iis.
Cheers
|
|
|
|
|
Hi all,
I would like to delete a record in a SQL database after some time had passed if a certain field in that record has a value of No. For instance I would like to delete a record if the value of the Date field in that record is 5 days passed the timestamp date and the Returns Email field remains No.
How do I do that using the Job Scheduler in SQL? I just thought that if I can use the Job Scheduler instead of writing a stored procedure, it would save time. Thanks in advance.
|
|
|
|
|
The script below should help. Just modify what is required. Job step as you already know will be T-SQL
DECLARE @DaysPassed INT
SELECT @DaysPassed = DATEDIFF(DD,GETDATE() - 5, GETDATE())
IF @DaysPassed = 5
BEGIN
SELECT GETDATE()
END
ELSE
PRINT 'I love Code project'
GO
Cheers
|
|
|
|
|
DELETE
[TableName]
WHERE
[TimeColName] < DATEADD(dd,-5,GETDATE()) AND
[EmailColName] = 'No'
|
|
|
|
|
Want to insert all the Rows of a table in a new table with a renaming activity. Also we have some exceptions that we shouldn't move them.
Renaming Act : Change the char '_' into ' '
Exceptions : Items that if we rename they would be duplicates in the new table.
So all the items there would be unique and renamed version of our previous table.
- Here we don't have any integer ID's,
- The database is SQL Server CE
---
* Our Tables : Product, tblNew
* Each with same columns : "Product", "col1", "col2"
Want to move the records to "tblNew" , our key column that we don't want duplicates is "product"
|
|
|
|
|
so your purpose is to move rows from one table to another
but without duplicates
Your Unique key is Product Ok
Now My question is If duplicate found depending on Product column then which row should replicate
Please provide the logic...
|
|
|
|
|
seems you didn't get the question,
We need to move rows without any duplication.
But From the beginning there is no duplicates, Right ?
During our movement, we want to change a char '_' into ' ',
and this will cause some duplications , ok ?
so we want to avoid this,
How ?
when moving the rows we don't move 'product's which will be a future duplicate after this renaming :
Imagine in our products list we have :
Baby_Doll ( a future duplicate ) and Baby Doll,
we have lots of other Baby_Brush, Baby_toy1 , Baby_toy2 , ...
( These are not future duplicates )
|
|
|
|
|
Use a cursor/while loop, probably easier with a cursor.
get the field to be renamed into a variable
test if it exists in the target
insert or ignore base on the test
Never underestimate the power of human stupidity
RAH
|
|
|
|