In the following the creation of the database scheme and the user "erpuser" is explained:[61]
Create the Database: Right-click ‘Databases’ -> ‘New Database’
-> The dialog box New database opens. Enter the desired Database name and click on „“ and then on .
Select the created database and click on New Query.
Now you need a database script for the creation of the database structure (..\tools\databases\MSSQL\erp_install_mssql.sql).
Copy the content into the empty query field using Copy&Paste and in addition, at the beginning, add the following:
USE [datenbankname] GO ...
Now open an empty query and create the user "erpuser". You can use the script
plinkdb_reuse.sql(under..\tools\databases\MSSQL) as template.USE [master] GO CREATE LOGIN [erpuser] WITH PASSWORD=N'erpuser', CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO CREATE DATABASE [plinkdb] ON ( FILENAME = N'<DBFILE>' ), ( FILENAME = N'<DBLOGFILE>' ) FOR ATTACH GO if not exists (select name from master.sys.databases sd where name = N'plinkdb' and
SUSER_SNAME(sd.owner_sid) = SUSER_SNAME() )
EXEC [plinkdb].dbo.sp_changedbowner @loginame=N'sa', @map=false
GO
USE [plinkdb]
GO
DROP USER [erpuser]
GO
CREATE USER [erpuser] FOR LOGIN [erpuser] WITH DEFAULT_SCHEMA=[dbo]
GOFinally you have to allocate the desired rights for the user "erpuser": Right-click on „erpuser“ -> "Properties".
In the dialog box "Database User - <user_name>" define the desired memberships for the respective user and finally confirm with .
[61] Here exemplified by MSSQL Use the provided script for your database type (see Section 4.2.4.1, “Installation scripts ”) and adjust it accordingly.





![[Caution]](https://webapi.partcommunity.com/service/help/latest/pages/it/partsolutions_user/doc/images/caution.png)


