LOGIN
To launch SQL Server Management Studio, click on Start > Program > SQL Server Management Studio
Once it launches, you will be prompted for login. Take note of the followings:
Server type: Database Engine
Server name: Name of your server, e.g. BINGO.uacd.edu
Authentication: This could be Windows authentication or Database. You need to create a database user prior to using database authentication. I will address how to create a user in another post.
CREATING A DATABASE
After logging into SQL Server Management Studio, you can create a database by simply right clicking on the database dropdown under the SQL Server Instance. Click on "New Database". A new window pops out and will allow you to name and customize the database.
In this window, you can name the data files and add more options:
TO CREATE A DATABASE USING COMMAND
Login into MS Management Studio, open a New Query Window and run this command:
USE [master]
GO
CREATE DATABASE [kunle] ON PRIMARY
( NAME = N'uacd', FILENAME = N'F:\Microsoft SQL Server\MSSQL10_50\MSSQL\DATA\kunle.mdf' , SIZE = 8421632KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB )
LOG ON
( NAME = N'uacd_log', FILENAME = N'F:\Microsoft SQL Server\MSSQL10_50\MSSQL\DATA\kunle_1.LDF' , SIZE = 4209664KB , MAXSIZE = 2048GB , FILEGROWTH = 10240KB )
GO
ALTER DATABASE [kunle] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [kunle].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ADDING OPTIONS
You can also add more options to the newly created database. Login into MS Management Studio, open a New Query Window and run this command:
USE [master]
GO
ALTER DATABASE [kunle] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [kunle] SET ANSI_NULLS OFF
GO
ALTER DATABASE [kunle] SET ANSI_PADDING OFF
GO
ALTER DATABASE [kunle] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [kunle] SET ARITHABORT OFF
GO
ALTER DATABASE [kunle] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [kunle] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [kunle] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [kunle] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [kunle] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [kunle] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [kunle] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [kunle] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [kunle] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [kunle] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [kunle] SET DISABLE_BROKER
GO
ALTER DATABASE [kunle] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [kunle] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [kunle] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [kunle] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [kunle] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [kunle] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [kunle] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [kunle] SET READ_WRITE
GO
ALTER DATABASE [kunle] SET RECOVERY SIMPLE
GO
ALTER DATABASE [kunle] SET MULTI_USER
GO
ALTER DATABASE [kunle] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [kunle] SET DB_CHAINING OFF
GO
DELETING A DATABASE
Using command to delete a database, login into MS Management Studio, right click on the database and select "Delete".
This will open another box where you customize the operation as shown the the snapshots.
For command option, login into MS Management Studio and open a New Query Window.
Then issue this command:
USE [master]
GO
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'kunle'
GO
USE [master]
GO
DROP DATABASE [kunle]
GO
ReplyDeleteI such a lot unquestionably will make sure to do not disregard this website and give it a look regularly.
offshoreservers net
Smoke detector price in Pakistan .Your points are well made and relatable.Thanks for writing engaging and interesting material.
ReplyDelete