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

What is tablesample?

569


What were the latest updates to SQL Azure service?

92


Write a SQL query to make a column as unique?

625


List some major differences between triggers and stored procedures?

516


How to recreate an existing index in ms sql server?

542






When is the use of update_statistics command?

549


explain declarative management framework (dmf) in sql server 2008?

576


What is the query and subquery?

616


How to link tables in sql server?

473


What is query optimization process?

514


What are the different types of normalization?

615


What is index in an assignment?

527


How will you monitor replication latency in transactional replication? : sql server replication

601


where can you add custom error messages to sql server? : Sql server administration

575


Which database stores information about replication?

552