Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

cannot drop function because it is being referenced by object in sql server Expand / Collapse
Author
Message
Posted Thursday, April 24, 2014 12:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 11, 2014 11:27 PM
Points: 3, Visits: 28
cannot drop function because it is being referenced by object in sql server


Plz give me the solution with brief explanation
In Advance Thanks
Post #1564532
Posted Thursday, April 24, 2014 12:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:18 AM
Points: 13,554, Visits: 10,430
Another object is referencing your function. For example another function or stored procedure is using the function you want to drop. If you would drop it, it would break the other function.

You either have to change the other object, or drop it first.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1564534
Posted Thursday, April 24, 2014 12:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 11, 2014 11:27 PM
Points: 3, Visits: 28
ANY ANOTHER ALTER WAY WITH OUT DROP THE OBJECT.......
Post #1564541
Posted Thursday, April 24, 2014 12:41 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:18 AM
Points: 13,554, Visits: 10,430
It seems your caps lock is broken.

This thread lists some solutions to find the object that is referencing your function:

http://stackoverflow.com/questions/3681291/find-all-references-to-an-object-in-an-sql-server-database

Find it and alter the code so that it stops referencing your function.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1564551
Posted Thursday, April 24, 2014 11:18 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 12:26 AM
Points: 1,556, Visits: 4,290
exec sp_help 'procedure name'

and check the output
Post #1564954
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse