I am getting the following error when I run a stored procedure. After testing different sections of the stored proc, we have narrowed it down to the problem, but the problem makes no sense why it is breaking. I will attempt to clearly explain the db and table set up and give an similar sample of the code that isn't working.
There is a db that has many tables. However, this is a test environment set up like prod, but smaller in size because the data is constantly purge for new testing. In this database, there are two tables that have the same schema / structure. One is used as a "holding" container for the "middle tier" to process the new apps. When processed, they are moved the the "archive" table. Tthere is a third table in an "archive" (different) database that holds the records that are over 90 days old. This table has the same schema as the other two, it just resides on a different server (SQL 2000 on Win2000). My query selects a single column containing a binary value which I use to convert into a PDF file. It checks the first table. If no rows are returned then, it checks the second. This is repeated for the third table. The problem exists with the second table (not the third on a different server).
If I do:
select top 1 binary_column, guid from table2.
I get the first column with the binary value and its guid (primary key for this table). HOWEVER, if I take the guid from the above select statement and use it in a where clause as follows:
select binary_column from table2 where guid = 'known guid value from above'
I get the following error:
SQL 2005 error "OLE DB provider 'SQLNCLI' reported an error. The provider ran out of memory"
Why am I getting this error when I use a WHERE clause? What is this error? I am returning the same value, so how is it out of memory?
We have SQL Server 2005 linked server cluster installed on Win2003 machines. Each machine has 2 GB or ram and 200 GB of hardspace (approx 150 gig remaining)
Please help so that we are not required to use Microsoft's (Lack of) Support Line.