Multiple database. Different querys

Hello together.

Is it possible to save datas from different databases in a new one.

We have 2 foreign databeses. One with energy data and one with order data. The db’s are installed on own server. Both servers are connected with ignition.
On igniton server we have our “new” database. Here we want to save datas from the other db’s.
Our partners gave us the permissons for the db connection during ignition.

If i start the designer, I am set the new DB to default DB by the general settings.

Is it possible in a script to select datas from a foreign databse?

I tried SELECT * FROM [dbname].[tabelname]… but sadly I am get always the error:
“caused by SQLServerException: Invalid object name [dbname].[tabelname]”

The main problem is to store the data from the energy database. We try to save data from this database
not in realtime but rather on a timestamp.

Maybe anybody has an idea.

Greetings from bavaria.

PS.

In Designer - Database Query Browser - all querys in each databease are possible,

Yes it’s possible, most system.db functions have a parameter for the database connection that you can specify. Otherwise it will try and use the default.

For example, system.db.runQuery :

If you’re using SQL Query bindings, you will select the database connection here:

1 Like

Thank you…it works perfect… I was blind …