How do you persist objects, permissions in tempdb

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

When we should use @@error?

543


How do I delete a sql server database?

551


What is the maximum size per database for sql server express?

560


Tell me about joins in database system and explain each in detail.

602


what is package and it uses and how can u call a package

1564






Why would you use sql agent?

738


How to create function without parameter in sql server?

564


What is indexing explain it with an example?

555


What is query optimization process?

523


You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?

592


What is the difference between functions and scalar functions?

574


Write a SQL query to delete a table?

659


What is a cursor, index in sql?

582


Explain the types of indexes.

644


What are Row versions of DataRow?

612