January 9, 2004 at 12:09 am
just my 2ct
Maybe you should uncheck the sp as startup-sp before you drop it ?
if exists (select 1 from dbo.sysobjects where id = object_id(N'[dbo].[sp_schedule_status_reset]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
begin
EXEC master..sp_procoption 'sp_schedule_status_reset','startup','false'
drop procedure [dbo].[sp_schedule_status_reset]
end
or
use the alter procedure syntax
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 9, 2004 at 6:36 am
By any chance, do you have a table named the same thing as your stored proc? I have received the error message when I try to create an object such as a SP and the name is exactly the same as the table.
January 9, 2004 at 7:30 am
I apologize that this is about to hard to read, but I can't get this site to keep my spaces. Let's try this again -- I can't recreate this problem on any of my other servers, so I don't think that there is an easy answer -- I am trying to find out how to find an object that I can't find using Enterprise Manager or Query Analyzer but that the system seems to think is out there somewhere. I need to rewrite it, but I can't find it to delete it or alter it, and I can't create a new one because it already exists somewhere -- I just can't find it (or any other object by the same name). I know the SQL to create, drop, and alter is correct because they work on another server, so I don't expect the problem to be there (but I have been known to be wrong from time to time). ----------------------------- All of the following scripts are being run as owner and administator in the master db. ---------------------------------------------------------------------------------------- Create a new one:
CREATE PROCEDURE [dbo].[sp_schedule_status_reset] AS ....(script posted earlier).... --> There is already an object named 'sp_schedule_status_reset' in the database. -------------------------------------------------------------------------------------------------- Look for it: select * from sysobjects where id = object_id(N'sp_schedule_status_reset') --> (null) --------------------------------------------------------------------------------------------------------- Try to delete it: drop procedure [dbo].[sp_schedule_status_reset] -->
Cannot drop the procedure 'dbo.sp_schedule_status_reset', because it does not exist in the system catalog. ------------------------------------------------------------------------- Tried changing it to not startup :
EXEC master..sp_procoption 'sp_schedule_status_reset','startup','false' --> The object 'sp_schedule_status_reset' does not exist in database 'master'. ---------------------------------------------------------------------------------------------------
Try to alter it:
ALTER PROCEDURE [dbo].[sp_schedule_status_reset]
WITH recompile
AS ....(same as earlier create script) --> Invalid object name 'dbo.sp_schedule_status_reset'. ------------------------------------------------------- Try to create it again: --> There is already an object named 'sp_schedule_status_reset' in the database. ---------------------------------------------------------------
All of the above SQL statements work on another server, just not on this one. Is there somewhere other than the the sysobjects table that I might find this?
January 9, 2004 at 10:51 am
I had this exact same problem on one (and only one) of my servers.
Your not going to like my solution. I got tired of fighting it and reinstalled SQL server. Problem solved.
Have you thought about calling microsoft?
January 9, 2004 at 11:01 am
Reinstalling SQL Server is a bit drastic -- this is a production server, and (for some reason) they frown on downtime.
Guess I'll try Microsoft -- just wanted to see if there was something I was missing first.
January 9, 2004 at 5:38 pm
I can almost guarantee that you have a non-sproc object that has the same name as your sproc. You can check this by running:
select *
from sysobjects so (nolock)
Where so.name Like '%' + <TableName> + '%'
Check the xtype column (see BOL keyword sysobjects for descriptions)
Signature is NULL
January 10, 2004 at 6:40 am
Why can't you try
ALTER PROCEDURE vs. CREATE PROCEDURE ???
If you are 100% sure that the proc is there and you can't see it try this and see what it gives you
Good Hunting!
AJ Ahrens
webmaster@kritter.net
January 11, 2004 at 3:47 am
Invisible stored procedre
Hi
Use the object search in your SQL Query Analyser and right click on the sp name ,press edit ,and do your modifications there
regards
john
January 12, 2004 at 6:36 am
select * from sysobjects so (nolock) where so.name like '%sp_schedule_status_reset%' --> (null)
January 12, 2004 at 6:36 am
select * from sysobjects so (nolock) where so.name like '%sp_schedule_status_reset%' --> (null)
January 12, 2004 at 6:39 am
Query Analyzer Object Search on all object types on all db returned nothing. Alter procedure.... --> invalid object name. Create procedure --> There is already an object named sp_schedule_status_reset in tahe database. .
January 12, 2004 at 7:02 am
I know that someone said to reinstall SQL, which is a bit drastic but may need to be done but have you tried just rebooting the server? Maybe start here?
January 12, 2004 at 7:08 am
Maybe defeat it with it's own weapons ?
use master
select object_id('sp_schedule_status_reset') as The_Nasty_One
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 12, 2004 at 7:17 am
Already tried rebooting the server -- no luck. Select object_id ('sp_schedule_status_reset') as The_Nasty_One --> (null)
January 12, 2004 at 7:30 am
Take a look at this article - Seems like your issue - can you do the workaround?
http://support.microsoft.com/default.aspx?scid=kb;en-us;827448&Product=sql2k
Viewing 15 posts - 16 through 30 (of 30 total)
You must be logged in to reply to this topic. Login to reply