Database 생성자

Initializes a new instance of the Database class.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
Public Sub New
‘사용 방법
Dim instance As New Database()
public Database()
public:
Database()
new : unit -> Database
public function Database()

주의

기본 생성자는 모든 필드를 기본값으로 초기화합니다.

You will have to specify which server is the parent of the database before you can create a database.

VB

Dim srv As Server
srv = New Server()

'Create a new database by using the default constructor.
Dim db As Database
db = New Database
db.Name = "New_Database"
db.Parent = srv
db.Create()

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db.Name = "New_Database"
$db.Parent = $srv
$db.Create()

참고 항목

참조

Database 클래스

Database 오버로드

Microsoft.SqlServer.Management.Smo 네임스페이스

관련 자료

데이터베이스 개체 작업

데이터베이스 생성, 변경 및 제거

CREATE DATABASE(Transact-SQL)