Generating a source from a database
Closed this issue · 5 comments
I'm trying to generate a source from a database. Unfortunately, although the database has objects, none is downloaded and saved to the source. Have output like:
[13:05:36] Using gulpfile c:\Users\rpietka.vscode\extensions\mp.oradew-vscode-0.3.29\dist\gulpfile.js
[13:05:36] Starting 'create'...
[13:05:36] Starting 'createSrcFromDbObjects'...
[13:05:36] Finished 'create' after 18 ms
[13:05:36] Finished 'createSrcFromDbObjects' after 18 ms
[13:05:36] Starting ''...
[13:05:36] Finished '' after 68 ms
Maybe I should set up something extra to make the import work
I think I found a bug, schemas (users) to create are read from "DEV" environment. If you are trying to generate a source from non-DEV-named environment (dbconfig.json) it fails. Is this maybe the case?
This line needs env as param:
oradew-vscode/src/cli/tasks/create.ts
Line 28 in 6372784
If you talk about trying to download the schematic from DEV as below, it also fails in my case.
{
"DEV": {
"connectString": "0.0.0.0/base",
"users": [
{
"user": "aa",
"password": "aa"
}
]
}
}
Try running the following select with SQL Developer or similar, maybe just with owner
("aa" in your example) in where cluase . This is where "create" command gets objects to generate from.
oradew-vscode/src/cli/common/db.ts
Lines 199 to 215 in 6372784
I suppose you have default values in oradew.json
as "source.input"
affects the set of objects you are generating.
I'm sorry my mistake. When I reconfigured the connection, I entered the wrong database password.
{ "DEV": { "connectString": "0.0.0.0/base", "users": [ { "user": "aa", "password": "aa" } ] } }
After setting up the DEV environment, I was able to import the database structure. Thanks for your help.