Re: SQL 2000 Stored Procedure Problem
- From: "Richard" <rich@xxxxxxxxxxxxxxxx>
- Date: Thu, 24 May 2007 12:04:28 -0800
Thanks Russell
No error messages. In VB6 / ADO - the recordset is just empty. Failed to
mention that all work fine in QA and on my dev system, that's why I suspect
permissions. BUT who, which and where ?? I swear - I tried so many things
yesterday. GRANTs, permissions on SProcs, permissions on DB, permissions
on tables - nothing helped. The VB/ADO code that is SQL Pass Through (works
everywhere) uses the same UserID/password to login to the SQL as the SProc
routines.
All objects are in dbo. Both servers are "supposed" to be near identical -
the new one is a Quad CPU with bigger HDs. I'm a programmer not an IT
expert by any means. These permissions issues drive me up a wall. I
insisted the migration go one thing at a time to minimize problems - good
thing!
I zeroed it down to the Temp tables with a simple test of 2 SProcs:
--- SProc 1
CREATE PROCEDURE spTestSimple AS
SELECT 'Test Simple' AS ReturnValue
------- This works everywhere 100%
--- SProc 2
CREATE PROCEDURE spTestTempTable AS
CREATE TABLE #MyTempTable
(
ReturnValue varchar(100)
)
INSERT #MyTempTable
SELECT 'Test Temp Table'
SELECT ReturnValue FROM #MyTempTable
----- This works everywhere EXCEPT on the New Server from the VB/ADO app.
Any ideas? My last resort is to undo all the SProcs back to the slow
inefficient Pass Through method. Yuk!
"Russell Fields" <russellfields@xxxxxxxxxx> wrote in message
news:O43TXcinHHA.1244@xxxxxxxxxxxxxxxxxxxxxxx
Richard,
Are you getting any error messages? And, if so, what do they say?
Things to think about: Are all objects in the dbo schema? On both
servers? Are there different rights granted on the two servers? (By temp
tables, I do understand you to mean #tables in tempdb.)
Since it works on one server not another, I would not expect execution
context to be the problem with temp tables.
Not much help, but any extra information you have could assist.
RLF
"Richard" <rich@xxxxxxxxxxxxxxxx> wrote in message
news:eiTtZUhnHHA.2296@xxxxxxxxxxxxxxxxxxxxxxx
Yesterday I spent hours searching the groups for a solution to this
problem with no luck.
The issue is that a VB6 app I inherited has been running fine for years on
SERVER1 (Server 2003 and SQL Server 2000). We moved the Database to a new
SERVER2 (Server 2003 and SQL Server 2000) . The app has a mix of pass
through SQL statements and I was in the process of converting them all to
Stored Procedures. Five of the 14 routines have been converted to Stored
Procedures. On SERVER1 all work fine.
On SERVER2 only the pass through routines work. Any that use Stored
Procedures failed. I then wrote a simple Stored Procedure that returned
just a text string - that worked - so it is not just a Stored Procedure
problem . But as soon as I added a temp table to that "simple" Stored
Procedure - it fails to return anything. All 5 of the production routines
that fail use Temp tables.
I have tried every combination of permissions settings I could find and
nothing seemed to work.
Anyone have any ideas here ?
Thanks!!
.
- Follow-Ups:
- Re: SQL 2000 Stored Procedure Problem
- From: Erland Sommarskog
- Re: SQL 2000 Stored Procedure Problem
- References:
- SQL 2000 Stored Procedure Problem
- From: Richard
- Re: SQL 2000 Stored Procedure Problem
- From: Russell Fields
- SQL 2000 Stored Procedure Problem
- Prev by Date: Re: SQL 2000 Stored Procedure Problem
- Next by Date: Re: Run As Command
- Previous by thread: Re: SQL 2000 Stored Procedure Problem
- Next by thread: Re: SQL 2000 Stored Procedure Problem
- Index(es):
Relevant Pages
|