Forensic Forum and More
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Create database using t-sql in sql server 2008

Go down

Create database using t-sql in sql server 2008 Empty Create database using t-sql in sql server 2008

Post by Admin Thu Feb 20, 2014 3:50 pm

There are many ways to create database in sql server, so let me give you a few examples on how to create a simple database using t-sql.

USE Master
GO
CREATE DATABASE DBINTSQL
ON
(
 NAME = 'BDINTSQLSERVER_DB',
 FILENAME ='C:\Program Files\Microsoft SQL Server\TATABASE\BDINTSQLSERVER_DB.mdf'
 ,SIZE = 200MB
)
LOG ON
(
 NAME = 'BDINTSQLSERVER_LG',
 FILENAME ='C:\Program Files\Microsoft SQL Server\LOG\BDINTSQLSERVER_LG.ldf'
 ,SIZE = 20MB
)
Just like that you create a simple database, and one thing to keep in mind is that it is a good practice to have the database file and and the log file in separate disk.
Admin
Admin
Admin

Posts : 9
Join date : 2013-10-16
Age : 39

https://forensicsblog.board-directory.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum