Dreamfactory system DB in sql server

Is it yet possible to move the system db to sql server instead of mysql or sqllite ?

Yes. Supported system databases are SQLite, MySQL, PostgreSQL, and MS SQL Server

You can use the switch system database instructions on the wiki to change from one to another: https://wiki.dreamfactory.com/DreamFactory/Installation#Switch_System_Database
(note, this does not migrate your data, but simply sets up a clean install on the new database.)

If you encounter any issues with SQL Server, let us know. I know of one bug that has to do with Files manager in the Admin UI, but it is resolved in the next release.

That is great news, so i have setup everything according to the documentation, when i run the php commands on artisan the last part mentions “//Answer the on screen prompts” I am not getting that or any errors when i run php artisan dreamfactory:setup is this old documentation or should i get a prompt ?

Nvm I am having some issue with the user. Thank you for the response.

Wow just stumbled on this question. You mentioned that this does not migrate your data, but simply sets up a clean install on the new database. That brings up a question - If I have a fully set up DF instance with roles, permissions, scripts etc, I thought if I point another DF instance to the fully setup DF instance MySQL database, the 2nd instance should see exactly the same things that the first instance sees? :rolling_eyes:

Yes. If the destination database already contains all the DreamFactory information, then it will simply connect the instance to this data. And in fact you shouldn’t even need to run the php artisan dreamfactory:setup command if you are attaching an instance to a database with existing DreamFactory system data. Just run the commands to clear the config and cache and restart the web server service.

That’s cool. Thanks :thumbsup:

When i try to bring the system db up in a nonsqlexpress sql instance i am getting actively refused from the sql server. I have already checked all security/firewall etc settings. Any ideas ?

So apart from the firewall, is SQL listening on tcp/1433? Most MS SQL installs do not have this enabled by default, which makes it so you can only connect locally.

Nevermind, the ip bindings for sql server didnt have the port in them after being enabled.

1 Like

I was not successfull with sqlite so I cleared everything and run the setup configuring sql server.

I feel the setup did not complete succesfully as I got this:

Running Migrations...
Migration table created successfully.
Migration driver used: sqlsrv
Migration driver used: sqlsrv
Migration driver used: sqlsrv
SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Introduci
ng FOREIGN KEY constraint 'db_virtual_relationship_ref_service_id_foreign' on ta
ble 'db_virtual_relationship' may cause cycles or multiple cascade paths. Specif
y ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constr
aints. (SQL: alter table "db_virtual_relationship" add constraint "db_virtual_re
lationship_ref_service_id_foreign" foreign key ("ref_service_id") references "se
rvice" ("id") on delete cascade)

When I hit the /setup page I get to enter the admin info but then get an error. Logs states:
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getResource() on null in C:\...\vendor\dreamfactory\df-core\src\Models\BaseModel.php:761 ...

What can I try next?