You now have a brand new master database and are ready to restore your master database.
INDEXES END GO CREATE PROCEDURE [dbo].[usp_My Test] AS BEGIN SELECT * FROM SYS.
INDEXES END GO So, now I’ve got two procedures in Master, one prefixed with ‘sp_’ and the other with a different prefix ‘usp_’.
You can restore it using either the Query Analyzer or SQL Enterprise Manager.
If you're using Query Analyzer, run the query shown in Figure E.
It is important to have a plan for dealing with the corruption and/or failure of your master database.
That will help you follow a methodical approach when disaster strikes, rather than acting too quickly under pressure.Neither of them has been marked as a ‘system object’ so let’s see what happens.First we’ll change the database context to something other than Master, and then execute the two procedures to see what kind of results we get.Let’s walk through the Rebuild Wizard to see how it works.Start by double-clicking to bring up the screen shown in Figure B.So while at last week’s SQL PASS Summit 2011, during the dinner on Friday night we had a discussion about adding stored procedures to the Master database and being able to refer to it anywhere in your SQL Server instance.