Mssqlserver Error Number 102
Contents |
Source: MSSQLServer, Error number: 102)" errors in replication ★★★★★★★★★★★★★★★ Sakthivel ChidambaramOctober 6, 20110 Share incorrect syntax near sql server 2008 0 0 A quick guide on how to troubleshoot Incorrect sql server error code 102 syntax near - Source: MSSQLServer, Error number: 102)" errors in replication Firstly, check for any known error code: 102, sql state: 42000] incorrect syntax near '-'. issues like http://support.microsoft.com/kb/935563by searching with the error message in bing If there is no known issue, run a profiler by connecting to the subscriber because sqlstate 42000 error 102 these errors are reported while applying the changes at the subscriber In the profiler, enable all the Events under "Errors and Warnings", "Stored Procedures" and start the distribution agent Once the distribution agent fails, stop the profiler and search for the "Incorrect Syntax" message Now try to correlate the command which was
Incorrect Syntax Near Sql Server Stored Procedure
running in that session and find out why it had failed You can also copy the stored procedure call and paste in SQL Server Management Studio to find out the reason for syntax error Now that you have found the syntax error, figure out yourself on how to fix it or skip that transaction as per the steps mentioned in http://blogs.msdn.com/b/chrissk/archive/2009/09/08/how-to-skip-a-transaction-in-sql-2005-2008-transactional-replication.aspx Post your comments if you have any questions. Sakthivel Chidambaram, SQL Server Support Microsoft Tags replication Comments (0) Cancel reply Name * Email * Website Follow UsPopular Tagst-sql memory performance replication info waits setup connectivity failure log shipping backup DBA engine tlog SSMS security recovery tools single-user welcome SQL 2012 Archives June 2012(1) May 2012(5) April 2012(2) March 2012(1) November 2011(5) October 2011(1) August 2011(1) July 2011(1) June 2011(1) May 2011(3) All of 2012(9) All of 2011(25) All of 2010(7) Privacy & Cookies Terms of Use Trademarks © 2016 Microsoft
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Incorrect Syntax Near ' '. In Sql Server 2012
site About Us Learn more about Stack Overflow the company Business Learn more sql error 156 about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database incorrect syntax near * Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a https://blogs.msdn.microsoft.com/sqlsakthi/2011/10/06/how-to-troubleshoot-incorrect-syntax-near-source-mssqlserver-error-number-102-errors-in-replication/ minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Subscription fails with Incorrect syntax near '9' up vote 0 down vote favorite In my Distributor To Subscriber History I get the following error: Command attempted: 9 (Transaction sequence number: 0x0018E94F0000207A006200000000, Command ID: 59) Error messages: Incorrect syntax near http://dba.stackexchange.com/questions/73495/subscription-fails-with-incorrect-syntax-near-9 '9'. (Source: MSSQLServer, Error number: 102) Get help: http://help/102 It's a transactional replication with a pull subscription. How do I locate this syntax error? EDIT: I found out where the syntax error is. It's in a Address_2.sch file in the snapshot folder. The first line is 9drop Table [dbo].[Address] If I remove the "9" i just get another error: Could not find stored procedure 'd' This error I can't resolve. sql-server sql-server-2008 replication transactional-replication share|improve this question edited Aug 8 '14 at 12:24 asked Aug 8 '14 at 11:19 Kenny Johansen 1915 Check this article first: support.microsoft.com/kb/935563 If that does not describe your situation, follow the instructions at: blogs.msdn.com/b/sqlsakthi/archive/2011/10/07/… –RLF Aug 8 '14 at 13:28 The snapshot .sch files are generated with "random" syntax errors every time I make a new snapshot. I have tried to remove the Address table from the publication but then it just happens in another .sch file. –Kenny Johansen Aug 11 '14 at 6:48 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft disca
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151523 on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums General SQL Server Forums New to https://www.experts-exchange.com/questions/23856982/Merge-Replication-initialization-error.html SQL Server Administration Error Msg 102 Reply to Topic Printer Friendly Next Page Author Topic Page: 1 2 of 2 ahson_u Starting Member 12 Posts Posted-10/13/2010: 13:10:29 Have changed the name of the computer incorrect syntax and am running the following query to drop the old name of the machine on which the sql server is sitting.OSQL -S.\STAX -E -icorrectservername.sql -oResult.txtI get the following error messageMsg 102, Level 15, State 1, Line 1Incorrect syntax near 'S'.Can someone kindly tell me how to correct this query Edited by - tkizer on 10/13/2010 13:23:16 tkizer Almighty SQL Goddess USA 38200 Posts Posted-10/13/2010: 13:22:40 -S serverName\STAX (where serverName incorrect syntax near equals the name of the server)Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog tkizer Almighty SQL Goddess USA 38200 Posts Posted-10/13/2010: 13:23:41 I moved your topic out of the Script Library forum, since that forum is for working scripts that people want to share with the community.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog tkizer Almighty SQL Goddess USA 38200 Posts Posted-10/13/2010: 13:23:58 What version of SQL Server are you using? If it's 2005 or 2008, then you should be using sqlcmd instead of osql.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog ahson_u Starting Member 12 Posts Posted-10/13/2010: 13:42:26 Tara, thanks so much for your quick response. Still get an error messageQuery -S EPTAX01\SAGETAXMessageMsg 102, Level 15, State 1, Line 1Incorrect syntax near '-'.Ahsonquote:Originally posted by tkizer-S serverName\STAX (where serverName equals the name of the server)Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog tkizer Almighty SQL Goddess USA 38200 Posts Posted-10/13/2010: 13:46:03 I think you've got a bad character in there, but perhaps it's hidden.Let's try sqlcmd instead of osql.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog GilaMonster Flowing F
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Merge Replication initialization error Want to Advertise Here? Solved Merge Replication initialization error Posted on 2008-10-29 MS SQL Server 2005 1 Verified Solution 3 Comments 2,084 Views Last Modified: 2008-12-01 I have 2 Different server using SQL Server 2005 with SP2 in the same domain using LAN. I establish Merge Replication between the 2 servers on one table "MMS_PO". Note: MMS_PO table have many child tables with a foreign Keys. At point of initialization, I got the following Error Message: " Error messages: The schema script 'MMS_PO_2.sch' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001) Get help: http://help/MSSQL_REPL-2147201001 Could not drop object 'dbo.MMS_PO' because it is referenced by a FOREIGN KEY constraint. (Source: MSSQLServer, Error number: 3726) Get help: http://help/3726 " So I went to Publication properties, and I changed the Article properties in the Publication to be "Keep existing object unchanged" Then I run the snapshot agent and mark the sunscriber for reinitialize. I got another error : " Command attempted: {call sp_MSsetconflicttable (N'EMP', N'MSmerge_conflict_REP_ABC