32 lines
762 B
Transact-SQL
32 lines
762 B
Transact-SQL
/*
|
|
DATABASE: [EsbZertifikatManager]
|
|
OBJECTNAME: Database
|
|
ACTION: CREATE
|
|
IDX: 002
|
|
DATE: 2026-07-29
|
|
USER: CUR
|
|
COMMENT: Legt die leere Ziel-DB an. Vorher 00_DropExisting.sql ausfuehren
|
|
(loescht Alt- und Ziel-DB inkl. Always Encrypted).
|
|
Reihenfolge: 00_DropExisting -> 01_CreateDatabase ->
|
|
02_CreateSchema -> 03_Seed.
|
|
*/
|
|
USE [master];
|
|
GO
|
|
|
|
IF DB_ID(N'EsbZertifikatManager') IS NOT NULL
|
|
BEGIN
|
|
THROW 50001,
|
|
N'Datenbank [EsbZertifikatManager] existiert noch. Zuerst 00_DropExisting.sql ausfuehren.',
|
|
1;
|
|
END;
|
|
GO
|
|
|
|
CREATE DATABASE [EsbZertifikatManager];
|
|
GO
|
|
|
|
ALTER DATABASE [EsbZertifikatManager] SET RECOVERY SIMPLE;
|
|
GO
|
|
|
|
ALTER DATABASE [EsbZertifikatManager] SET READ_WRITE;
|
|
GO
|