Solved

sp_helptext does not allow : sp_helptext OtherDB.dbo.spSelT - SQL Server

Posted on 2011-09-16
2
1,088 Views
Last Modified: 2012-05-12
Hi,

I have my stored procedure "spSelT" in "OtherDB" database. And now i cannot able to write:

sp_helptext OtherDB.dbo.spSelT

Is there any way that i can wite like above ? Modify the above command if needed.

And if i want to do for other than "dbo" schema then how to write it ?

sp_helptext dbo.spSelTest  // returns error

Please provide the command for that also.

Thanks
0
Comment
Question by:milani_lucie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 21

Expert Comment

by:JestersGrind
ID: 36551679
Try putting your database and schema before sp_helptext like this.

EXECUTE OtherDB.dbo.sp_helptext 'spSelT'

Greg

0
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
ID: 36551692
Also to answer your second question, put the object inside single quotes.

Greg

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question