USE [master]
GO
create database test
GO 
CREATE LOGIN [test] WITH PASSWORD=N'test', DEFAULT_DATABASE=[test], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE test
go
create user test for login test
go
sp_addrolemember 'db_owner','test'
go
create table KeyGenerator (next int not null)
go 
insert into KeyGenerator VALUES (0)