Sunday, December 27, 2009

SQL Server 2008 Implementation and Maintenance (1)

1. Command-line utilities
Windows PowerShell -> SQL Server PowerShell
( Running cmdlet commands)
c:\ sqlps
PS SQLSERVER:\ get-command ( view all commands under the shell)
/*******************************************************/
use Tab key to input the complete command automatically
/*******************************************************/
PS SQLSERVER:\ get-help cmdName -detailed ( view the information about every command)
e.g. PS SQLSERVER:\get-help get-host -detailed
PS SQLSERVER:\get-help sqlserver | more ( view sql server information , more is UNIX-like command . Pipeline process is used , so that you view information page by page)

2. use stored procedure to configure SSMS(Master database)
sp_configure -> to config standard configuration parameters and advanced ones.
e.g. :
use master
go
exec sp_configure 'show advanced options' , 1 -- so that you can set advanced system parameters)
go
reconfigure
go
exec sp_configure -- to view the information of all parameters

3. View the information of database in a instance of SQL Server 08
Select name , database_id from sys.databases ;

No comments:

Post a Comment