Selamat siang.
Pertanyaan pertama adalah: mengapa, ada Toad / SQL-developer / PLSQL-developer, dll. lingkungan ide grafis.
Baik. Iya. Ada. Namun, tidak semua orang membutuhkannya sebagai alat untuk bekerja dengan objek oracle-subd.
Itu. Saya di sini, di artikel ini - bukan hanya untuk pengembang oracle, saya akan memberi tahu Anda sesuatu. Melainkan untuk dba, mis. orang-orang yang pekerjaannya dengan objek sbd jauh lebih spesifik, mereka tidak memerlukan penggabungan ide seperti Toad / SQL-developer / PLSQL-developer;
Momen kedua: sekarang: lokasi terpencil, di mana-mana dan di mana-mana. Dalam hal ini, akses ke pekerjaan diatur dari jarak jauh.
Atau: melalui sesuatu seperti VDI / RDP. Atau: laptop yang berfungsi dikeluarkan dan darinya, dari situ - bekerja.
Dalam kasus pertama - yah, itu sering berarti antarmuka grafis dari desktop jarak jauh dan: Windows dan sumber daya terbatas.
Dalam kasus kedua: organisasi sering mencoba menghemat uang di sini juga - mereka akan memberikan sesuatu dengan RAM 8GB dan - seperti yang Anda inginkan, kerjakan. Yaitu: firefox / chrome, dengan N >> 10 tab, beberapa Toad / SQL-developer / PLSQL-developer, skype / zoom, dan lainnya.
Dalam kedua kasus: muncul pertanyaan - bagaimana saya bisa menghemat uang untuk sumber daya, misalnya, pada IDE untuk oracle-subd.
Menurut saya, ada proyek menarik di bawah permintaan ini: VoraX
Sayangnya, proyek tersebut saat ini ditinggalkan.
, , . - , , / /.
- , , , , - , . - . : : - .
- , , -, -.
- - vim-. : vim-, -. - -, , , - sqlplus, .
.. - - , : , . dbext, vim-dadbod, Emacs -: - , -: -, , , , .
, -, - gem- "vorax", . - , , , racc
gem. , gem-, ruby-dev -, .
: , : ruby
, vim
ruby, oracle- ( -).
LinuxMint - , :
apt install gawk bison libffi-dev libgdbm-dev libncurses-dev libsqlite3-dev libyaml-dev zlib1g-dev -y apt install sqlite3 libgmp-dev libreadline-dev checkinstall libxml2-dev libxslt-dev -y apt install build-essential ruby-dev pkg-config -y ruby -v gem install vorax gem list | sort
vim-, ruby:
mkdir ~/Vim4VoraX; cd ~/Vim4VoraX
git clone https://github.com/vim/vim.git
cd ./vim/src/
#make distclean
./configure --enable-rubyinterp --with-features=huge
make
./vim --version | grep ruby; pwd
sudo apt remove vim
sudo checkinstall --pkgname vim4vorax4 --pkgversion 8.2.0 --install
#dpkg -r vim4vorax4
#in vim:
#:ruby puts RUBY_VERSION
cd ~/.vim/bundle && git clone https://github.com/kakash1hatake/vorax4.git
. - , - :
/vorax4/doc/vorax.txt
- : , vim-.
, :
: , xml-
profiles.xml
, , , . -, , :/vorax4/vorax/ruby/lib/vorax/profiles_manager.rb
, -, (: , vim-) . : - , (
WHERE ROWNUM <= :limit
), , , - . . set- - . , - , , . - , . - .
:
<Leader>E
: ..: sanbdox-. -, - -. , - -, , , - - , - . Also: sigint 2,9 - -. Also: , c ( , visual- ), vim-.
plsql-, , , ( vim-), "Enter". - , , - - , as is, :
The default key mapping for compiling is c. "C" stands, obviously, for "C"ompile. For convenience, you may also use @. Two things happen when a PLSQL object is compiled:
* the buffer content is sent as it is to the server.
* as soon as the buffer content is executed, Vorax will check the ALL_ERRORS view to see if any relevant errors exist. If such errors are found, they are loaded into a Vim quickfix window, along with the error line, error column and the message itself.
Note: Pay attention that during the compilation of an PLSQL object, the substitution variables feature is disabled.
(. ..):
- . - . , - (/ / /) - . - : /vorax4/vorax/ruby/lib/vorax/sqlplus.rb
, , , ( ):
, -, , - , - -. - , , .
.
, , -, SQLcl
: -, . : - - /vorax4/vorax/ruby/lib/vorax/sqlplus.rb
sqlplus
, sql
;
, / : SQLcl - <SQLcl->/sqlcl/bin/sql
, -, .
, , : - /sqlcl/bin/sql
- .
, - SQLcl , -, #set blockterm
, , .
, , run <SQLcl->/sqlcl/bin/sql
- -, .., :
function run {
if [ "m$SQLCL_DEBUG" != "m" ]; then
echo "JAVA=$JAVA"
echo "JAVA_OPTS=${APP_VM_OPTS[@]}"
echo "DEBUG=$DEBUG"
echo "CPLIST=$CPLIST"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "exec $JAVA $CUSTOM_JDBC $CYGWIN "${APP_VM_OPTS[@]}" -client $SQLCL_DEBUG -cp "$CPLIST" oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli "
fi
exec $JAVA $CUSTOM_JDBC $CYGWIN "${APP_VM_OPTS[@]}" -client $SQLCL_DEBUG -cp "$CPLIST" oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli "$@"
}
, - .
: / - .
, .
, /, / .
, - SQLcl, , , ?
Juga, pertanyaannya adalah, apa / tahu pilihan untuk bekerja dengan subdivisi-oracle melalui aplikasi-cli, sebanding atau lebih maju dari vorax, yaitu: manajemen koneksi, browser objek, dan itu saja.
Terima kasih atas perhatiannya, waktunya.
UPD1: contoh instalasi VoraX di CYGWIN
UPD2: Ketahui bahwa penyelesaian kode berfungsi, omnicompletion, dalam mode penyisipan, dengan ctrl-x, ctrl-o ternyata seperti ini: