I can't figure out how to use SQL servers in my app, it only ever lets me pick the one in the Docker container. What am I missing here?

Wanted to give this one more shot to see what I’m doing wrong. I cannot get my MS SQL database to be usable under server actions at all and I have to be missing something as it does this on all my computers.

First, I deployed via Docker remote to DigitalOcean, picking Postgres as the server type. This added the db database to the Database Manager tab as you’d expect:

Next, under action steps, I can pick database connection, and under the dropdown, db appears as you’d expect. Here it’s selected:

If I click the dropdown beside db, you can see it’s the only one:

I go back to Database Manager and click Add New Connection to add my MS SQL:

That also works fine and adds it and you can see all the tables:

But how do I actually use this database now? When I go back to server actions I get the exact same thing, I can only ever pick db from it, no server I add to Database Manager comes up here.

People keep saying to read the Database Manager help guides on here but I have several times, they are so high level and don’t seem to cover this situation anywhere. I may see about hiring someone just to get me started but I’m almost a week in and I can’t figure this out. Does the target I have selected, or the type of server I use impact these screens here?

I had imagined that all you’d do is go to Database Manager, add all the SQL servers you want, and then from the Server tab be able to use any of them in Server Actions but that doesn’t seem to be the case. What am I missing? :slight_smile:

But how do you pick the SQL server? That’s what I’m saying, when I go to server actions and add database connection like your first screenshot it only lets me pick the docker database called db, why can’t I pick the MS SQL one I just created? It’s called AzureSQL in the Database Manager, yet it doesn’t appear in the dropdown of a database to pick:

It works if I want to query that database called “db” that was made with Docker, but how on earth do I pick the AzureSQL one? I can add 5 different SQL servers to the Database Manager tab, I just can’t figure out how to pick the one I want to use in server actions as it only shows the Docker one called db.

I’m not sure if my screenshot is clear, but that’s me clicking the “Name” dropdown under Connection Properties, and then in blue it showing “db” as the one and only result, even though I have 3 SQL servers added to Database Manager. I’m just trying to ask how to pick the server I want as I don’t understand why it only shows the one single option to choose from.

Oh my mistake, I think you need to save the connection to make it visible.

Is there somewhere special I have to save? When I’m on the Database Manager I press Command-S and a popup says “File Saved Successfully!” If I’m on the server actions and press the Save button it says “Action File Saved Successfully!” Yet it still doesn’t work, I cannot get any other databases to come up under server actions.

I think I finally just got it working. I’m not sure if this is a bug or what but the issue is when you go to Database Manager and create a new connection, it adds it, but when you edit the connection it’s all blank. I had to add it to Database Manager, then click “Direct Database Connection” and enter it all there again (as this screen was cleared) and then same clicking “Server Connect Connection” and enter it again there as this screen was also cleared. As soon as I did that then it finally came up as being able to use.

2 Likes