Creating Student Databases Script in SQL

CREATE DATABASE DELETEME; 
GO 
USE DELETEME; 
CREATE LOGIN DELETEME WITH PASSWORD='HelloJunkBonds123'; 
CREATE USER DELETEME FOR LOGIN DELETEME WITH DEFAULT_SCHEMA=[db_owner]; 
EXEC sp_addrolemember 'db_owner', 'DELETEME';

Above is the T-SQL needed to add a database. We'll create the scripts based on the usernames in Excel. Yes, you can put the last three lines on one line when using excel.

DatabaseManagementSystems/CreateStudentDatabasesSql (last edited 2020-02-05 13:32:04 by scot)