Pull Merge Constantly Have All The Same Conflicts

Jun 30, 2007

Hello.



Let me describe first my replication setup:



- SQL Server 2005 SP1 (SP2 coming soon)

- Approximately 35 remote users (Salesrep laptop) using Pull Subscriptions


- Merge (Bi-Directional) (8 articles - tables only)

- Merge (Uni-Directional) (5 articles - tables only)

- Transactional (5 articles - tables only)
Users receive data based on their territory #, therefore they receive their customers sets of data. It happens that customer change from one territory to another but not frequently. When it happens, so far so good, the data is redirected to the new salesrep using the model we configured (Territory table with SUSER_NAME() to filter the data).

Ok, here's my problem. Since a while, I can see in the replication monitor that some users seems to log the same conflict again and again (Merge process). I mean, checking the history for many subscribers, there is always the same number in the "Conflict" colums.
As an example:
- Merge completed after processing 18 data change(s) (4 insert(s), 14 update(s), 0 delete(s), 31 conflict(s))
- Merge completed after processing 27 data change(s) (10 insert(s), 17 update(s), 0 delete(s), 31 conflict(s))
- Merge completed after processing 20 data change(s) (5 insert(s), 15 update(s), 0 delete(s), 31 conflict(s))

and so on...(Those are only 3 historical entries for a single subscriptions but there are many like that, always with the same count of conflict - vary per user). It appears to me that the same conflicts come over and over.

The thing is that if I decide to reinitialize a subscription, conflicts will disappear, therefore I know that it is not a process on the server that keeps changing the data; anyway, even if it was, changes would be applied on the subscription because the server always win in my setup.

Any idea what should I do with this? Any help would be greatly appreciated.
Thanks.

View 3 Replies


ADVERTISEMENT

Conflicts In Merge Replication

Mar 25, 2008

I have set up merge replication between 1 publisher and 9 subscribers (all push subscriptions). Distributor and publisher are located on the same machine.

Although everything seems to work fine from the outside (most of the time), there are a lot of conflicts in the conflict table for the replication. They appear all the time. There are a lot of "download insert failed" conflicts. They always look like in the following three screenshots:
http://www.tronk.be/conflicts/conflict1.JPG
http://www.tronk.be/conflicts/conflict2.JPG
http://www.tronk.be/conflicts/conflict3.JPG

In the same way, there are also many "upload insert failed" conflicts.

In addition to this, there are some "update conflict"s (but a lot less than the other conflicts). Some of them show the same row at both sides:
http://www.tronk.be/conflicts/conflict4.JPG
Others show a different row at the both sides:
http://www.tronk.be/conflicts/conflict5.JPG

The only thing that causes a real problem is the last screenshot, although I don't understand why the other conflicts are there (the inserst statements actually seem to happen anyway, even though there are conflicts). In case of the last screenshot, I can't find any place where an UPDATE actually happens at APP-STB, while I can clearly pinpoint the UPDATE at the other side (which is what actually comes from our program).

One more thing, the system is running on its limits, but all replication seems to be working fine.

I would appriacte any help or comments very much.

View 1 Replies View Related

Conflicts In Merge Replication

Apr 18, 2007



Hi,



I am using SQL Server 2000 Merge Replication. Sometimes when the data is replicated there are conflicts which when examined show it is due to voliation of foreign key constraint. But the data (keys) in already present in the master tables. Is there a way to give an order to the way the tables are replicated. This is so because i think the data in the details table is relpicated first instead of the master table. The conflicts are resolved properly when done using the conflict viewer.

View 6 Replies View Related

Merge Replication - Conflicts With Primary Key

Jul 31, 2007

Hello!

I got a problem with merge replication. I got a central sql server 2005 database on which i got a publication. Also there are 2 sql servers CE which are subscribers to that publication. I need to add some records on both mobile servers indepently but i'm using primary key as a user id in one table.
So when i add a user on one PDA i use next available number in column ID. In the same time I add a user on other PDA with the same ID, because I don't know that there is such user with the same ID.
Ok then I do synchronization. First PDA synchronizes with server but second tells me that there is a record with the same PK. And my question is. Can these be resolved writing a custom resolver or maybe you know others resolutions, because I think that is a typicall problem but couldn't find any solution other than using ie. HOST_NAME() function.

Thanks for help!
MZ

View 1 Replies View Related

Conflicts Consistently Occur On Merge

Aug 15, 2007

Hi,

I was hoping a sharp eye may be able to pick up on what I am doing wrong here, I am i must be making a comon mistake. If necessary I am happy to create and post a sample if necessary.

Problem:
The publication parent table has a filter (defined below) and also has a join filter(defined below) to a child table. When changes are made to the parent and child table and synchronised a conflict is raised. For the child table for some reason the merge agent is saying an explicit update occured at the publisher but the values at the publisher have not changed at all and no sql has been executed to update the publisher rows. This in effect is stopping the changes to the child table being applied until i manually apply them in the conflict resolver. The strange thing is the conflict should not occur in the first place.

Perhaps my SQL server 2005 version? 9.00.2050.00 SP1 Standard Edition

Environment:

SQL Server 2005 - 9.00.2050.00 SP1 Standard Edition
SQL Server Mobile
Detail:


FKs are


FK: Job.JobScheduleID --> JobSchedule.ID

FK: JobDetail.JobID --> Job.ID

All three tables have int based IDs that are auto increment.

Publication Articles:


JobSchedule is download only

Job is Bidirectional, identity range management is MANUAL (only updates occur on this table)

JobDetail is Bidirectional, identity range management is MANUAL (only updates occur on this table)

Filters are of the following form:


Filter Job:




SELECT <published_columns> FROM [dbo].[Job] WHERE convert(nchar,[companyID])=Host_Name() AND [JobCompletedDate] IS NULL AND

( [JobScheduleID] in (SELECT distinct ID from JobSchedule where GETDATE() BETWEEN [JobSchedule].[start] AND [JobSchedule].[end]) )



Join Filter Job --> JobDetail




SELECT <published_columns> FROM [dbo].[Job] INNER JOIN [dbo].[JobDetail] ON [Job].[ID] = [JobDetail].[JobID]
Now the first thing to note with respect to using GetDate() i have read http://msdn2.microsoft.com/en-us/library/ms365153.aspx so i thought that i would remove that portion of the Filter on the Job table just to see what happens.

SELECT <published_columns> FROM [dbo].[Job] WHERE convert(nchar,[companyID])=Host_Name() AND [JobCompletedDate] IS NULL

This still did not resolve the issue. I then Remove the AND [JobCompletedDate] IS NULL and it then started working fine (cool) but of course no longer satisfys the rule i want to create (seriously uncool ).

Any ideas out there ?

Much appreciated,
pdns

View 6 Replies View Related

Handling Autogenerated PK/FK Conflicts In Merge Replication

Aug 14, 2007

We use autogenerated primary keys in most of our tables. Some of these keys are also foreign keys in other tables. Right now there is only 1 database sever at a central location. But now there is a need to have multiple database servers at different locations. Data from these remote sites needs to be replicated to the central server. Some data would also distribute from central server to selected remote sites.

If I could resdesign, I would have choosen something like GUIDs for the primary keys or combination of something like ServerName and AutoGenerated number as a combined key. But that's not possible right now. How do I handle merge replication conflicts in this case?

I am looking for some pointers as to how to handle this case. If it were just simple table with 1 primary key, that would be easy as I can throw the primary key on remote server and let the central server create a new key when data is inserted. But in my case, a single table can be related to 5 or more other tables through these autogenerated keys. Any help is much appreciated.

View 2 Replies View Related

Handling Merge Replication Foreign Key Conflicts

Sep 20, 2007

I have SQL CE clients replicating against a SQL Server 2005 db using merge replication. The DB has a table A and a table B, which has a foreign key to table A. It is common in my application for records in table A to be deleted on the server. I'm running into issues when a table A record has been deleted, but table B records were created on the clients which point to that record. When I sync I get a conflict because the table B records cannot be applied at the server, and the table A delete cannot be applied at the client.

What I would like to happen is to have the table B records on the client be deleted by the merge process, and to create a log of the event. I've looked into creating a business logic handler to do this, but I'm not sure what type of conflict this is (UpdateDeleteConflict or otherwise), and I'm not sure that deleting the table B records is something I can do in the business logic handler.

This seems like it would be a common problem in merge replication. I'm not locked into using a custom business logic handler at all. Any suggestions are welcome.

Thanks.

View 3 Replies View Related

SQL 2012 :: Error In Conflicts Tables In Merge Replication

Feb 13, 2015

There is an error in one of my merge publication. The error is,

The change for the row with article nickname 2336003 (test), rowguidcol {436456F0-F5AD-E411-80CF-5CF3FC1D2D76} could not be applied at the destination. Further information about the failure reason can be found in the conflict logging tables.

When i checked my tables I got following values in rowguid column

publication 436456F0-F5AD-E411-80CF-5CF3FC1D2D76
subscriptionD824D120-23AD-E411-80E3-00155D0E1001
conflict tables 689C6A61-5359-4BB5-BECD-B03F5F94D79A

View 0 Replies View Related

Merge Replication: Missing Rows At Subscriber With No Conflicts

Jul 18, 2007

Hi all,



We are using a mix of SQL 2005 and 2000 servers and our "main" database server is running SQL 2005 x64 (SP2 ver. 3042).



Our system has run perfectly for months, then subsequent to an SP2 update we are seeing several instances where the data record counts are different for several tables among all the servers.



We are using Merge Replication, with no filters and published every 2 minutes.



Any ideas?



TIA,

Michael

View 1 Replies View Related

Weird Conflicts - Merge Replication 2005 -&&> 2000

Aug 3, 2006

Publisher is 2005 x64, subscribers SS2000 (SP3) and SS2005 x64. Pull agents, no filters on subscriptions. We are seeing many seemingly random conflicts on between SS2000 subscriber and publisher. It happens on several different tables.

One table is never editted, only inserts happening everywhere and deletes happening on the SS2000 subscriber. Deletes will sometimes generate conflict. Reason is '"he row was deleted at 'CTS11.CTS' but could not be deleted at 'cts4a.cts'. Unable to synchronize the row because the row was updated by a different process outside of replication." CTS11 is SS2000 subscriber, CTS4A is publisher.

Probably unrelated bug but when looking at conflicts on this same table in SS2005 conflict viewer, get error "ID is neither a DataColumn nor a DataRelation for table summary (System.dATA)" and then "Column ID does not belong to table summary (System.Data)". ID column is rowguid, only unusual thing about table is that it has varchar(8000) field plus some other fields.


Other tables generate conflicts with this reason "The row was updated at 'CTS11.CTS' but could not be updated at 'cts4a.cts'. The merge process was unable to synchronize the row." I enabled verbose logging in the merge agent but the log file didn't contain any further explanation.

This same topology and schema worked fine when all publishers and subscribers were SS2000.

Any insight into how to fix this would be appreciated.





View 9 Replies View Related

False Merge Conflicts - Impact On Conflict Resolver

Oct 12, 2007

I am using SQL 2005 build 9.0.2227

I have a custom conflict resolver - which fires on update conflicts (using row level tracking)

I have had a couple of occasions when the resolver has failed with the following error:

"The schema of the custom Dataset object implemented in the business logic handler does not match the schema of the source Dataset object. Verify that the custom Dataset object has been correctly defined"

In both cases I found that the row for which a conflict was being handled was not a conflict at all. One was a straightforward non conflicting update at the publisher and the other was a similar update at the subscriber.

I got round the problem by temporarily using a fix version of the conflict resolver dll that either set the custom Dataset to the publisher dataset or the subscriber dataset - depending on where the update had occurred.

When the first error (publisher update) occurred - the resolver code was basing the custom dataset on the publisher dataset - which was presumably empty - so I changed the code to base the custom dataset on the subscriber dataset. The second error therefore occurred when the custom dataset was based on the subscriber dataset - which again was presumably empty

Note that the tables involved in each occasion were different and neither table is filtered.

Is there a known bug in this area?

I am considering trying to change the resolver code to identify false conflicts in order to workround the problem - but this would be difficult to test as I can't reproduce the problem

aero1

View 2 Replies View Related

URGENT Merge Replication: Missing Rows At Publisher And Subscriber: No Conflicts

Jun 9, 2006

We have SQL Server 2000 with merge replication at a Publisher and subscriber.

We have some records getting deleted at Publisher and Subscriber and no conflicts are logged.

We have tried the compensate_for_errors setting and this has had no effect.

This is causing serious data corruption and has now become an URGENT issue. Out tech team are almost out of ideas.

Has anyone experienced this or have any ideas as to what to check next?

View 3 Replies View Related

Merge Replication - FTP - PULL Subscription

Dec 18, 2002

Trying to set up Merge Replication using FTP with PULL subscriptions on sql 2000

Are there any issues that anyone is aware of that may affect this working.

View 2 Replies View Related

SQLEXPRESS Merge Pull Subscription

Feb 2, 2007

Hi all I have a question,

I am trying to enable a replication process between a SQL 2005 server and sqlexpress instances and i run into the following problem.

On the publisher a subscription (sp_addmergesubscription) is added for each 'machine' that participates in the replication. Is there a way to get around this?

Because when we distribute the installation we dont know all the machine names. I have made the publication accesible for anynymous access. But when the replication script is installed on the client ,the Error message that the subscription does not exists appears.

The only difference between the instal script for the client is that we do not add a sp_addmergesubscription on the server. Is it possible to let SQL server make an subscription when the client connects for the first time?



To summarize my question: Is there a way to enable the replication with only running a script on the client and not on the server?

If i need to explain it more in detail , just let me know and ill try

View 3 Replies View Related

Merge Subscribers Pull Twice The Amount Of Rows

May 26, 2007

We are running merge replication, SQL Server 2005 Enterprise with SQL Mobile 2005 (Windows Mobile 5) subscribers. Partitions are filtered on HOST_ID.



Ocassionally we experience a situation where a subscriber experiences an unusually long synchronization duration, and upon examining Replication Monitor, it appears that twice the number of rows, or X the number of rows (up to 7 times the number of rows) that should have been inserted are recorded as synchronized for the session: once the normal amount as inserts and once the normal amount as updates. This occurs for all tables in the subscription. This occurs on a first time synchronization to an empty subscriber database where there should be only inserts taking place.



I have examined the snapshot partition folders for these users on the file system and they appear to be identical in size and content as other subscribers. Checking the last partition snapshot job run and other characteristics for the the subscriber in question, everything appears to be the same as other subscribers functioning normally.



The HOST_ID for us is an employee ID used to filter employee specific data. I have seen this happen if the subscriber changes the value for the HOST_ID used in filtering, after the mobile database has already been populated (2 employees attempt to use the same mobile device and database). But, we have seen this happen recently where the HOST_ID was apparantly never changed midstream.



This just started happening recently. The only modification around the same time frame was the implementation of a custom business logic handler/custom conflict resolver that performs like "Latest Wins" but has logic added to update the a last-update datetime column for selected transaction tables at time of synchronization, so that an SSIS job can detect the changed rows for copying incremental database changes to another application database. This all seems to be working perfectly.



Any ideas?



Thanks,

Matt

View 1 Replies View Related

Merge Replication (Pull Subscription) Synchronization With Out Networking

Aug 3, 2006

Hi I want to Set up Such Merge Replication, Which can can Synchronize With out Network, Means Syncronization using CD.

Also When the Network connectivity will be available then it should do synchronization

I wants to transfer some file using CD only those changes to database which hasn't been synchronized, thats why Backup will not work.

Pls Help me, or tell me wether it is possible or not.

Tell me some work around, or ask me details,

You got to help me out, Otherwise I will loss trust in MSDN Forums.

Thanks in advance
Vishalgiri Goswami

View 3 Replies View Related

Complex Push/Pull Merge Replication Question...

Mar 8, 2007

Hiya,

Our current application which uses SQL 2000/CE uses a single Merge publication to populate numerous "read only" tables on the mobile device, and create the schema for a "transactions" table, which will be filled by the mobile device during work, then merged at sync.

Now, the master "transactions" table at the publisher has millions of rows, and the mobile device does not need any of them... so currently we have it "filtering" by a always false clause, so that none of the data is pushed to the client.

The problem with this is that we cannot archive any of the records in the transaction table, as doing so (say, removing 200k rows) would result in the mobile devices (of which there are about 15,000 active in the field) to attempt to reconcile each of those 200k rows when it is next synced, which takes way too long.

Now, what we would like to do is upgrade to SQL 2005/CE 2005, if the new features will allow us a PULL ONLY table in some way? I cannot find how to do this via the wizard, but am sure I am missing something. At least I hope so.

Can anyone give a suggestion?

Thanks!

Dave Borneman

View 2 Replies View Related

Problem Downloading The Snapshot Agent In A Merge Pull Subscription.

Jun 21, 2007

Hello.

I've been having an error when downloading the snapshot agent from our Publisher.

The articles selected are all the tables and all the stored procedures.

The Subscription is created programmatically and so is the synchronization. When trying to synchronize for the first time and when the subscriber tries to download the snapshot I have the following error:




Error messages:
The schema script 'Distrito_2.sch' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The process could not read file 'GESZifuncAFRODITE$SILVITEST_GESZIF_GESZIF20070621182845Distrito_2.sch' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL20143)
Get help: http://help/MSSQL_REPL20143
The system cannot find the path specified.
(Source: MSSQL_REPL, Error number: MSSQL_REPL3)
Get help: http://help/MSSQL_REPL3



The snapshot folder is at c:GESZifSnapshotFolder and the unc is \AfroditeSnapshot.

I'm getting a little desperate with this because we really need to propagate the schema changes around the subscribers.

Thanks in advance,

AVD

View 4 Replies View Related

HOW To Pull Merge Subscriptions In SQL Server 2000 Using Stored Procedures ??? (URGENT)

Dec 15, 2005

I've successfully carried out pull subscription using Wizard in SQL server 2000.

But NOW its the time to deploy the project & I've to do it programatically........

i tried to use the default stored procedures like "sp_addmergepullsubscription ", "sp_addmergepullsubscription_agent  ", "sp_reinitmergepullsubscription ", with respective parameters.

Then using replmerge.exe i tried to execute the batch file But could not succeed......

Can anyone guide me from the Basics ??? (i knw the Replication Architecture its heirarchy....but have NO idea of performing it Programatically......!!!!!!!!)

by BASICS, i mean......how should i execute the resp. stored procedures with what parametes & the order i should follow in order to successfully pull a merge subscription in SQL server 2000.

 

if a Sample code is mentioned as example, would be better for me to understand....

 

Thanking all of you in anticipation...........

 

Mandar

 

View 1 Replies View Related

How To Pull Existing Table From Database And Merge Into New Database

Apr 17, 2012

I am new to sql and my boss want me to write the program for database and he wants to pull the info from existing table from sql server which is used by Microsoft GP Dynamics and write me code or some kind of front end so when he wants he can pull same data from GP dynamics table and generate some report with other custom table.

How i can do this task? What I have to do in sql so I can use same table to view info in real time so that means if i enter new data in the table it will show up same time in the front end as well.

View 4 Replies View Related

RDA Pull Problem: Command=PULL Hr=80040E4D Login Failed For User 'test'

Apr 25, 2007

Hi all,

I have following problem:

I'm developing a Windows Mobile application, which is using RDA Pull for retrieving data from SQL Server 2005 database to PDA. Please, see the example:






Code Snippet

using (SqlCeEngine engine = new SqlCeEngine(connStr))

{

engine.CreateDatabase();

}

serverConnStr="Provider=SQLOLEDB;Data Source=.;User ID=sa;Initial Catalog=Demo;Password=xxx";

using (SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess(

Configuration.Default.SyncServerAddress, "", "", connStr))

{

rda.Pull("MyTable", "SELECT * FROM mytable", serverConnStr, RdaTrackOption.TrackingOffWithIndexes, "ErrorTable");

}





Everythink works fine, when I use 'sa' user account in serverConnStr.

But, when I change conn string to:

"Provider=SQLOLEDB;Data Source=.;User ID=test;Initial Catalog=Demo;Password=test"

the sqlcesa30.dll cannot connect to SQL Server database.

In the sqlcesa30.log then I found following line:




Code Snippet

2007/04/17 10:43:31 Thread=1EE30 RSCB=16 Command=PULL Hr=80040E4D Login failed for user 'test'. 18456



The user 'test' is member of db_owner, db_datareader and public roles for the Demo database and in SQL Server Management Studio I'm able to login to the Demo database with using the 'test' users credentials and I'm able to run the select command on 'mytable'.



So, what's wrong? Why the sqlcesa30.dll process cannot login to the Demo database, and from another application with using the SAME connection string it works?



Please help.



Thank you.

Fipil.



View 10 Replies View Related

Is It Common To Have CPU Usage At 50% Constantly.

Jul 19, 2007

The comapny i work for has a server running the following.

Opteron 246x2

2 Gig memory

320 Gig Sata 2 drives

Windows 2003 Standard Edition

SQL Server 2005 Express Edition. The Free one.

There are approx 10 users that connect to the server.

There are two programs which seem to use sql server. Act 7.0 and service ceo.



When the computer is rebooted its at 0% for sqlserver.exe

Than when all connect it maxes it 50% and its steady there. Seems Service ceo affects it the most.

Told by comapny need to buy full blown sql server to resolve problem. But i dont think this is the problem.



Questions: Is it common for server to be at 50% all the time with sql server running?

And if its not is there a way to reduce the sql cpu usage.



I am new to sql server and have done alot of research and fixes. Ive unsitalled and reinstalled all sql instances and done the tweaks suggested. Any fresh ideas would be great thanks.



John



View 3 Replies View Related

Connection Pools Constantly Grow

Oct 26, 2006

I've got a little console app that basically pulls back a recordset from our SQL Server 2005, goes through each row in the dataset and may/may not insert a record into a different table in the database.  We use sproc's for every transaction and I close every connection in the application.  However, when the application ends, I still show connection pools open in the performance monitor.  Same with websites that I know have no traffic or that have been stopped by me in IIS.Last night I showed a total of 6000+ "Current # pooled and nonpooled connections".  Should I be worried about what seems to be unending growth in the connection pools?  If so, how can I look to manage this better? 

View 2 Replies View Related

Procedure Has No Parameters Error Constantly

Jun 15, 2007

Hi, I've been trying to figure out this error message I'm getting.  The exact error message is: " Procedure addservicerequest has no parameters and arguments were supplied." and this is applied to a SQL Command, but what confuses me is that I've got parameters already created and added.  Is there any advice to help me out with this problem? Here's the code for reference: 1 Dim sqlparadate As New sqlparameter2 Dim sqlparacompany As New SqlParameter3 Dim sqlparalocation As New SqlParameter4 Dim sqlparacontact As New SqlParameter5 Dim sqlparaphone As New SqlParameter6 Dim sqlparadetails As New SqlParameter7 Dim sqlparaso As New SqlParameter8 Dim sqlparadrive As New SqlParameter9 Dim sqlparawork As New SqlParameter10 Dim sqlparaback As New SqlParameter11 Dim sqlparaproblem As New SqlParameter12
13 Dim sqlcon As New SqlConnection14 Dim sqlinsert As New SqlCommand("addservicerequest", sqlcon)15
16 'txttest.Text = caldateofservice.SelectedDate
17 If sqlcon.State = Data.ConnectionState.Closed Then
18 sqlcon.ConnectionString = "***"
19 sqlcon.Open()20 End If
21
22 sqlinsert.CommandType = Data.CommandType.StoredProcedure23 'sqlinsert.CommandText = "addservicerequest"24 'sqlinsert.Connection = sqlcon
25
26 With sqlparadate27 .SqlDbType = Data.SqlDbType.SmallDateTime28 .Direction = Data.ParameterDirection.Input29 .ParameterName = "@dateofservice"
30 .Value = caldateofservice.SelectedDate.ToString31 End With
32 sqlinsert.Parameters.Add(sqlparadate)33
34 With sqlparacompany35 .SqlDbType = Data.SqlDbType.NVarChar36 .Direction = Data.ParameterDirection.Input37 .ParameterName = "@company"
38 .Value = txtcompany.Text39 End With
40 sqlinsert.Parameters.Add(sqlparacompany)41
42 With sqlparalocation43 .SqlDbType = Data.SqlDbType.NVarChar44 .Direction = Data.ParameterDirection.Input45 .ParameterName = "@location"
46 .Value = txtlocation.Text47 End With
48 sqlinsert.Parameters.Add(sqlparalocation)49
50 With sqlparacontact51 .SqlDbType = Data.SqlDbType.NVarChar52 .Direction = Data.ParameterDirection.Input53 .ParameterName = "@contactname"
54 .Value = txtcontactname.Text55 End With
56 sqlinsert.Parameters.Add(sqlparacontact)57
58 With sqlparaphone59 .SqlDbType = Data.SqlDbType.NVarChar60 .Direction = Data.ParameterDirection.Input61 .ParameterName = "@contactphone"
62 .Value = txtcontactphone.Text63 End With
64 sqlinsert.Parameters.Add(sqlparaphone)65
66 With sqlparadetails67 .SqlDbType = Data.SqlDbType.NVarChar68 .Direction = Data.ParameterDirection.Input69 .ParameterName = "@details"
70 If ddldetails.SelectedValue = "Other" Then
71 .Value = txtreason.Text72 Else
73 .Value = ddldetails.SelectedValue74 End If75 End With
76 sqlinsert.Parameters.Add(sqlparadetails)77
78 With sqlparaso79 .SqlDbType = Data.SqlDbType.NVarChar80 .Direction = Data.ParameterDirection.Input81 .ParameterName = "@serviceorder"
82 .Value = txtserviceorder.Text83 End With
84 sqlinsert.Parameters.Add(sqlparaso)85
86 With sqlparadrive87 .SqlDbType = Data.SqlDbType.NVarChar88 .Direction = Data.ParameterDirection.Input89 .ParameterName = "@drivetime"
90 .Value = ddldrivetime.SelectedValue91 End With
92 sqlinsert.Parameters.Add(sqlparadrive)93
94 With sqlparawork95 .SqlDbType = Data.SqlDbType.NVarChar96 .Direction = Data.ParameterDirection.Input97 .ParameterName = "@worktime"
98 .Value = ddlworktime.SelectedValue99 End With
100 sqlinsert.Parameters.Add(sqlparawork)101
102 With sqlparaback103 .SqlDbType = Data.SqlDbType.NVarChar104 .Direction = Data.ParameterDirection.Input105 .ParameterName = "@backhome"
106 .Value = ddlbackhome.SelectedValue107 End With
108 sqlinsert.Parameters.Add(sqlparaback)109
110 With sqlparaproblem111 .SqlDbType = Data.SqlDbType.NVarChar112 .Direction = Data.ParameterDirection.Input113 .ParameterName = "@typeproblem"
114 .Value = ddlproblem.SelectedValue115 End With
116 sqlinsert.Parameters.Add(sqlparaproblem)117
118 sqlinsert.ExecuteNonQuery()119
120 sqlcon.Close() Specifically it occurs on line 118. Thanks 

View 5 Replies View Related

MSDB - Tasks Fail Constantly - Please HELP!

Jun 21, 2000

Hello:

In my production environment, ALL OF THE SUDDEN, my backups via EM schedule tasks, fail, yet when i examine the error, it says that the DUMP/LOAD was successful. I receive the following error:
'Could not insert a backup or restore history/detail record in msdb.dbo.sysbackuphistory or sysrestore history. This may indicate a problem with the msdb.. . . . . .
I expanded the MSDB database, and ran sp_purgehistory (no params) and it still FAILS. Is this related to the log? Please HELP asap. Thank you in advance.

View 2 Replies View Related

SQL 2012 :: Trigger Or Agent Job To Run SP Constantly?

Aug 22, 2014

I have a database with a table called RAW, this table receives msgs via XML, sms and various other formats. The data is written into this table at a rate of approximately 50-100 rows per minute.

I have a SP which takes the data written into the raw table and performs various actions looks for account information, writes to a log table, writes to incident table’s gets GPS information and so on.

The records written into the raw table need to be processed at almost instantly with a maximum of under a minute from when they arrive into the table.

At present there is a sql agent job which executes the SP, this consist of a step to execute the SP which on completion moves to the next step which is a loop waitfor delay and then back to step 1.

The trouble is it never actually finishes and runs 24/7 there is no break point for error handling and occasionally the records that arrive in the raw table do not get processed and the job has to be restarted for it to pick them up again.

I am looking for best way to handle this process, I thought about a trigger but the performance impact on using a trigger was too heavy to consider.

View 2 Replies View Related

Received Message Constantly Processed.

May 21, 2007

Hello,

when is seemd that everything works some weird behaviours comes out.


I try to summarize the problem without to post the complete code.

Service Broker is set to have a dialog between two databases on the same SQL Server instance.



The Initiator queue has retention=on and there is an activation SP to handle errors and Target's end dialog message.

The Target queue has retention=off, MAX_READER =1 and there is an activation SP to receive the message (WAIT FOR (RECEIVE (1) ...), TIMEOUT 30000 and do something with this message (sample insert into a DB).



The conversation has a Timeout Dialog to end the dialog after a while.


The problem that the message is constantly processed. The Process doens't stop is I end the dialof after the processing either.

n.b.the Receive is within a Transation that I commit at the end.



some other informations that in the meanwhile I found out :

This was my complete WAIT FOR(RECEIVE :

WAITFOR ( RECEIVE top(1) -- just handle one message at a time
@message_type=message_type_id, --the type of message received
@messagetypename=message_type_name,
@message_body=message_body, -- the message contents
@dialog = conversation_handle -- the identifier of the dialog this message was received on
FROM [TargetQueue]
), timeout 1000;

if (@@ROWCOUNT = 0)
BEGIN
COMMIT;
BREAK;
END

IF I delet TIMEOUT 1000, everything works as expected ...
Inside if (@@ROWCOUNT = 0)BEGIN..END I wrote also an Insert into a table to see wheter the end of the queue was reached but this insert never occurs (neither with not without timeout)
I'm happy that it works what if this is the solution, it make no sense to me!

Any ideas?
Thank you!


M.B.





Thank you very much

M.B.

View 9 Replies View Related

SQL 2012 :: Constantly Growing Version Store

Jul 7, 2015

We have an issue with the Version Store growing constantly. According to sys.dm_os_performance_counters, "Version Generation rate (KB/s)" is growing, but "Version Cleanup rate (KB/s)" isn't. We use read-committed snapshot isolation

While dbcc opentran and sys.dm_exec_requests don't show any long running transactions, I wrote a query looking at sys.dm_tran_ active_snapshot_ database_transactions. This shows a number of long running transactions but, according to sys.dm_exec_sessions, they are all sleeping. The transactions that are running come and go very quickly, as I would expect.Could these sleeping transactions be responsible for preventing the version store from cleaning up?

View 2 Replies View Related

Why Is SQL 2000 Constantly Logging Starting Up Database Messages?

Nov 21, 2001

The log for our SQL 2000 database shows constant "starting up database dbname" entires. Is there a option that causes the databases to constantly be starting or is this a new feature of SQL 2000.

View 1 Replies View Related

Our Report Servers Are Constantly Getting The Symmetric Key Error - Why Does This Happen.

Feb 6, 2007

Our report server are constantly getting the below error.

What causes this - I know how to fix it, in fact, I've automated it but why does it constantly happen on some servers? I guess I'd like to know what causes it to try and fix it at those points instead of having to fix it here. Proactively.



Reporting Services Error



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) (rsRPCError) Get Online Help



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)



Bad Data. (Exception from HRESULT: 0x800900



Why

View 3 Replies View Related

Package Attempts To Query Source Db Constantly When Editing

Aug 16, 2006

Trying to set up a tranform task between a mysql db using and ADO.NET connection and sql server.
My query to pull from the mysql db is something like "select x,y,z from table where last_updated" > @User::LastUpdated. This command is set up as an expression for the Data Flow Task and is the value for the [DataReader Source].[SqlCommand]

I have two questions.

Why does the package attempt a query against the mysql database all the time?
And Why is the query attempting to pull the entire table instead of having any regards for my where clause?

I've even added where last_updated > greatest('2006-08-15', '" + @User::LastUpdated to attempt to get it a where clause even when the parameter isn't set yet.

What is the trick? This is not feasible when pulling from multi-million row tables.

View 2 Replies View Related

From The Sql Profiler Constantly Displays Exec Sp_executesql N'BEGIN CONVERSATION TIMER ... It That Ok?

Mar 8, 2007

Hello,
I'm using SQL service Broker 2005 with ASP.NET 2.0 in order to use the sql cache dependency.
everything works fine...
I have only a doubt regarding a query that is constantly executed on mu db ( i can see it be means of the SQL Profiler)

The query is:
exec sp_executesql N'BEGIN CONVERSATION TIMER ("'') TIMEOUT = 120; WAITFOR(RECEIVE TOP (1) message_type_name, conversation_handle,
cast(message_body AS XML) as message_body from [SqlQueryNotificationService-GUID]), TIMEOUT @p2;',N'@p2 int',@p2=60000

The web application is not running from a browser ...

It this ok or I forget to clean/reset something from my web application and/or sql server?

Thank you

Marina B.





View 3 Replies View Related

Conflicts

Mar 28, 2007

What are conflicts from MERGE replication point of view?

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

View 1 Replies View Related







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