Replication Fails When Table Name Has Single Hyphen
Dec 7, 2006
Hey,
I have SQL Server 2000 DB that was converted via DTS from Acccess 97. Replication fails for any table with a single hypen in the table name. If I copy one of these tables to a name using an underscore rather than a hyphen, then it replicates successfully.
Below are errror messags from agent with -Outputverboselevel set to 2. I have also seen 'Agent error code 20082', in which case the replication command is incomplete.
Any ideas?
Thanks,
Bill Coulter
[12/7/2006 1:22:40 PM]172.23.150.51.engdata: {CALL sp_MSupd_br1-16 (NULL,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,?,0x0200020000)}
Parameterized values for above command(s): {{N'00000000001010000100', N'000000000000000000', N'730535L1205C'}}
Agent message code 20046. Syntax error or access violation
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_distribution_history(57, 6, ?, ?, 27, 27, 2.32, 0x01, 1, ?, 1, 0x00, 0x01)}
Adding alert to msdb..sysreplicationalerts: ErrorId = 18,
Transaction Seqno = 0000108b000028f2000400000000, Command ID = 1
Message: Replication-Replication Distribution Subsystem: agent OUSBID02-engdata-172.23.150.51-57 failed. Syntax error or access violation[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_alert(3, 57, 18, 14151, ?, 1, N'OUSBID02', N'engdata', N'172.23.150.51', N'engdata', ?)}
ErrorId = 18, SourceTypeId = 1
ErrorCode = ''
ErrorText = '{CALL sp_MSupd_br1-16 (NULL,N'00000000001010000100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'000000000000000000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'730535L1205C',0x0200020000)} '
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_error(18, 0, 1, ?, N'', ?)}
Category:COMMAND
Source: Failed Command
Number:
Message: {CALL sp_MSupd_br1-16 (NULL,N'00000000001010000100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'000000000000000000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'730535L1205C',0x0200020000)}
ErrorId = 18, SourceTypeId = 4
ErrorCode = '37000'
ErrorText = 'Syntax error or access violation'
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_error(18, 0, 4, ?, N'37000', ?)}
Category:ODBC
Source: xxx.xx.xx.xx
Number: 37000
Message: Syntax error or access violation
View 8 Replies
ADVERTISEMENT
Apr 24, 2015
We have an issue where we are trying to replicate a DB using SQL replication, the Replication Monitor reports an error:
Cannot TRUNCATE TABLE 'dbo.xxx' because it is being referenced by object 'View_xxx'.
Although I am the DBA, I do not have an inside knowledge of this particular DB.
View 2 Replies
View Related
Mar 29, 2001
I get a timeout expired error when running the following in a vb component.
'update cm_event_notification Set processed = '3/29/01 9:46:01 AM' Where dn = '{2E738808-23B4-11D5-B49A-00508BD934F8}'
The table dn column is a primary key, when I run it from sql Anyalzer it works. If there are two rows to update it works, just the single row update times out!
Thanks in Advance,
Phillip M. Tricoli
View 1 Replies
View Related
Nov 8, 2006
Hi
I've created a simple package that contains only one task that is an execute sql task. When I run only this single task from Business Intelligence development studio it runs successfully. But when I run the whole package (also from Business intlligence studio), the package fails.
The data source I access is ODBC. I'm sure the real reason for the error is the bad ODBC driver of the data source but this can't be changed. So I need to know what is different from running only a task in a package to running the whole package. If I knew that I might be able to adjust some setting and make it work.
Any help welcome.
View 4 Replies
View Related
Nov 6, 2015
I created a simple SQL Task in SSIS.
Connection is ADO.Net
SQL Statement is SELECT 10 AS NumberVar
ResultSet is set to single row
But when executing task I always get error message:
[Task 'SQL ausführen'] Fehler: Die zurückgegebene Anzahl von Ergebnisbindungen ist für 'ResultSetType' ungültig: 'ResultSetType_SingleRow'.
In English something like returned number of bindings is not valid.
View 3 Replies
View Related
Apr 4, 2006
How can i combine my data in single row ? All data are in a single table sorted as employeeno, date
Code:
Employee No Date SALARY
1 10/30/2006 500
1 11/30/2006 1000
2 10/25/2006 800
3 10/26/2006 900
4 10/28/2006 1000
4 11/01/2006 8000
Should Appear
Code:
EmployeeNo Date1 OLDSALARY Date2 NEWSALARY
1 10/30/2006 500 11/30/2006 1000
2 10/25/2006 800
3 10/26/2006 900
4 10/28/2006 1000 11/01/2006 800
PLEASE HELP I REALLY NEED THE RIGHT QUERY FOR THIS OUTPUT.
THANKS IN ADVANCE
View 3 Replies
View Related
Mar 12, 2008
If a Select is done on a column whose data type is nvarchar(16) and contains only numerals (UPC numbers) the select does not return the record.
1. Query with numerals in nvarchar column works as long as multiple records are returned (LIKE '012%')
2. Numeric (INT only one tested) columns works as expected
3. String columns with alpha data works as expected
4. Problem only exist when running in Device Emulator and/or actual device.
5. Same test on desktop app runs as expected.
6. Windows Mobile 6, Vista Ultimate
7. Same results when when connection to device from SSMS
8. SQL Servers comes on
Previous thread discussion of this problem (I thought that Parameters corrected problem, but not in all cases???)
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.ce&mid=0cd9cd3a-f9b0-477f-b1e7-c27eb76158ae
Here is the complete code:
SqlCeConnection _conn = null;
_conn = new SqlCeConnection(@"Data Source=program FilesTestResultSetevsoft.sdf;");
_conn.Open();
// DOES NOT WORK *** This statement does not return the record (it exist)
string _sql = "SELECT * FROM Product where RegDescr='0123456' ";
// works correctly
string _sql = "SELECT * FROM PRODUCT where ProdNum = 6523 ";
// works correctly *** as long as multiple records are returned
string _sql = "SELECT * FROM PRODUCT where RegDescr LIKE '01%' ";
// works correctly
string _sql = "SELECT * FROM PRODUCT where RegDescr='BACARDI SILVER RAZZ'";
SqlCeCommand _cmd = _conn.CreateCommand();
SqlCeDataReader _rdr;
_cmd.CommandText = _sql;
_cmd.CommandType = CommandType.Text;
// Same results using ExecuteResultSet or ExecuteReader
//_rdr = _cmd.ExecuteResultSet(ResultSetOptions.Scrollable | ResultSetOptions.Updatable);
_rdr = _cmd.ExecuteReader();
listBox1.Items.Add("In the while loop");
while (_rdr.Read())
{
listBox1.Items.Add(_rdr.GetValue(1) + " / " + _rdr.GetValue(3));
}
listBox1.Items.Add("Done");
View 1 Replies
View Related
Aug 24, 2001
I am new to SQL.
But here is my question. I have a column 'name' and contents are like
A-B, C-D, E-F
When I query DB using, SQL
select * from tbl_Names
where name='C-D'
it does not display anything...
What am I doing wrong?
View 1 Replies
View Related
Dec 30, 1999
Does anybody knows a workaround to register SQLServer with the name which contains hyphen('-') character in it? I work for multi-national company & they have naming standard for NT servers & this server has hyphen in it.
Also site server guru here thinks that server name change option is not feasible. Please help.
View 1 Replies
View Related
Oct 14, 2003
We are about to name a new SQL Server and was wondering if anybody has any documentation/knowledge that states one should avaoid using hyphens when naming Servers, objects, etc in SQL.
I have always heard its bad practise, but have not found any solid documentation. For example, I know that the 'connect to' statement does not like hyphens, but what about a SQL Server name on the network ?
Thanks
View 2 Replies
View Related
Aug 30, 2007
Try to do a snapshot replication. The field type on Publishier is char(1) and on Subscriber is varchar(1). The replication fails.
Getting the following error:
Error messages:
The process could not bulk copy into table '"GRS"."GRS_IMG_NAMES"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
Data conversion failed
To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below. Consult the BOL for more information on the bcp utility and its supported options. (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253
bcp "OneACS"."GRS"."GRS_IMG_NAMES" in "D:Microsoft SQL ServerMSSQLReplDatauncUSER-001_MA_HAMPSHIRE_MA_HAMPSHIRE20070829173640GRS_IMG_NAMES_2#1.bcp" -e "errorfile" -t"<x$3>" -r"<,@g>" -m10000 -SUSER-001 -T -w (Source: MSSQLServer, Error number: 20253)
Does anybody know if I can do that or structures have to be same?
Thanks in advance
TH
View 2 Replies
View Related
Jun 22, 2004
Hi,
1- I have given a dbo permission on a database named F12345-1, now I want to create a job on that server using this database.
2- I tried to create the first step in the new job but I don’t see my database name on the databases drop down menu (I only see the system databases)
3- I tried being under Master and using the USE sql command (Ex: Use F12345-1) at the beginning of my step but I get a message saying that the database F12345 doesn’t exist (The message doesn’t say the whole database name only the part before the hyphen)
4- I tried putting quotes around the database name with no luck, although that worked in SQL Query Analyzer but the Job didn’t like it.
Can you please help with this, knowing that I have no control on the database name (In order to remove the hyphen from the name which I am assuming is the cause of this problem)
Thanks
View 3 Replies
View Related
Jun 3, 2008
I am trying to correctly configure a very small replication - one table - between two test machines. Publisher is Windows server 2000. Subscriber is Windows server 2003. Both machines run SQL Server 2005 Enterprise Edition, SP 2 has been applied. I have created an alias from Publisher to Subscriber. In SSMS, I am able to connect to both pub and sub databases (sub is Northwind, by the way).
I was receiving Error 18456, State 11; now I'm reverting back to state 5, which indicates an invalid userid.
HOW do I set appropriate userid for replication? I have established identical id and password on both machines - the only difference between the IDs is the machine name. However, the ID I wish to use is NOT the ID that I use to log onto the publisher computer. This userid is inserted because I'm using Windows Authentication, and I cannot find any means to override it. So I set up the same ID on the publisher, but it doesn't matter what ID I use. I only have TCP/IP turned on because these machines are on different networks, and neither machine is joined to a domain. The alias uses the IP address (but we know that works because I have connectivity under SSMS).
Where can I turn and how do I get this done? I've been struggling with this for 3 weeks, and I'm still not convinced I'm asking the right question.
View 1 Replies
View Related
Apr 16, 2007
I am not extremely familiar with SQL Server replication, but I am trying to perform trans replication to a secondary SQL 2000 Enterprise server. The destination server has a full copy of the database, so I assumed I could do this fairly easily. Below is the error that is generated after I start the distributor agent.
Cannot drop index 'cndx_PrimaryKey_DocumentIndex' because it enforces the full-text key for table 'DocumentIndex'.
What are the best practices for SQL Server replication?
View 3 Replies
View Related
Dec 14, 2006
Anyone know what's the MS-SQL function that look at the zipcode like "30296-6912" and chop off the "-6912" suffix by just looking at the hyphen part?
Thanks...
View 6 Replies
View Related
Sep 24, 2007
Hi,
I'm using the following SQL script to return a list of part number and the order is not what I expect. Perhaps this is a collation problem but I have no idea where to look to modify that.
Thanks in advance, John
select part from transactions T where (T.transdate between '20070701' and '20070705') and
(T.transtype = 'ISSU' or T.transtype = 'RTRN') order by part
Here is the beginning of the Transactions table create script
CREATE TABLE [Transactions] (
[RecNo] [int] IDENTITY (1,1) NOT NULL,
[Part] [nvarchar] (30) NOT NULL ,
[TransDate] [nvarchar] (8) NOT NULL ,
[TransType] [nvarchar] (4) NOT NULL ,
[FromLoc] [nvarchar] (10) ,
The 'Part' column is an alphanumeric field. The problem I am having is that the
Order By seems to ignore the hyphen character '-' when the returned rows
are ordered by the Part (which can contain hyphens in any column).
Here is an example of what I get.
130909N9
130909N9
130909N9
1-480698-0 * These two should not be here
1-480699-0 *
15-423
164-07700
164-07700
164-07700
1683
I was expecting this ( and I get this in and older database ).
068-03000
068-03000
06A19956
074-03200
077-367-0
08DU08
1-480698-0 * These should be here eariler in the data
1-480699-0
100-364072
100-364072
View 3 Replies
View Related
Oct 18, 2007
Hi Guys,
I've got a merge replication set up between boxes. They're on separate sites both behind an ADSL Nat modem router. The publisher connects to the subscriber via a port forward / Nat translation at the router. This replication set up has been running for some months now. This morning I got this failure message from the merge agent on the publisher.
"the specified remote server name may not be the network name of the remote server or the remote server is unreachable due to network problems. The step failed"
Currently the Enterprise Mgr at the publisher can see the subscriber as can query analyzer running on the publisher.
The host name of the subscriber is the same name used in the server registration at the publisher. The registration uses a Client Network Utility alias to resolve the name.
If I run a ping command at the publisher using the subscribers name I get replies (the resolution of that name is done via a hosts file entry)
Both machines are Win2k Server boxes running SQL Server 2000 Standard.
Any ideas why the agent can't see the subscriber despite the fact its usual communications channel is working just fine?
View 1 Replies
View Related
May 26, 2006
We have two servers using merge replication. I have updated one with SP1 and not the other (yet). Replication fails to work after the upgrade. I get the following error message:
Date 5/26/2006 2:09:08 AM
Log Job History (BB-CM1-SRV1-CountAndCrush-New Sync for Crusher-CC-SQLSRV-6)
Step ID 2
Server BB-CM1-SRV1
Job Name BB-CM1-SRV1-CountAndCrush-New Sync for Crusher-CC-SQLSRV-6
Step Name Run agent.
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
2006-05-26 06:09:08.316 Category:NULL
Source: Merge Replication Provider
Number: -2147199417
Message: The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation. If a republishing Subscriber has run out of identity ranges, synchronize the republishing Subscriber to obtain more identity ranges before restarting the synchronization. If a Publisher runs out of identit
2006-05-26 06:09:08.316 Category:SQLSERVER
Source: BB-CM1-SRV1
Number: 20663
Message: The publisher's identity range allocation entry could not be found in MSmerge_identity_range table.
View 3 Replies
View Related
Jun 13, 2007
We are using 2000 replication in a fairly basic way. To push tables etc outside our firewall to the webserver, to keep that data current (each night). So the server within the firewall is the Publisher and the external web server is the pushed subscriber.
The problem we have is that sometimes when the link becomes sluggish, the snapshot replication fails. Usually a Error 13, Network error.
The trouble is, by that time it has already cleared the table on the subscriber, but never managed to push up it's new replacement data.
Is this how it works? I was wondering if there was a different approach we could take, perhaps something the equivalent of wrapping it within a transaction, so it would rollback if it fails?
Thanks,
David.
View 3 Replies
View Related
Sep 13, 2004
I have a colum of numbers, which datatype is nvarchar;
157853
4389
1999999999556
4568987
I need to insert a hyphen, 3 spaces from the right (to left) My numbers would look like this:
157-853
4-389
1999999999-556
4568-987
...do I use the rtrim function ?...what would the syntax look like ?
Thank you
View 3 Replies
View Related
Mar 5, 2007
I had a multi publisher single subscriber replication in my job and now i want remove it. i disabled the subscriber. Now if i disable the publisher and distributor then it gives me a error cannot drop the distribution DB because it is currently in use. this DB can never be dropped since there is at least one publisher at one time that accesses this DB everytime. How should I disable this publication.
View 1 Replies
View Related
May 5, 1999
I have a SQL server scheduled to replication. This works fine if it has to do that one the sever on the same mechine. If it has to be done to another server, the replication fails with the following error message.
08001[Microsoft][ODBC SQL Server Driver][dbnmpntw]Connectionopen(Createfile())
Does any one know how to fix this.
Any help will be appreciated.
Thank you.
View 1 Replies
View Related
Jun 7, 1999
I have a publication that has been working great for over eight months. I have on occassion had to stop publishing and stop subscribing in normal operation without problems.
Yesterday, I ran into a problem that I am not sure how to solve.
I keep getting a distribution task failure "Violation of Primary Key constraint 'aaaashipm_pk'. Attempt to insert duplicate key in object shipm failed while bulk copying into shipm
Anyone run across this or have any suggestions -- do I have a transaction log problem, distribution data base/log problem. I have checked the identity column to make sure its not out of sync, run a check on the table to make sure its not corrupted. I have a couple of other things I am trying but was curious if anyone else had come across this?
Will let you know if I find a solution but it doesn't look good.
View 1 Replies
View Related
Jul 20, 2005
Hi,I am having a problem with a replication over a Modem-Connection,which works fine over LAN. Has anyone experienced this problem before?Settings are:2 SQL Servers 2000, SP3on Windows 2000Publischer Database ist about 3GB, Subscriber DB about 1,5GBPublisher and Subscriber are connected via 56Kbit Dial-Up--> The Replication worked fine now this way for about 6 Months now!overall the publisher has about 20 Subscribers all connected viadial-up and they all work fine.Behavior now is like this:- Dial Up works fine- Synch starts- Synch takes some time (Upload works fine)- Synch fails- Error Message(german):Der Prozess konnte die Zeilenmetadaten auf 'Subscriber' nichtabfragen.{call sp_MSgetmetadatabatch(?,?,?)}Allgemeiner Netzwerkfehler. Weitere Informationen finden Sie in derDokumentation über Netzwerke.Der Prozess wurde erfolgreich beendet.If I connect the Subscriber-Server directly to the publisher servervia LAN it all works fine.My thesis is, that there might be some kind of "timeout" or something,as it cant be the dial-up network, because we tried different modemsand different server locations. And it all works fine on most of theother connedted subscribers. Only 2 other very big subscribersexperience the same problem, therefore i assume it could havesomething to to with slow connection speed, timeouts and an inabilityof the SQL server to handle this.Anyone seen this before? Anyone can help me?Thanks and Best Regards,Gerd
View 1 Replies
View Related
Sep 11, 2007
Hi
We're having problems with push replication to multihomed clients. if the DNS contains multiple IP's and one of those are not reachable from the sql server. the replication fails. no matter order of IP adresses. i wrote a DNS proxy which re-ordered the IP's so that the "working" IP would come first in the list but no success until i filtered out so that the DNS proxy only replied with one, the working, IP.
the replication is part of a commercial application which we have no control over. are there any settings on the server side that can help here? I really want to fix the source of the problem and not patch it with a proxy.
any ideas are welcome. the server is sql 2005 standard and the clients are running 2005 express
Rgds
View 1 Replies
View Related
Jun 7, 2007
I have a Merge publication that has multiple subscribers. They are all SQL Express, so it's all Push Subscriptions.
When I try to add a subscriber by it's IP address, the snapshot gets delivered. Schema created, data loaded, but I see the following error in Replication Monitor:
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Cannot find the object 'MSmerge_ctsv_E0801EECCA824BB29D48D36D64D2BAEA', because it does not exist or you do not have permission. (Source: MSSQLServer, Error number: 15151)
When I change the IP address in the script to the name of the machine it works perfectly. The ONLY thing I changed in the script was the IP address to the name.
The reason for this is that I have several client machines that will have connectivity, but NO name resolution back at the Server.
Please, Please, Please help!
Sample follows:
Code Snippet
exec sp_addmergesubscription
@publication = N'TestPub',
@subscriber = N'10.126.22.30',
@subscriber_db = N'dbTest',
@subscription_type = N'Push',
@sync_type = N'Automatic',
@subscriber_type = N'Local',
@subscription_priority = 0,
@description = null,
@use_interactive_resolver = N'False'
exec sp_addmergepushsubscription_agent
@publication = N'TestPub',
@subscriber = N'10.126.22.30',
@subscriber_db = N'dbTest',
@job_login = null, @job_password = null,
@subscriber_security_mode = 0,
@subscriber_login = N'Valid SQL LOGIN',
@subscriber_password = N'ValidPassword',
@publisher_security_mode = 1,
@frequency_type = 64,
@frequency_interval = 0,
@frequency_relative_interval = 0,
@frequency_recurrence_factor = 0,
@frequency_subday = 0,
@frequency_subday_interval = 0,
@active_start_time_of_day = 0,
@active_end_time_of_day = 235959,
@active_start_date = 20070607,
@active_end_date = 99991231,
@enabled_for_syncmgr = N'False'
View 3 Replies
View Related
Oct 19, 2015
I am having a field 'Flight Route that holds hyphen delimited character sequences.
E.g. : ABC-BCD-DEF-EFG.
My requirement is like this:
If the flight route is:
ABC-BCD-BCD-DEF make it ABC-BCD-DEF
ABC-ABC-BCD-DEF make it ABC-BCD-DEF
i.e. 'whenever a sequence repeats,only one appearance of that sequence should be displayed.The field Flight Route has to be updated with this replaced string.
View 6 Replies
View Related
Jul 23, 2005
Hi All,we have a problem with the Full Text Catalog Search.We use the following SQL Statement for matching companies from a table:select company, lastname, firstname, pkcustomers, fkcustomers,location, title, fkFunktionen, TypeOfPositionfrom customerswhere (fkcustomers = 0 or fkcustomers is null)and active = 1and pkCustomers in (select [KEY] from CONTAINSTABLE(Customers, Company,'"*SEARCHTERMS*"'))order by company ascThe search so far is working perfect.Now the problem: There are two companies in the table called "i-fabrik"and "b-wise". There´s no way to find these two companies. I find outthat the search is successful if there are more than three letters infront of the hyphen (for exampe iii-fabrik or bbb-wise). How can thatbe? Why exactly 3 letters?I hope somebody can help me.Best regardsMarkus Weber
View 1 Replies
View Related
Nov 22, 2006
This is just too simple. I must be doing something wrong. I have tried everything, redoing the SQLMobile merge publication, setting permissions, and need help ASAP.
The basic test with the http://localhost/sqlmobile/sqlcesa30.dll returns the message:
SQL Server Mobile Server Agent 3.0
I have tried the merge replication with both my local SQL Server 2005 installation and a remote development box. Both instances return the same error.
I am able create and replicate a database using the sample application:
http://msdn2.microsoft.com/en-us/library/ms171908.aspx
However, another simple applications fails to synchronize when simply using the following code block:
Dim repl As New SqlCeReplication()
repl.InternetUrl = "http://xens/sqlmobile/sqlcesa30.dll"
repl.Publisher = "xena"
repl.PublisherDatabase = "SQLMobile"
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.Publication = "SQLMobile"
repl.Subscriber = "sqlmobile"
repl.SubscriberConnectionString = _
"Data Source='" + filename + "';Password='';" _
& "Max Database Size='128';Default Lock Escalation ='100';"
repl.AddSubscription(AddOption.CreateDatabase)
repl.Synchronize()
Here is the error message:
Error Code: 80072EE7
Message: A request to send data to the computer running IIS has failed. For more information, see HRESULT.
Minor Err. 28037
Source Microsoft SQL Server 2005 Mobile Edition
--------------------------------------------------------------------------------------
Here is the full code sample:
Imports System.Data.SqlServerCe
Imports System.Text
Public Class Form1
Private engine As SqlCeEngine
Private repl As New SqlCeReplication()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
engine = New SqlCeEngine()
engine.LocalConnectionString = "Data Source=""sqlmobile.sdf"";Max Database Size=128;Default Lock Escalation =100;"
engine.CreateDatabase() <- First method creates database
engine.Dispose()
engine = Nothing
repl.InternetUrl = "http://xena/sqlmobile/sqlcesa30.dll"
repl.Publisher = "xenaSQL2005"
repl.PublisherDatabase = "SQLMobile"
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.Publication = "SQLMobile"
repl.Subscriber = "SQLMobile"
repl.SubscriberConnectionString = "Data Source=""sqlmobile.sdf"";Max Database Size=128;Default Lock Escalation =100;"
Try
'repl.AddSubscription(AddOption.CreateDatabase) <- this method fails also
repl.AddSubscription(AddOption.ExistingDatabase)
repl.Synchronize() <-- Code fails here with the error message shown.
Catch err As SqlCeException
ShowErrors(err)
'MessageBox.Show(err.ToString)
End Try
End Sub
Public Sub ShowErrors(ByVal e As SqlCeException)
Dim errorCollection As SqlCeErrorCollection = e.Errors
Dim bld As New StringBuilder
Dim inner As Exception = e.InnerException
Dim err As SqlCeError
If Not inner Is Nothing Then
MessageBox.Show(("Inner exception: " & inner.ToString()))
End If
' Enumerate each error to a message box.
For Each err In errorCollection
bld.Append((ControlChars.Cr & " Error Code: " & err.HResult.ToString("X")))
bld.Append((ControlChars.Cr & " Message : " & err.Message))
bld.Append((ControlChars.Cr & " Minor Err.: " & err.NativeError))
bld.Append((ControlChars.Cr & " Source : " & err.Source))
' Retrieve the error parameter numbers for each error.
Dim numPar As Integer
For Each numPar In err.NumericErrorParameters
If 0 <> numPar Then
bld.Append((ControlChars.Cr & " Num. Par. : " & numPar))
End If
Next numPar
' Retrieve the error parameters for each error.
Dim errPar As String
For Each errPar In err.ErrorParameters
If [String].Empty <> errPar Then
bld.Append((ControlChars.Cr & " Err. Par. : " & errPar))
End If
Next errPar
MessageBox.Show(bld.ToString())
bld.Remove(0, bld.Length)
Next err
End Sub
End Class
Thanks in advance....
View 4 Replies
View Related
Nov 9, 2006
I'm trying to setup merge replication and get the following error from the snapshot agent after I've finished the 'New Publication Wizard'. This doesn't make sense to me as it is an automatic process. Also, it looks like it is complaining about a 'dbo.MSmerge_cont...' view which is a view created automatically for the merge publication.
ERROR MESSAGE:
The identifier that starts with '<EVENT_INSTANCE><EventType>CREATE_VIEW</EventType><PostTime>2006-11-09T09:56:48.390</PostTime><SPID>152</SPID><ServerName>XF4SWC' is too long. Maximum length is 128.
FULL DETAILS:
Message: The identifier that starts with '<EVENT_INSTANCE><EventType>CREATE_VIEW</EventType><PostTime>2006-11-09T09:56:48.390</PostTime><SPID>152</SPID><ServerName>XF4SWC' is too long. Maximum length is 128.
Command Text: IF OBJECT_ID(N'[<EVENT_INSTANCE><EventType>CREATE_VIEW</EventType><PostTime>2006-11-09T09:56:48.390</PostTime><SPID>152</SPID><ServerName>XF4SWCS464</ServerName><LoginName>NT AUTHORITYSYSTEM</LoginName><UserName>dbo</UserName><DatabaseName>liport2_gts</DatabaseName><SchemaName>dbo</SchemaName><ObjectName>MSmerge_contAE2EB588ABFA4C13825D4D44CB2D50CB_90</ObjectName><ObjectType>VIEW</ObjectType><TSQLCommand><SetOptions ANSI_NULLS="OFF" ANSI_NULL_DEFAULT="ON" ANSI_PADDING="ON" QUOTED_IDENTIFIER="ON" ENCRYPTED="FALSE" /><CommandText>create view dbo.MSmerge_contAE2EB588ABFA4C13825D4D44CB2D50CB_90 as select * from MSmerge_contents where 1 = 2</CommandText></TSQLCommand></EVENT_INSTANCE>]', 'V') IS NOT NULL DROP VIEW [<EVENT_INSTANCE><EventType>CREATE_VIEW</EventType><PostTime>2006-11-09T09:56:48.390</PostTime><SPID>152</SPID><ServerName>XF4SWCS464</ServerName><LoginName>NT AUTHORITYSYSTEM</LoginName><UserName>dbo</UserName><DatabaseName>liport2_gts</DatabaseName><SchemaName>dbo</SchemaName><ObjectName>MSmerge_contAE2EB588ABFA4C13825D4D44CB2D50CB_90</ObjectName><ObjectType>VIEW</ObjectType><TSQLCommand><SetOptions ANSI_NULLS="OFF" ANSI_NULL_DEFAULT="ON" ANSI_PADDING="ON" QUOTED_IDENTIFIER="ON" ENCRYPTED="FALSE" /><CommandText>create view dbo.MSmerge_contAE2EB588ABFA4C13825D4D44CB2D50CB_90 as select * from MSmerge_contents where 1 = 2</CommandText></TSQLCommand></EVENT_INSTANCE>]
Parameters:
Stack: at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteAdHocQueryDiscardResults(String strQuery, SqlConnection connection)
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.GenerateSystemTableBcpFiles()
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoPostArticleFilesGenerationProcessing()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 103)
Get help: http://help/103
Server XF4SWCS464, Level 15, State 4, Procedure , Line 1
The identifier that starts with '<EVENT_INSTANCE><EventType>CREATE_VIEW</EventType><PostTime>2006-11-09T09:56:48.390</PostTime><SPID>152</SPID><ServerName>XF4SWC' is too long. Maximum length is 128. (Source: MSSQLServer, Error number: 103)
Get help: http://help/103
View 3 Replies
View Related
Jul 29, 2015
I am replicating a stored procedure execution, which builds and executes the following dynamic SQL command:
IF EXISTS (select * from MyDB..sysfiles sf (nolock) where name = 'MyDB_201201')
ALTER DATABASE [MyDB] REMOVE FILE [MyDB_201201]
IF EXISTS (select * from MyDB..sysfilegroups sfg (nolock)
where groupname = 'MyDB_201201' and sfg.groupname not in(
SELECT distinct fg.name file_group_name
[Code] ....
I can run this SP with no errors on both the publisher and the subscriber. However, when I try to replicate the execution of this SP, I get an error in replication monitor:
ALTER DATABASE statement not allowed within multi-statement transaction. (Source: MSSQLServer, Error number: 226)
How can I change my code to workaround this? Perhaps some explicit transactions?
View 6 Replies
View Related
Oct 15, 2015
Is it possible to replicate data from 3 publishers to a single/central subscriber transactionally? In other words I have Server A, Server B, Server C with databases A,B,C respectively. I need to replicate 2 articles from A,2 from B and 2 from C to a central Server D that hosts database D. D will have only 6 articles. The replication is Transactional Replication.
If it is possible what will be the drawbacks of such implementation? (if one server goes down will the whole replication break?) If not possible then what is the best way of implementing this?
View 3 Replies
View Related