Creating a database manually
To create a database manually:
- Create a blank database.
For a PostgreSQL database:
- For an SQL database, run the Description.sql script.
For an Oracle database, run the Description_Oracle.sql script.
For a PostgreSQL database, run the Description_PostgreSQL.sql script.
Note: By default, the scripts are placed into the C:\inetpub\wwwroot\FlexiCapture12\Server folder on the computer where the Application Server is installed. - For an SQL database, run the DBInitFill.sql script.
For an Oracle database, run the DBInitFill_Oracle.sql script.
For a PostgreSQL database, run the DBInitFill_PostgreSQL.sql script.
Note: By default, the scripts are placed into the C:\inetpub\wwwroot\FlexiCapture12\Server folder on the computer where the Application Server is installed. - Provide a unique identifier for the database:
INSERT INTO dbo.Settings( Name, Value, ProjectId, BatchTypeId, UserId, Workstation, RoleId, ProcessingStage) VALUES ('DatabaseGUID', NEWID(), NULL, NULL, NULL, NULL, NULL, NULL )
For a PostgreSQL database:
INSERT INTO Settings (Name, Value)
VALUES ('DatabaseGUID', upper(md5(clock_timestamp()::text)::uuid::text));
- Add the first user:
INSERT INTO principal (Name, FullName, EMail, PasswordHash, PasswordReset) values (N'Login', N'FullName', N'email', '', 0)
For a PostgreSQL database:
INSERT INTO Principal (Name, FullName, Email, PasswordHash, PasswordReset) values ('Login', 'FullName', 'email', '', false);
where
- Login is the login that the user will use,
Important! You must specify the login of the Windows user that will be used to open the Administration and Monitoring Console when connecting to the database. - FullName is the full name of the user as displayed in their profile, and
- Email is the user’s e-mail address.
- Specify the system administrator roles for the newly created user:
INSERT INTO principalpermission (PrincipalId, RoleType, IsAllowed) values (1, 10, 1);
For a PostgreSQL database:
INSERT INTO principalpermission (PrincipalId, RoleType, IsAllowed) values (1, 10, true);
- Connect to the newly created database using the Administration and Monitoring Console.
SQL database users
For details about user permissions, see Permissions required for creating and configuring a Microsoft SQL database.
4/12/2024 6:16:01 PM