16945 Sql Error
Contents |
Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 7,2000 » Administration » Error: 16955, Severity: 16, State: 2 Error: 16955, sql error 16955 Severity: 16, State: 2 Rate Topic Display Mode Topic Options Author Message marketwiz88marketwiz88 Posted Tuesday,
Sql Error 16937
August 10, 2004 8:45 PM Grasshopper Group: General Forum Members Last Login: Friday, July 21, 2006 10:45 AM Points: 24, Visits: 1 error 42000 microsoft odbc sql server driver sql server incorrect syntax near ' ' My application run fine without problem. When I turn profiler on to trace. I get the following exeption message. Is there a way I can find out what cause it or how to prevent it. I look up on BOL, it seem to be relate to some cursor.Error: 16955, Severity: 16, State: 2Error: 16945, Severity: 16, State: 1These two errors message seem to appear randomly all over the place. Any help on trouble shootinsg this problem will be greatly appreciate it. I am using SQL Server 2000 SP3 on Windows 2000 server. Post #131089 Site OwnersSite Owners Posted Friday, August 13, 2004 8:00 AM SSChampion Group: General Forum Members Last Login: Friday, May 18, 2007 3:36 PM Points: 10,041, Visits: 1 No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have! Post #131708 Patrick DaltonPatrick Dalton Posted Thursday, January 13, 2005 1:25 PM Forum Newbie Group: General Forum Members Last Login: Tuesday, October 20, 2015 10:12 AM Points: 1, Visits: 11 This is caused by incorrect params being sent to SQL to open a cursor... check your code and see what type of recordset and what options are being used. The common cause I have seen is a updatable recordset with SUM(),COUNT(*) etc... when it should be read onlyNot a lot of documentation on this, and this is just an example of what I have seen at a customer site.Hope this helps.Patrick Post #155475 Kelly KramerKelly Kramer Posted Friday, June 22, 2007 6:12 AM Forum Newbie Group: General Forum Members Last Login: Friday, June 22, 2007 6:05 AM Points: 1, Visits: 1 I am getting a SQL Server 2000 error:The following SQL Server error(s) occurred while accessing the MobileUnit_BinLayOver table:16963,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]You cannot specify scroll locking on a cursor that contains a remote table.16945,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor was not declared.Please can you shed some light on this.ThanksKelly(UserID=442345) Post #375837 An
One games Xbox 360 games PC games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security http://www.sqlservercentral.com/Forums/Topic131089-5-1.aspx Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft https://support.microsoft.com/en-us/kb/286359 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
22, 20110 0 0 0 Consider this scenario where you have a linked server from one SQL server to another SQL Server. Both the SQL Servers are SQL Server 2008 SP2 on Windows 2008. Say the two SQL Servers are https://blogs.msdn.microsoft.com/dataaccesstechnologies/2011/02/22/executing-an-insert-statement-on-a-view-in-linked-server/ Server A and Server B. Linked server from Server A to Server B is set https://bytes.com/topic/sql-server/answers/144458-exception-repeately-occurring up using SQL Native Client 10.0 provider. On Server B, you have a VIEW that joins couple of tables, TABLE 1 and TABLE2 and a trigger that fires an INSERT into Table 2 when you INSERT into the View. SERVER B -------------- Create 2 tables, 1 view, 1 trigger (instead of) CREATE TABLE T1 (c1 INT) GO sql error CREATE TABLE T2 (c2 INT) GO CREATE VIEW vt (cv) AS SELECT c1 FROM t1 UNION ALL SELECT c2 FROM t2 GO The View confirms to the rules of an Updateable View and a Partitioned View CREATE VIEW http://msdn.microsoft.com/en-us/library/ms187956.aspx Create an INSTEAD OF TRIGGER to INSERT into physical table t2 when insert is fired against the VIEW. CREATE TRIGGER vt_trig ON vt INSTEAD OF INSERT AS BEGIN INSERT INTO t2 16945 sql error (c2) SELECT i.cv FROM INSERTED i END SERVER A -------------- Create linked server on Server A to Server B with default SNAC provider and call it SNACLinked. Also create another linked server with MSDASQL and ODBC DSN (set up ODBC DSN using SQLODBCsrv driver) and call it MSDASQL_SQL2008. Set up linked server with MSDASQL and SQLODBC driver instead of SQLNCLI provider: EXEC sp_addlinkedserver @server = N'MSDASQL_SQL2008′, @srvproduct = N", @provider = N'MSDASQL', @datasrc = N'sql2008′ <- name of odbc system DSN In this linked server, this will work: INSERT INTO MSDASQL_SQL2008.INST4.dbo.vt (cv) VALUES (111) When you INSERT into VIEW on Server A, using linked server created with SNAC, we get the below mentioned error: INSERT INTO SNACLinked.Test.dbo.vt(cv) values ('16') ERROR: OLE DB provider "SQLNCLI10" for linked server "XXXX" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Msg 16955, Level 16, State 2, Line 1 Could not create an acceptable cursor. Locally executing the INSERT on VIEW on Server A works fine. INSERT into Test.dbo.vt(cv) values (9) – this executes fine. But when using ODBC DSN for linked server, the INSERT on VIEW works fine from Server A also: INSERT INTO MSDASQL_SQL2008.Test.dbo.vt(cv) values ('15') - works fine. The behavior i
your question and get tips & solutions from a community of 418,416 IT Pros & Developers. It's quick & easy. Exception repeately occurring P: n/a Pondy Hi I have a strange problem with my SQL server 2k instllation - every 10 mintutes when I have the Profiler trace with the entire "Errors" Event category selected, the following 5 exceptions show up in the trace and that too for the same SPID. Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 I have no clue why this is occurring - I tried running a trace with the SP:StmtCompleted event on, but no other stored procedures show up with the same spid close to the time where this exception is logged. Does anyone have a clue as to why this error is occurring ? Rahul Jul 23 '05 #1 Post Reply Share this Question 1 Reply P: n/a Erland Sommarskog Pondy (fd*****@yahoo.com) writes: I have a strange problem with my SQL server 2k instllation - every 10 mintutes when I have the Profiler trace with the entire "Errors" Event category selected, the following 5 exceptions show up in the trace and that too for the same SPID. Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 Error: 16955, Severity: 16, State: 2 Error: 16945, Severity: 16, State: 1 I have no clue why this is occurring - I tried running a trace with the SP:StmtCompleted event on, but no other stored procedures show up with the same spid close to the time where this exception is logged. So what you in a such situation like this is this: select * from master..sysmessages where error in (16955, 16945) You could also have looked up the errors in Books Online, by simply searching for them. This could give you the bonus that there might be entire topic to troubleshoot the problem. I would not expect that in this case, though. These are the messages: 16945 The cursor was not declared. 16955 Could not create an acceptable cursor. I would guess that 16945 is a consequence of 16955. Apparently there is some code out there where the cursor declaration fails, and where there is no error handling, so that execution continues. Note that this may not have to be a stored