How do you persist objects, permissions in tempdb



How do you persist objects, permissions in tempdb..

Answer / srinivasa ganamur

Hi,

Step 1 : For this you to create new procedure(plcae all
your statments in this procedure), affter creating the
procedure, run this procedure in tempdb.

Step 2 : using sp_procoption (system procedure), you have
to set startup option.means whenever you restart your sql
server the created procedure automatically runs. The Syntax
of sp_procoption is

sp_procoption @proc_name,
@OptionName,
@OptionValue

@ProcName---> Name of the newly created procedure
@OptionName---> StartUP
@OptionValue---> True

Ex: sp_Procoption 'usp_CustomerDetails', 'StartUp', 'True'

Regard's
Srinivasa Ganamur

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More SQL Server Interview Questions

what's new in sql server 2016?

0 Answers  


How to use subqueries with the exists operators in ms sql server?

0 Answers  


How to use order by with union operators in ms sql server?

0 Answers  


What are the advantages of passing name-value pairs as parameters?

0 Answers  


What is RMS migrations?

0 Answers   Satyam,






How to delete duplicate rows from table except one?

0 Answers  


What is a trigger?

7 Answers  


Define constraints and give an example of their use?

0 Answers  


What is the sql case statement used for?

0 Answers  


What type of locking occurs during the snapshot generation? : sql server replication

0 Answers  


How get current date in SQL server 2000

6 Answers   Cap Gemini,


What do you mean by normalisation?

0 Answers  


Categories