Create FastClose Database via SQL

Create FastClose Database via SQL

Create Repository Database and Login

You can create the FastClose Repository database via SQL, if you prefer. On the server running SQL Server, execute the following, after changing the password:

CREATE DATABASE FastClose;
GO
CREATE LOGIN [FastClose] WITH PASSWORD = 'replace_with_password', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF;
GO
USE FastClose;
GO
CREATE USER [FastClose] FOR LOGIN [FastClose];
GO
ALTER ROLE db_datareader ADD MEMBER [FastClose];
ALTER ROLE db_datawriter ADD MEMBER [FastClose];
ALTER ROLE db_ddladmin ADD MEMBER [FastClose];
GO

You can paste the SQL above into SSMS and run it there. Or, to execute it via the command line, save the script to the file C:\FastClose.sql then execute the command:

sqlcmd -S localhost -E -i C:\FastClose.sql

If using SQL Server Express edition you may need to specify the instance name:

sqlcmd -S localhost\SQLEXPRESS -E -i C:\FastClose.sql

You might need to specify the path to sqlcmd.exe but not usually. Remember to delete the file when done.

Allow FastClose to Read the ERP Database

If your ERP database is on a different SQL Server than the FastClose repository then you will need to create another FastClose login on it. This is the SQL script:

CREATE LOGIN [FastClose] WITH PASSWORD = 'replace_with_password', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF;
GO
USE [YourERPDatabase];
GO
CREATE USER [FastClose] FOR LOGIN [FastClose];
GO
ALTER ROLE db_datareader ADD MEMBER [FastClose];
GO

If your ERP database is on the same SQL Server as the repository then just use the same FastClose login:

USE [YourERPDatabase];
GO
ALTER ROLE db_datareader ADD MEMBER [FastClose];
GO

Create Planning Database

If you are going to use the FastClose Planning & Budgeting product, you can create its database as follows, assuming it is on the same SQL Server as the repository database:

CREATE DATABASE FastClosePlanning;
GO
USE FastClosePlanning;
GO
CREATE USER [FastClose] FOR LOGIN [FastClose];
GO
ALTER ROLE db_owner ADD MEMBER [FastClose];
GO

Backing Up

Please ensure you arrange for the repository and planning databases to be backed up, at least daily. The above instructions do not cover that.

Powered By