Creating System stored procedure

  • How do i create a stored procedure which comes up with Type='System' in Sql database. Even when i use names starting with sp_****,

    in Master database, the type still shows 'User'

  • You cannot. System stored procedures come with the server. If you create it, it is User.

    Why do you want to?

    Steve Jones

    steve@dkranch.net

  • Thanks for your reply. In Master database and one other Existing database in SqlServer7.0, there are storedProcedures starting with names

    dt_******* with type='System'. I was trying to understand how they were created when System storedProcedures can only start with sp_******. Also migrating to Sql2000, Utilities dont migrate storedprocs starting with dt_*******

  • These are MS procedures. Shouldn't be an issue for you.

    Steve Jones

    steve@dkranch.net

  • On the contrary, you can mark a user object as a system object by using the stored procedure "sp_MS_marksystemobject" (as documented in Ken Henderson's The Guru's Guide to Transact-SQL. The procedure takes a single parameter, the name of the object which you would like to mark as a system object. Generally speaking, it's pointless to mark a user-created object as a system object, it just leads to confusion; however, system objects behave somewhat differently than user objects in certain cases, and occasionally, that alternate functionality is desirable.

    Matthew Burr

  • Did not know that, thanks.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply