Explain sp_configure commands, set commands?

Answers were Sorted based on User's Feedback



Explain sp_configure commands, set commands?..

Answer / senthil ku,mar

Use sp_configure to display or change server-level
settings. To change database-level settings, use ALTER
DATABASE. To change settings that affect only the current
user session, use the SET statement

Is This Answer Correct ?    7 Yes 0 No

Explain sp_configure commands, set commands?..

Answer / bhasskar

sp_configure :
The xp_cmdshell option is a server configuration option
that enables system administrators to control whether the
xp_cmdshell extended stored procedure can be executed on a
system.
—- To allow advanced options to be changed.

EXEC sp_configure ’show advanced options’, 1

GO
—- To update the currently configured value for advanced
options.

RECONFIGURE

GO

—- To enable the feature.

EXEC sp_configure ‘xp_cmdshell’, 1

GO

—- To update the currently configured value for this
feature.

RECONFIGURE
GO
SET:
This command is used to set the values to the variables
ex:
declare @id int
set @id=2




Is This Answer Correct ?    1 Yes 0 No

Explain sp_configure commands, set commands?..

Answer / bhaskar

Use sp_configure to display or change server-level
settings. To change database-level settings, use ALTER
DATABASE. To change settings that affect only the current
user session, use the SET statement.

E.g.

sp_CONFIGURE ’show advanced’, 0
GO
RECONFIGURE
GO
sp_CONFIGURE
GO

You can run following command and check advance global
configuration settings.

sp_CONFIGURE ’show advanced’, 1
GO
RECONFIGURE
GO
sp_CONFIGURE
GO

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?

0 Answers  


What is Replication?

0 Answers  


what type of index will get created after executing the above statement? : Sql server database administration

0 Answers  


How to throw custom exception in Stored Procedure?

0 Answers   MCN Solutions,


How to change the name of a database user?

0 Answers  






What is the use of SCOPE_IDENTITY() function?

2 Answers  


What is the difference between local table and global table

1 Answers   CarrizalSoft Technologies, Polaris,


What is the difference function and stored procedure?

0 Answers  


How to specify the collation for a character data type in ms sql server?

0 Answers  


let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

0 Answers  


What have included columns when we talk about sql server indexing?

0 Answers  


Indexes are updated automatically is the full-text index also updated automatically?

0 Answers  


Categories