Spit-image of sp_helpfile behaves differently from sp_helpfile 
Author Message
 Spit-image of sp_helpfile behaves differently from sp_helpfile
I created a procedure sp_test_file using exactly the same code as
sp_helpfile, but strangely, when I run the following:

    exec pubs..sp_test_file

it shows me the master files information, whereas

    exec pubs..sp_helpfile

behaves as expected.

Any hint as to what's going on?

Thanks
Jining Han
Sallie Mae



Tue, 09 Dec 2003 06:12:57 GMT
 Spit-image of sp_helpfile behaves differently from sp_helpfile

I assume you created your procedure in the master database?  If this is the
case, you need to execute sp_MS_marksystemobject to indicate it is a system
procedure.  This apparently changes the behavior of the object name
resolution.

This is an undocumented feature and may change in subsequent SQL versions or
service packs  Use at your own risk.

Hope this helps.

-----------------------
SQL FAQ links (courtesy  Neil Pike):

 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq
-----------------------


Quote:
> I created a procedure sp_test_file using exactly the same code as
> sp_helpfile, but strangely, when I run the following:

>     exec pubs..sp_test_file

> it shows me the master files information, whereas

>     exec pubs..sp_helpfile

> behaves as expected.

> Any hint as to what's going on?

> Thanks
> Jining Han
> Sallie Mae



Tue, 09 Dec 2003 22:11:03 GMT
 Spit-image of sp_helpfile behaves differently from sp_helpfile
Dan,

This is exactly what I was looking for.  Thanks a lot!

Jining Han
Sallie Mae

Quote:

> I assume you created your procedure in the master database?  If this is the
> case, you need to execute sp_MS_marksystemobject to indicate it is a system
> procedure.  This apparently changes the behavior of the object name
> resolution.

> This is an undocumented feature and may change in subsequent SQL versions or
> service packs  Use at your own risk.

> Hope this helps.

> -----------------------
> SQL FAQ links (courtesy  Neil Pike):

>  http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
>  (faqxxx.zip in lib 7)
>  or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
>  or www.sqlserverfaq.com
>  or www.mssqlserver.com/faq
> -----------------------



> > I created a procedure sp_test_file using exactly the same code as
> > sp_helpfile, but strangely, when I run the following:

> >     exec pubs..sp_test_file

> > it shows me the master files information, whereas

> >     exec pubs..sp_helpfile

> > behaves as expected.

> > Any hint as to what's going on?

> > Thanks
> > Jining Han
> > Sallie Mae



Wed, 10 Dec 2003 00:52:27 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. select * from exec sp_helpfile

2. sp_helpfile

3. Combo box behaves differently between SQL7 and MSDE2000

4. Stored Procedure Behave Differently using SQL 2000 Enterprise Manager

5. SQL Server 7 Olap behaves differently on Win 2K and NT

6. Triggers behave differently when under stored proc

7. SP behaves differently in 6.5 vs. 7.0

8. Identical stored procs behave differently

9. Stored procedure behaves differently in SQL 7.0


 
Powered by phpBB® Forum Software