Invalid attempt to GetBytes on column.
Applies to: SQL Server 2008 R2 Enterprise Edition, SQL Server 2005 Management
Studio, Oracle 11g
I attempted to query a table located on a remote Oracle server from SQL
Server 2005 Management Studio (SSMS) using OPENQUERY and a linked server created
on a SQL Server 2008 R2 instance, when we received the following error on SSMS:
Query completed with errors
An error occurred while executing batch. Error message is: Invalid attempt to
GetBytes on column 'FECHA_GENERACION'. The GetBytes function can only be used on
columns of type Text, NText, or Image.
The T-SQL instruction executed was similar to the following:
SELECT * FROM OPENQUERY(LinkedServerName1, 'SELECT * FROM NOMINA.TABLE1')
The query executed successfully when executed on SQL Server 2008 R2 Management