Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Oracle service name support #111

Open
Ginden opened this issue Oct 26, 2018 · 1 comment
Open

Oracle service name support #111

Ginden opened this issue Oct 26, 2018 · 1 comment
Labels
bug no known workaround

Comments

@Ginden
Copy link

Ginden commented Oct 26, 2018

Problem:
typeorm-model-generator does not support service names for Oracle databases.

This code is used to generate

                config /*Oracle.IConnectionAttributes*/ = {
                    user,
                    password,
                    connectString: `${server}:${port}/${database}`
                };

This code is needed to generate valid connection configuration:

                config /*Oracle.IConnectionAttributes*/ = {
                    user,
                    password,
                    connectString: `${server}:${port}/${serviceName}`, // !
                    database // !
                };

Workaround is to hard code configuration in node_modules/typeorm-model-generator/dist/src/drivers/OracleDriver.js file.

@Kononnable Kononnable added the bug no known workaround label Oct 27, 2018
@goughjo02
Copy link

Hi @Ginden, I am trying to use this package with an Oracle DB and have tried hard-coding some values into OracleDriver.js but have so far been unsuccessful.

When you are hardcoding this, what is the value of server? Is it 'DEDICATED' or 'SHARED'? I was reading about connection here.

I was looking at source code of typeorm and they seem to allow an override of connectString like this:

connectString: credentials.connectString ? credentials.connectString : credentials.host + ":" + credentials.port + "/" + credentials.sid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug no known workaround
Projects
None yet
Development

No branches or pull requests

3 participants