Error 7344
Contents |
over a linked server recently before finding out the the cause of my error wasn't permissions-related at all.
The User Did Not Have Permission To Write To The Column Linked Server
I was attempting to perform an insert on a remote table, linked server identity insert and was getting the following error: Msg 7344, Level 16, State 1, Line 2 The OLE DB provider "SQLNCLI10" for linked server "RemoteServer" could not INSERT INTO table "[RemoteServer].[RemoteDB].[dbo].[IdentInsertTest]" because of column "ID". The user did not have permission to write to the column. After some time attempting to isolate the missing permissions, I realized that it was actually a disguised error message. I was trying to insert a value into an identity column, but rather than the standard error message I expected to see in that case, I got a generic "You don't have permission" message, leading to some wasted time troubleshooting. To recreate the issue, you can follow these steps: -- Create a test table CREATE TABLE IdentInsertTest ( ID INT IDENTITY(1,1), SomeValue VARCHAR(10) ) -- This insert will succeed INSERT INTO IdentInsertTest (SomeValue) SELECT 'Some Value' -- Will fail with IDENTITY_INSERT error INSERT INTO IdentInsertTest (ID, SomeValue) SELECT 10, 'Some Value' The second statement will fail with the standard error message: Cannot insert explicit value for identity column in table 'IdentInsertTest' when IDENTITY_INSERT is set to OFF. Now, connect to another server and set up a linked server to the other instance, and then try these statements again: -- This remote insert will succeed INSERT INTO LinkedServer.RemoteDB.dbo.IdentInsertTest (SomeValue) SELECT 'Some Value' -- Will fail with a permissions error INSERT INTO LinkedServer.RemoteDB.dbo.IdentInsertTest (ID, SomeValue) SELECT 10, 'Some Value' If I'd realized what I was doing, it would have saved me some troubleshooting time! The moral here is that if your sta
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 Internet http://www.trycatchfinally.net/2013/04/write-permission-error-when-inserting-over-linked-server/ 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 Lumia All https://support.microsoft.com/en-us/kb/2699687 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
Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's http://www.sqlservercentral.com/Forums/Topic478210-338-1.aspx On Home » SQL Server 2005 » T-SQL (SS2K5) » Inserting rows into remote server with... Inserting rows into remote server with identity column Rate Topic Display Mode http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/PCI-7344-Initialize-Error/td-p/21514 Topic Options Author Message vgehtsrickvgehtsrick Posted Tuesday, April 1, 2008 9:31 PM Forum Newbie Group: General Forum Members Last Login: Sunday, August 5, 2012 10:56 AM Points: 1, linked server Visits: 33 I am having troubles trying to copy some rows from a table on my local computer to a table on a remote SQL Server 2005 that is being hosted by one of thos web hosting companies. The problem is that the table has an identity column. I first tried using the the following command:SET the user did IDENTITY_INSERT [remoteservername].Library2005.dbo.tblLanguages ONbut that results in the error:Msg 8103, Level 16, State 1, Line 1Table 'remoteservername.Library2005.dbo.tblLanguages' does not exist or cannot be opened for SET operation.I read on some other sites, that I should change this into the following:EXECUTE [remoteservername].Library2005.dbo.sp_executesql N'SET IDENTITY_INSERT dbo.tblLanguages ON'That command executes without error, but the problem is that I cannot perform the actual insert, because it is not within the execute statement. In other words, the following doesn't work:EXECUTE [remoteservername].Library2005.dbo.sp_executesql N'SET IDENTITY_INSERT dbo.tblLanguages ON'INSERT INTO [remoteservername].Library2005.dbo.tblLanguages(colLangID, colEnglish, colGerman, colSpanish)SELECT colLangID, colEnglish, colGerman, colSpanish FROM tblLanguagesThis results in the error:Msg 7344, Level 16, State 1, Line 2OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[remoteservername].[Library2005].[dbo].[tblLanguages]' because of column 'colLangID'. The user did not have permission to write to the column.The remote server is linked correctly on my end via the sp_addlinkedserver and sp_addlinkedsrvlogin. Is there any way to force the remote server to turn IDENTITY_INSERT ON permanently and then let me execute as many INSERTS as I want and then tur
Log in · Help ForumsCategoryBoardDocumentsUsers turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for Search instead for Did you mean: Reply Topic Options Subscribe to RSS Feed Mark Topic as New Mark Topic as Read Float this Topic to the Top Bookmark Subscribe Printer Friendly Page All Forum Topics Previous Topic Next Topic PCI-7344 - Initialize Error PCI-7344 - Initialize Error Renz Member 04-04-2001 10:34 AM Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Print Email to a Friend Report to a Moderator When I initialize the PCI-7344 with MAX (standard/default settings) i get the following error-Code:"-70013 (packetLengthError) occured in Configure High Speed Capture on Axis 0x01 (command packet length is incorrect)."I´am using Win NT. The PCI7344 is brandnew and there is no caple plugged in the7344 controller !Is the PCI-7344 defect - or is it a Software-Problem ? 0 Kudos Message 1 of 2 (1,918 Views) Reply 0 Kudos Re: PCI-7344 - Initialize Error KenSun Member 04-05-2001 08:57 AM Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Print Email to a Friend Report to a Moderator Hi Renz,Make sure you have Flexmotion 5.0.1 installed on your computer. Go ahead and try to "Reset Device" on the status Tab in MAX. Then try to initialize. If you still get an error, I would try this board in another computer to try to reproduce the behavior. If it's the same on a different computer, the board could be bad. 0 Kudos Message 2 of 2 (1,918 Views) Reply 0 Kudos All Forum Topics Previous Topic Next Topic Privacy | Terms of Use | Other Legal Info | © 2015 National Instruments Corporation. All rights reserved.