Help get this topic noticed by sharing it on Twitter, Facebook, or email.

OLE DB provider... The table does either not exist or the current user does not have permissions

At one of our customers who is using ForceAmp to connect to SalesForce we get the following error-message. We see it is from one of the Stored Procs, maybe you can help us solve the error.

SELECT [Id]
FROM [SALESFORCE]...[ AccountProductionOverview__c_Deleted]
where startdate='2015-08-31 21:30:00'
GO

Returns

Msg 7314, Level 16, State 1, Line 2
The OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" does not contain the table " AccountProductionOverview__c_Deleted". The table either does not exist or the current user does not have permissions on that table.

When we look at the Stored Proc we see:

DELETE_PROCESS:
-- Skip deleted stuff for nondeleteable tables
-- Commented out to allow correct operation for read only users
--if (@deletable = 'false') goto SKIPDELETED

-- If the deleted table exists, drop it and recreate it
set @deleted_exist = 0;
IF EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
AND TABLE_NAME=@deleted_table)
set @deleted_exist = 1
IF (@@ERROR <> 0) GOTO ERR_HANDLER

if (@deleted_exist = 1)
exec ('Drop table ' + @delim_deleted_table)
IF (@@ERROR <> 0) GOTO ERR_HANDLER

if (@replicateable = 'true')
begin
-- Object supports GetDelete api so use it to retrieve deleted ids
select @sql = 'Select * into ' + @delim_deleted_table + ' from openquery('
select @sql = @sql + @table_server + ',''Select Id from ' + @deleted_table
select @sql = @sql + ' where startdate=''''' + Convert(nvarchar(24),@last_time,120) + ''''''')'
--print @sql

exec (@sql)
IF (@@ERROR <> 0) GOTO ERR_HANDLER
End
...

Can you please shine your light on this and help us out?
1 person has
this question
+1
Reply