Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle Schemas ORA-00904 "COMMON" Error #248

Open
ParkJaeSeong opened this issue Jun 9, 2024 · 2 comments
Open

Oracle Schemas ORA-00904 "COMMON" Error #248

ParkJaeSeong opened this issue Jun 9, 2024 · 2 comments

Comments

@ParkJaeSeong
Copy link

Thanks for making such a good plugin.

The common column in Oracle's all_users was added in Oracle Database 12c Release 1 (12.1). In earlier versions of Oracle Database (11g and earlier), the common column does not exist in the all_users view. In my case, it does.

autoload/db_ui/schemas.vim 119 line
Modify it like below.

Delete line 126 \ AND U.common = 'NO'
Delete line 137 \ WHERE U.common = 'NO'
Modify line 150 \ 'schemes_query': printf(s:oracle_args, "SELECT /*csv*/ username FROM all_users ORDER BY username"),

Hope this helps someone.

@ParkJaeSeong
Copy link
Author

I'm not comfortable modifying the query every update, so I reopened it.

I'm using lazyvim. I would like the above changed QUERY to be reflected in the plugin.

Please tell me how to set it up.

@ParkJaeSeong
Copy link
Author

Works well! Thanks!

Configuring Oracle Legacy Mode in vim-db-ui

The vim-db-ui plugin now supports Oracle Legacy Mode configuration through a global variable. You can enable or disable this mode in your Neovim configuration file.

For init.vim Users

To enable or disable legacy mode, add the following lines to your init.vim:

" Enable Oracle Legacy Mode
let g:db_ui_is_oracle_legacy = 1

" Disable Oracle Legacy Mode (default)
let g:db_ui_is_oracle_legacy = 0

For init.lua Users
For Lua-based Neovim configurations, use:

-- Enable Oracle Legacy Mode
vim.g.db_ui_is_oracle_legacy = 1

-- Disable Oracle Legacy Mode (default)
vim.g.db_ui_is_oracle_legacy = 0

Default Behavior
If not explicitly set, the plugin defaults to 0 (Legacy Mode Off).

How to Use
After adding the configuration, restart Neovim and run :DBUI to ensure the settings work correctly with your Oracle Database connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant