Unix Technical Forum

sql server 2000 - dts can't 'see' stored procedure

This is a discussion on sql server 2000 - dts can't 'see' stored procedure within the SQL Server forums, part of the Microsoft SQL Server category; --> I am trying to get the DTS Execute SQL task to run a simple sql server 2000 no-parameter stored ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:10 PM
Bruce Lester
 
Posts: n/a
Default sql server 2000 - dts can't 'see' stored procedure

I am trying to get the DTS Execute SQL task to run a simple sql server 2000
no-parameter stored procedure.

The procedure runs without error when using SQL Analyzer but DTS Execute SQL
reports "could not find stored procedure "[dbo].[test]"

The stored procedure is as follows:

create procedure test as

declare tnames_cursor CURSOR
for
select database_name, tmp_table_name from
[DW_Dimensions].[dbo].[vw_dimension_temporary_tables_active]

open tnames_cursor

declare @tablename sysname
declare @databasename sysname

while (@@FETCH_STATUS <> -1)
begin
select @databasename = rtrim(@databasename)
select @tablename = rtrim(@tablename)
exec ("delete from " + @databasename + ".dbo." + @tablename)
fetch next from tnames_cursor into @databasename, @tablename
end
close tnames_cursor
deallocate tnames_cursor
GO

Any ideas?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:12 PM
Hayat
 
Posts: n/a
Default Re: sql server 2000 - dts can't 'see' stored procedure

First thing is that DTS is not able to find stored
procedure.........two possibilities:

1. Stored Procedure don't exist in the SQL server
2. Stored procedures exists but u r not referring it correctly. May be
instead of [dbo].[test] it should be [<DB NAME>].[<DB USER>].[test]

Can you check this?

-Hayat
www.mysticssoft.com

"Bruce Lester" <bruce_lester@email.com> wrote in message news:<FQ3fb.203970$mp.125924@rwcrnsc51.ops.asp.att .net>...
> I am trying to get the DTS Execute SQL task to run a simple sql server 2000
> no-parameter stored procedure.
>
> The procedure runs without error when using SQL Analyzer but DTS Execute SQL
> reports "could not find stored procedure "[dbo].[test]"
>
> The stored procedure is as follows:
>
> create procedure test as
>
> declare tnames_cursor CURSOR
> for
> select database_name, tmp_table_name from
> [DW_Dimensions].[dbo].[vw_dimension_temporary_tables_active]
>
> open tnames_cursor
>
> declare @tablename sysname
> declare @databasename sysname
>
> while (@@FETCH_STATUS <> -1)
> begin
> select @databasename = rtrim(@databasename)
> select @tablename = rtrim(@tablename)
> exec ("delete from " + @databasename + ".dbo." + @tablename)
> fetch next from tnames_cursor into @databasename, @tablename
> end
> close tnames_cursor
> deallocate tnames_cursor
> GO
>
> Any ideas?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com