Create, drop and rename a database

Create, rename and drop a database in sql server … …

Create database

See syntax below for the CREATE DATABASE statement. …

Create NORTHWIND database
1> use master
2> go
1> create database [NORTHWIND]
2>     on ( name        = N'NORTHWIND_dat',
3>          filename    = N'C:\\mssql\\data\\iDEFAULT\\NORTHWIND\\NORTHWIND_01.mdf' ,
4>          size        = 10,
5>          filegrowth  = 1,
6>          maxsize     = 1024
7>        )
8> log on ( name        = N'NORTHWIND_log',
9>          filename    = N'C:\\mssql\\tlog\\iDEFAULT\\NORTHWIND\\NORTHWIND_01.ldf' ,
10>         size        = 10,
11>         filegrowth  = 1,
12>         maxsize     = 1024
13>        )
14>  collate Latin1_General_CI_AS
15>
16> go
The CREATE DATABASE process is allocating 10.00 MB on disk 'NORTHWIND_dat'.
The CREATE DATABASE process is allocating 10.00 MB on disk 'NORTHWIND_log'.
1>
Drop database

A database can be dropped using the DROP DATABASE statement. All database datafiles and logfiles are removed from the os. …

Dropping a database
Read more →
		

sp_configure

Display or change global configuration settings for your mssql server through sp_configure. …

Show (advanced) configuration options

To display the current configuration settings execute dbo.sp_configure without arguments. …

C:\>osql -E
1> exec dbo.sp_configure
2> go
 name                                minimum     maximum     config_value run_value
 ----------------------------------- ----------- ----------- ------------ -----------
 allow updates                                 0           1            0           0
 Cross DB Ownership Chaining                   0           1            0           0
 default language                              0        9999     
Read more →