Skip to content

Instantly share code, notes, and snippets.

@Vincent-233
Created April 23, 2022 08:30
Show Gist options
  • Save Vincent-233/c46b6701e3af09615b5a7c38982060c3 to your computer and use it in GitHub Desktop.
Save Vincent-233/c46b6701e3af09615b5a7c38982060c3 to your computer and use it in GitHub Desktop.
mssql local db
---------------- LocalDB
-- cmd command: create a instance my_db, can be connected via (localdb)\my_db
SqlLocalDB CREATE mssql_local
-- create database
CREATE DATABASE [my_db]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'test_db', FILENAME = N'D:\DB-File\local_my_db.mdf' , SIZE = 8192KB , FILEGROWTH = 8192KB )
LOG ON
( NAME = N'test_db_log', FILENAME = N'D:\DB-File\local_my_db.ldf' , SIZE = 8192KB , FILEGROWTH = 8192KB )
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment