Documentation - DBeaver Enterprise Edition

Documentation
Tableofcontents
UserTableofContents
Installation
ApplicationWindowOverview(ApplicationWindowOverview)
Views
DatabaseNavigator(DatabaseNavigator)
FilterDatabaseObjects(FilterDatabaseObjects)
ConfigureFilters(ConfigureFilters)
Projects
ProjectExplorer(ProjectExplorer)
DatabaseConnections(DatabaseConnections)
ConnectingtoDatabases(ConnectingtoDatabases)
EditingConnections(EditingConnections)
DatabaseObjectEditor(DatabaseObjectEditor)
PropertiesTab(PropertiesTab)
DataTab(DataTab)
ERDiagramTab(ERDiagramTab)
Dataeditor
Filters(Data-filter)
WorkingwithXML(WorkingwithXML)
SQLEditor
Clientsidecommands(Client-side-scripting)
SQLTemplates(SQL-Editor-Templates)
Databasedrivers(Databasedrivers)
SQLdatabases
NoSQLdatabases
MongoDB
Cassandra(NoSQL-Cassandra)
Redis(NoSQL-Redis)
Optionalextensions
Office
SVGformat
Miscellaneous
Diagrams(ERD)
QueryManager
Datatransfer(export/import)(Data-transfer)
Data/metadatasearch(Database-Search)
Databasecompare(Database-compare)
Command-Line
EnterpriseEdition(EnterpriseEdition)
ProjectsManagement
AdminGuide
Managingconnections
Managingdrivers
Development
DevelopinEclipse
Featuresstructure
Troubleshooting
Resetworkspace
Postingissues
Logfiles
Threaddump
Installation
Theinstallationprocessdependsonthedistributiontypeandyour
OperationalSystem-seehttps://dbeaver.jkiss.org/download/
(https://dbeaver.jkiss.org/download/)
Windows/MacOSInstaller
Theinstallerdistributionistherecommendedwaytoinstall
DBeaveronWindowsandMacOSX.Itisthemostlightweightdue
toanadvancedarchivingtechnologythatisusesandthatisnot
availableinthecaseoftheZIParchive.Besidesthis,theinstaller
automaticallyupgradesDBeavertothenewversion,ifaprevious
versionisalreadyinstalled.ToinstallDBeaver,runtheinstaller
executableandfollowtheinstructionsinitsscreens.
NOTE:
TheinstallerdoesnotchangeanysystemsettingsortheJava
installation.
TheIncludedJREwillbeaccessibleonlyforDBeaver.
ZIPArchive
WheninstallingDBeavermanually,withoutusinganinstaller:
1. InstallJava1.8
(http://www.oracle.com/technetwork/java/javase/downloads/jre8downloads-2133155.html)asaseparatestep.
2. Extractthecontentsofthearchive.
NOTE:DonotunzipthearchiveoverapreviousDBeaver
version.IfyoualreadyhaveanyversionofDBeaverextracted
inthesamelocation-removeitbeforeunzippingthenew
version.
NOTE:Allconfigurations,scriptsandothernecessarydataare
storedinaseparatelocation(usuallyintheuser`shome
directory)sotheprogramdeinstallationwillnotaffectthem.
3. Runthedbeaverexecutable.
DebianPackage
ToinstallDBeaverusingaDebianpackage:
1. Run sudodpkg-idbeaver-<version>.deb .
2. Execute dbeaver& .
RPMPackage
ToinstallDBeaverusinganRPMpackage:
1. Run sudorpm-ivhdbeaver-<version>.rpm .
2. Execute dbeaver& .
NOTE:ToupgradeDBeavertothenextversion,use sudorpm-Uvh
dbeaver-<version>.rpm
parameter.
MacOSDMG
YoucouldtryDMGorZIParchiveifyoucan'tusePKGinstallerfor
somereason.
ToinstallDBeaveronMacOS,justdrag-and-droptheDMGarchive
toyourdisk.
NOTE:DBeaverrequiresJava1.8tobeinstalled,soyouneedto
installJDK1.8+
(http://www.oracle.com/technetwork/java/javase/downloads/jdk8downloads-2133151.html)priortoinstallingDBeaver.
Youcanalsousebrew(http://macappstore.org/dbeavercommunity/):
brewinstallCaskroom/cask/java
Views
Viewsarewindowswithintheworkspacethatprovide
presentationsandwaystonavigatetheinformation.Themain
viewsinDBeaverare:DatabaseNavigator
(https://github.com/serge-rider/dbeaver/wiki/Database-Navigator),
Projects(https://github.com/serge-rider/dbeaver/wiki/Projects)and
ProjectExplorer(https://github.com/sergerider/dbeaver/wiki/Project-Explorer).
Toopenaview:
OntheWindowmenu,clickShowViewandthen,onthe
submenu,clickthenameoftheview.ClickOtheriftheview
isnotvisibleonthesubmenu.
ForDatabaseNavigator,Projects,andProjectExplorerviews,
ontheWindowmenu,justclickthenameoftheview.
Someviewsopenondemand,forexampletheSearchviewopens
toshowsearchresults.
Viewsprovidetheirowntoolbarandmenu:
Toopentheviewmenu,clicktheViewMenubuttonintheupperrightcorneroftheview`stitlebar,nexttotheMinimizebutton.
Thetoolbarcontainsbuttonsapplicabletotheobjectsdisplayedin
theview.Thesetofenabledanddisabledbuttonsdependsonthe
objectinfocus.
Viewsalsoprovidecontextmenusforobjectstheydisplay.To
openacontextmenuforanobject,right-clicktheobject.
Projects
Projects
Youmightneedtoclassifyandgroupdatabaseconnectionsinto
projects.Projectsstoreobjectsrelatednottoaparticular
databasebuttoalldatabaseconnections.Theseareusuallyfiles
storedonthefilesystem.
TheProjectsviewdisplaysallprojectscreatedinthesystemand
providestoolstomanagethem.ToopentheProjectsview,onthe
Windowmenu,clickProjects(oruse ALT+W+P shortcut).
Forinformationonhowtochangetheviewlayout,pleaseseethe
ApplicationWindowOverview(https://github.com/sergerider/dbeaver/wiki/Application-Window-Overview)article.
Theprojectsareorganizedintoatreeandallhavethesamehighlevelstructure:
Connections–repeatthecontentoftheDatabaseNavigator
viewforthisproject.Youcanperformthesameactionsover
theobjectsofthedatabasesasinDatabaseNavigator.
Bookmarks–containsbookmarks–shortcutstodatabase
objects,see…
ERDiagrams-containsERdiagramsthatyoucandrag-anddropherefromotherfolders
Scripts–containsscriptsthatyoucandrag-and-drophere
fromotherfolders
TheProjectsviewprovidesatoolbarandViewmenuwhichcontain
genericitems.Eachobjectinthetreehasitsowncontextmenu.
ToopentheviewmenuoftheProjectsview,clicktheViewMenu
button(
)intheupper-rightcornerofthewindow.Theview
menucontainsthefollowingitems:
Icon
Item
Create
Project
Refresh
Projects
Collapse
All
Link
with
editor
Description
OpenstheCreateProjectwizard
Refreshestheprojectstreetodisplay
changescausedbycreatingmodifyingor
deletingprojects
Collapsesthetreetotherootlevel
-Enabledwhenatleastoneeditoris
open,otherwisedisabled
-Highlightstheobjectinthetreethat
hasitseditoropen
Thetoolbarislocatedinthetitlebarofthewindow,itsbuttons
duplicatetheviewmenuitemsexceptfortheRefreshProjects
one.
Toopenthecontextmenuforanobjectinthetree,right-clickthe
object.Forinformationaboutcontextmenuitemsofallobjects
undertheConnectionsnodeofthetree,pleaseseeDatabase
Navigator(https://github.com/serge-rider/dbeaver/wiki/DatabaseNavigator).Thecontextmenusofothernodesinthetreecontain
somebasicitemsforcopy-pasting,renaming,deletingobjects,
managingtheirproperties,creatingfolders,etc.
TheSetActiveProjectmenuitem(foraprojectrootnode)
makestheprojectactive,thatisvisibleintheDatabase
Navigator.
TheLinkFile(SQLScript)andLinkFoldermenuitems
allowcreatinglinkstofilesandfoldersinthefilesystem.
ManagingProjects
TheProjectsviewallowscreatingnewprojectsaswellas
renaminganddeletingprojectsthatarenotactive.NOTE:You
cannotrenameordeleteaprojectthatissetasactive.
CreatingProject
Tocreateaproject,intheProjectsview,inthetoolbar,click
CreateProject(
).TheProjectCreateWizardopens.
TBA
DeletingProject
Todeleteaproject,intheProjectsview,right-clickitsnameinthe
treeandclickDeleteonthecontextmenu.Twoconfirmation
dialogboxesappearoneafteranother:
1. Deleteobjectdialogboxistoconfirmthedeletionofthe
projectitself.ClickYesifyouaresureyouwanttodeleteit.
Otherwise,clickNo.
2. Deleteprojectdialogboxistoconfirmthedeletionofthe
project`scontents:thesearethedatastoredinthefile
system,databaseconnectionsarenotaffected.ClickYesif
youwantthecontentstobedeletedaswell.Tokeepthe
contents,clickNo.
NOTE:Ifyouhavedeletedaprojectandthenre-createitwiththe
samename,thenewprojectpicksupallthedatabase
connectionsofthedeletedproject.
ManagingBookmarks
Bookmarksarequickaccesslinkstoobjectsofadatabase.They
appearintheprojecttreeinsidetheProjectsorProjectExplorer
views.
Tocreateabookmark:
1. IntheDatabaseNavigatororunderConnectionsnodeofthe
Projectsview,clickthedatabaseobjectofinteresttoset
focusonit.
2. Press CTRL+d .TheBookmarkNamedialogboxappears.
3. IntheBookmarkNamefield,enterthebookmarkname,
thenintheBookmarkfolderfield,clickthefolder,andthen
clickOK.Thebookmarkappearsintheselectedfolderofthe
relatedproject.
Toopenanobjectusingitsbookmark,double-clickthebookmark
orright-clickitandclickOpenBookmarkonthecontextmenu.
Youcanrenameanddeletebookmarksusingthecontextmenuas
well.
Dataeditor
TheDataeditorappears:
AstheDatataboftheDatabaseObjectEditor
(https://github.com/serge-rider/dbeaver/wiki/Database-ObjectEditor)availableonlyfortablesandviews.
AstheResultstabwhenyourunacustomSQLqueryinSQL
Editor(https://github.com/serge-rider/dbeaver/wiki/SQLEditor)
TheDataeditorallowsviewingandeditingthedataofadatabase
tableorview.ThecentralpartoftheDataeditoristhedatatable.
Theeditoralsoprovidestwotoolbarsandafilterfield:
Everycellinthedatatablehasacontextmenu–right-clickthe
celltoopenthemenu.Thecontextmenuprovidesthefollowing
items:
MenuItem
Description
Cutsthecontentofthecurrentcellor
Cut
Copy
Advanced
Copy
Paste
columntotheclipboard
Copiesthecontentofthecurrentcellor
columntotheclipboard
Opensadvancedcopysubmenuthatallows
copyingdatawithpresetformatting
parameters
Pastesthecopiedcontenttothecellsin
focus
Advanced
Pastesseveralvaluesdelimitedwitha
Paste
tabulationorlinebreak
Deletestherowthathasthecellinfocus
NOTE:Infact,whenusersclickDelete,the
Delete
systemonlyhighlightstherowredwhilethe
actualdeletionhappenswhenusersclick
Save.
-ForCLOB/BLOBdataformat,opensthe
Editcell
contentsofthecellinanewtab
-ForallformatsexceptCLOB/BLOB,opensa
propertieswindowforthecell
Inlineedit
SettoNULL
-Sameasdouble-clickonacell
-Makesthecelleditable
SetsthevalueofselectedcellstoNULL
Hidesthecolumncurrentlyinfocus,seethe
Hidecolumn
ManagingDisplayofColumnsinDataTable
sectionfurtherinthisarticle
Saveto
file…
-AppearsonlyforcolumnswithBLOB/CLOB
data
-OpensthestandardSaveAswindowthat
allowssavingdatacontainedinthecelltoa
file
Loadfrom
file…
-AppearsonlyforcolumnswithBLOB/CLOB
data
-Opensastandardwindowforopeningfiles
Displaysasubmenuthatallowsselecting
filtercriteriaforthedata.Thesubmenu
containsthemostcommonfiltersthatcan
beappliedtothecellinfocus–seedetails
Order/Filter
in…
Bydefault,DBeaverfiltersdatabysending
arequesttotheserver(theServer-side
resultsorderingcheckboxselected).Tofilter
dataontheclientsideusingDBeaver`s
internalalgorithm,clearthecheckbox.
Opensasubmenuthatprovidestoolsfor
View/Format
formattingandmodifyingtheviewofdata,
see…
Navigate
Layout
Opensasubmenuthathelpsusersnavigate
throughoutthedatatable,see…
Changesthelayoutofdata,see…
OpenstheDataTransferwizardthatguides
youthroughthestepstoselectaformat
Export
andexportdata
NOTE:Thesystemexportsthewholeresult
Resultset…
setincludingrecordsthatarenotvisiblein
thescreenandpreservesallapplieddata
filtersandordering.
Generate
Opensasubmenuonwhichyoucanselect
SQL
thetypeofSQLquerytogenerate
Refresh
Refreshesthewholeresultssetincludingall
itemsthatarenotvisibleinthescreen
SQLEditor
YoucancreatemultipleSQLscriptsforasingleconnection.Every
scriptopensinitsownSQLeditor.ToopenanSQLeditorforsome
connection:
ClickthisconnectionintheDatabaseNavigator
(https://github.com/serge-rider/dbeaver/wiki/DatabaseNavigator)viewandpress F3 orclickSQLEditor->SQL
Editoronthemainmenu.Alternatively,youclickSQLEditor
onthecontextmenuofthisconnection.DBeaveropensthe
ChooseSQLscriptwindowwithsavedSQLscriptslinkedto
thisconnection.CLicktheSQLscripttoopenitinaseparate
tab.
ClickRecentSQLEditoronthecontextmenuforthis
connectionoronthemainmenu(SQLEditor->Recent
SQLEditor).ThisopensthelatestusedSQLeditor.Youcan
alsoopenthemostrecentSQLeditorusing Ctrl+Enter
shortcutintheDatabaseNavigatorview.
IfyouneedtocreateanewSQLscript,onthemainmenu,
clickSQLEditor->NewSQLEditororpress F3 andthen
clickNewScriptintheChooseSQLScriptwindow.
DBeaverusesSQLsyntaxhighlightingwhichdependsonthe
databaseassociatedwiththescript.Differentdatabaseshave
differentsetsofreservedkeywordsandsystemfunctions.
NOTE:SQLEditorforaconnectionisdifferentfromSQLconsole
foratableorview(right-clickthetableandclickReaddatain
SQLconsole)inthat,unliketheconsole,itcansavescriptsand
changestothem.
YoucanseeallyoursavedSQLscriptsintheProjectExplorer
(https://github.com/serge-rider/dbeaver/wiki/Project-Explorer)
viewintheScriptsfolder.
TheSQLeditorincludesthescriptpaneatthetopandresults
paneatthebottom:
ResultsPane
Theresultspanedisplaystabswithresultsinvariousformats.The
tabsresultingfromscriptexecutionrepresentinstancesofthe
DataEditor(https://github.com/serge-rider/dbeaver/wiki/DataEditor).Youcancreate,editandexecuteSQLscriptsinthescript
paneandthenseetheresultsintheresulttabs.
Totoggle(hide/show)theresultspane,press F6 .
Tomaximizetheresultspane,press Shift+F6 ordouble-click
theresultstabname.
Toswitchbetweenthescriptpaneandtheresultspane,press
Alt+F6 .
TheresultspaneprovidesOutputandLogviewsofresults.
TheexecutionLogtabcontainsallqueriesexecutedinthecurrent
SQLeditor:
TheOutputtabcontainsallserver-sidedatabase
messages/warningsgeneratedbyadatabasewhenyouexecute
queries.Thisfeatureissupportedonlybyafewdatabaseengines
(Oracle,SQLServerandsomeotherones).
Hyperlinks
Youcanpress Ctrl andmovemouseoverSQLtext.IfDBeaver
recognizessomeidentifierasatable/viewnamethenitpresentsit
asahyperlinkwhichwillnavigatetothisobject`seditor.
ActiveDatabase/Schema
Selection
TochangetheconnectionassociatedwiththecurrentSQLeditor
orchangetheactivedatabase/schema,usethecomboboxesin
themaintoolbar:
TransactionsManagement
Youcantoggleauto-commitmodeandtransactionsisolationlevel
ontheDatabasemenuorinthemaintoolbar:
MongoDB
Note:MongoDBextensionisavailableonlyinEnterpriseEditionversion.
BrowsingMongocollections
Youcanview/editMongocollectionscontentasstandardrelational
tables(grid/plaintextpresentations)orasJSONdocuments.
PresentationcanbeswitchedintheResultsViewertoolbar.
IngridDBeaverwilltrytounifyalldocumentsinsomeparticular
collection(astheyhavethesamestructure/thesamesetof
properties).
ExecutingJS
JSstatementscanbeexecutedinSQLeditorasusual.
Mongoscriptingreference
(https://docs.mongodb.com/v3.0/administration/scripting/)
Followingexamplecreatesauserinthecurrentdatabase.
db.createUser(
{
user:"testuser",
pwd:"test",
roles:[]
}
)
Thisexamplereturnsalldocumentsincollection'test_col':
db.test_col.find().toArray()
Note:scriptwillbeexecutedinthecurrentdatabase.Youcannot
setexplicitdatabasenameinyourquery.Currentdatabasecanbe
changedinSQLEditortoolbarorinDatabaseNavigator.
ExecutingSQL
YoucanusestandardSQLstatements(SELECT,INSERT,UPDATE,
DELETE)tomanipulateMongodata.
SELECT*FROMtest_col
WHEREpropName.subProp='value';
UPDATEFROMtest_col
SETpropsName.val1=123
WHEREpropName.subProp='value'
NestedJSONpropertiescanbedividedbydot.
Office
ThisextensionsupportsdataexportinOfficeformats(XLS).
ItisincludedinEEversion.
InstallationinCEversion:
1. Mainmenu Help->InstallNewSoftware
2. InstallOfficeextension.YoucandothisfromonlineEclipse
Marketplace
(https://marketplace.eclipse.org/content/dbeaver-officeintegration(https://marketplace.eclipse.org/content/dbeaveroffice-integration)).Oryoucandothismanually:
Paste https://dbeaver.jkiss.org/update/office/latest/ into
Workwith
fieldandpress Enter
Check DBeaverExtension->DBeaverOfficeExtension item
3. ClickNext->Finish.RestartDBeaver.
Note:thisworksonlyifDBeaverversionmatchesOfficeextension
version(e.g.latest).
SVGformat
ThisextensionsupportsdataexportinOfficeformats(XLS).
ItisincludedinEEversion.
InstallationinCEversion:
1. Mainmenu Help->InstallNewSoftware
2. InstallOfficeextension.YoucandothisfromonlineEclipse
Marketplace
(https://marketplace.eclipse.org/content/dbeaver-svg-support
(https://marketplace.eclipse.org/content/dbeaver-svgsupport)).Oryoucandothismanually:
Paste https://dbeaver.jkiss.org/update/svg/latest/ into Work
with
fieldandpress Enter
Check DBeaverExtension->DBeaverOfficeExtension item
3. ClickNext->Finish.RestartDBeaver.
Note:thisworksonlyifDBeaverversionmatchesOfficeextension
version(e.g.latest).
Diagrams(ERD)
EntityRelationDiagrams(ERD)aregraphicpresentationsof
databaseentitiesandrelationsbetweenthem.DBeaverallows
viewingdiagramsofexistingtablesandwholedatabaseschemas,
seeDatabaseStructureDiagrams(https://github.com/sergerider/dbeaver/wiki/Database-Structure-Diagrams),aswellas
createcustomdiagrams,seeCustomDiagrams
(https://github.com/serge-rider/dbeaver/wiki/Custom-Diagrams)
Bothtypesofdiagramsprovidethesametoolstoadjusttheirview
andstructure.Theycanbeprintedandexportedtoimagefile
formats.
StructureAdjustment
NOTE:Allchangestoexistingdatabaseschemascannotbesaved
andareintendedforexplorationpurposesonly.
Youcandothefollowingstructurechangesindiagrams.
Addnewtablestoadiagrambydrag-n-droppingthemonto
thediagramfieldfromtheDatabaseNavigator
(https://github.com/serge-rider/dbeaver/wiki/DatabaseNavigator).
Rearrangetablesinthediagrambydraggingthemallover
thespace.Youcanselectseveraltablesanddragthemtoa
newlocation.
Auto-arrangetablesintoacompactviewaftermanual
rearrangements:clicktheArrangeDiagram(
)inthe
toolbaroronthecontextmenu(right-clickanywhereonthe
diagramtab).
(AvailableforCustomDiagrams(https://github.com/sergerider/dbeaver/wiki/Custom-Diagrams)only)-connecttables
withaconnector:clicktheShowPalettebutton( )inthe
upper-leftcornerofthediagramtabandthen,inthePalette
panel,clickConnection.Nowclickthetablesthatyouwant
toconnectwitheachotherinturnonebyone,andthento
stoptheconnectionlinedouble-clickingthelasttable.
(AvailableforCustomDiagrams(https://github.com/sergerider/dbeaver/wiki/Custom-Diagrams)only)-removetables:
right-clickthetableandclickDeleteonthecontextmenu.
ViewAdjustment
Youcanadjusttheviewofanydiagraminthefollowingways:
Enable/disablethediagramgrid:ClickToggleGrid(
)in
thetoolbar.
Modifyattributesvisibility:Right-clickthediagramand,onthe
contextmenu,clickShowAttributesandthenoneofthe
options:
All-allattributes
Anykeys-primaryandforeignkeys
Primarykey-onlyprimarykeys
None-noattributes
Modifyattributespresentation:Right-clickthediagramand,
onthecontextmenu,clickAttributeStylesandthenoneof
theoptions:
ShowIcons
ShowDataTypes
ShowNullability
ShowComments
Changethecolorofentities/notes:Right-clicktheheaderof
theentityorcommentandthenclickSetcoloronthe
contextmenu.ThenyoucanselectthecolorandclickOK.
Forelementslocatedinfrontof/behindothers,bringan
elementtofrontorsendtoback:Right-clicktheelementand
thenclickBringtofront/Sendtobackonthecontext
menu.
Zoomthediagramin/out:ClicktheZoomIn/ZoomOut
buttonsorchoosethescalingvalueinthedropdownlistinthe
toolbar:
Refresh
Toseechangesmadetothedatabaseschemabyotherusers,you
mightneedtorefreshthediagram:clickRefreshDiagram(
)
inthetoolbar.
NotesCreation
YoucancreatenotesonlyinCustomDiagrams
(https://github.com/serge-rider/dbeaver/wiki/Custom-Diagrams).
Tocreateanote,clicktheShowPalettebutton( )intheupper-
leftcornerofthediagramtab,then,inthePalettepanel,click
Noteandthenclickanywhereinthediagramtab.Nowyoucan
double-clickNoteboxtoenterthenotetext.
SearchinDiagramEntities
Tosearchamongentitiesofadiagram,clicktheSearchitems
button(
)inthetoolbar,thentypeinthesearchcombination.
Theentitiesthatcontainthesearchcombinationarehighlighted
inthediagram.
Toremovethefilter,clickthecrossiconnexttothesearchfield.
DiagramExport
Youcanexport(save)adiagramasanimage(PNG,GIF,BMP
formats)orasafileinGraphMLformat.Toexportadiagram,click
Savediagraminexternalformat(
)inthetoolbar.
DiagramPrinting
Toprintadiagram,press CTRL+P orclickPrintDiagram(
)in
thetoolbar.
Settings
Tomodifythediagramsettings,clickConfiguration(
toolbar.
)inthe
QueryManager
IntheQueryManagerviewyoucanseeallSQLqueriesDBeaver
executes.
DBeaverlogseveryqueryyouexecute.Youcanseeallpreviously
executedqueriesinthespecialview“QueryManager”.Youcan
openitthroughmainmenu“Window->ShowView”.
Youcanseequeryexecutionstatistics(executiontime,numberof
fetched/updatedrows,errors,etc).
EEversionpersistsallexecutedqueriesintheinternaldatabase
soexecutionhistoryisavailableafterprogramrestart.
BydefaultQMshowsonlyqueriesexplicitlyexecutedbyuser(in
SQLeditororinDataEditor).Youcanconfigurelogsvisibility,
monitormetadatareadingqueries,utilitySQL,etc.QM
configurationavailableinglobalpreferences.
Command-Line
Commandlineparameters
Commandlineparametersmightbepasseddirectlyto
dbeaver[.exe]executable.
OnWindowsyoualsocanuse dbeaver-cli.exe executable(it
doesn'tspawnnewwindowsoyoucanseeoutputmessages).
DBeavercontrol
Name
Value
-help
Printshelpmessage
-stop
QuitsDBeaver
-dump
Example
PrintsDBeaverthread
dump
-fc:\some-
-f
OpensfileinDBeaverUI
path\somefile.sql
See
-con
Opensdatabase
connection
connectioninDBeaverUI
parameters
table
-closeTabs
-disconnectAll
Closesallopeneditortabs
Closesallopen
connections
Forcereuseofsingle
-
workspacebymultiple
reuseWorkspace
DBeaverinstances
ForcenewDBeaver
-newInstance
instancecreation(donot
trytoreusealready
runningone)
Systemparameters
Name
Value
Example
-nl
Locale
en_US
-data
Workspace
path
-
Omitssplash
nosplash
screen
c:\ProgramData\MyWorkspace
true
Clearsall
Eclipsecaches.
Useitif
-clean
DBeaverfails
tostartafter
version
upgrade.
-vmargs
VMparameters
VMarguments
SeeVMargumentstable
YoucanpassanyadvancedJavaparameterssupportedbyyour
localJVM(Oracle,OpenJDK,IBM,etc).
ParameterssupportedbyOracleJVM(1.8):
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
(https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html)
ParameterssupportedbyallJVMs:
Name
-Xms
-Xmx
Value
Example
Setsinitialmemoryavailablefor
-
DBeaver
Xmx1000m
Setsmaximummemoryavailablefor
-
DBeaver
Xmx4000m
Connectionparameters
Allconnectionparametersmustbesuppliedasasinglecommand
lineargument,parametersaredividedbypipe( | ).Parameter
nameandvaluearedividedby = .
Example:-con
driver=sqlite|database=C:\db\SQLite\Chinook.db|name=SQLiteChin|openCon
Name
name
driver
Value
Connection
name
Driver
nameorID
Connection
URL.
Optional
Example
Testconnection
driver=sqlite
, driver=mysql ,etc
(JDBCURL
url
maybe
url=jdbc:sqlite:C:\db\SQLite\Chinook.db
constructed
bydriver
fromother
parameters)
Database
host
hostname
host=localhost
(optional)
Database
port
port
number
port=1534
(optional)
Database
server
server
name
server=myserver
(optional)
Database
database
nameor
path
database=db-name
(optional)
user
Username
(optional)
user=root
User
password
password
(optional)
Donotask
use
password=mysecret
savePassword
password
savePassword=true
onconnect
Connectto
connect
this
connect=false
database
OpenSQL
consolefor
this
openConsole
database
openConsole=true
(sets
connect
to
true)
Putnew
folder
connection
folder=FolderName
inafolder
Sets
connection
auto
autoCommit
commitflag
(default
autoCommit=true
value
dependson
driver)
Advanced
connection
prop.propName
parameters
(dependon
driver)
prop.connectTimeout=30
Managingconnections
Thisguidedescribeshowtomanage/secureDBeaverdatabase
connections.ItisdesignedforSystemadministrators.Regular
usersshouldcheckthisguide.
Providepredefinedconnections
DBeaverkeepsinformationaboutprojectconnectionsinfile
.dbeaver-data-sources.xml
.Youcanfinditinprojectfolder(by
defaultallprojectsresideinworkspace,defaultworkspace
locationis %HOMEPATH%\.dbeaver4 (or ${HOME}/.dbeaver4 ).Default
projectfolderis %HOMEPATH%\.dbeaver4\General .
DBeavercanloadmultipleconnectionfiles.Anyfilesinproject
foldermatching .dbeaver-data-sources*.xml patternwillbeloaded
onstartup.Soyoucancreateafile,say, .dbeaver-data-sources2.xml
intheprojectfolderandDBeaverwillseeit.
ImportingconnectionsfromCSV/XML
YoucanimportconnectionfromCSVorXMLfiles.
CSVfilemusthaveaheaderrow(firstlineoffile)withcolumn
names(seelistofsupportedcolumnsbelow).XMLfileshould
containtop-levelelementandasetofnestedelements.
Connectionsconfigmustbespecifiedinattributesofnested
elements.AttributenamesarethesameasCSVcolumnnames.
Supportednames:
Name
Meaning
name
Connectionname
url
JDBCURL
host
Databaseserverhostname
port
Databaseserverport
database
Database/schemaname
user
Username
password
Userpassword
YoucanspecifyjustURLorsethost/port/etcsetting.
Username/passwordareoptions.
SampleCSV
name,host,port,server,database,url,user,password,type
PostgreImportXML1,localhost,5432,,postgres,jdbc:postgresql://loc
alhost:5432/postgres,postgres,postgres,dev
PostgreImportXML2,localhost,5432,,postgres2,jdbc:postgresql://lo
calhost:5432/postgres2,postgres2,postgres2,prod
SampleXML
<connections>
<connectionname="PostgreImportXML1"host="localhost"port="
5432"server=""database="postgres"url="jdbc:postgresql://localhos
t:5432/postgres"user="postgres"password="postgres"type="dev"/>
<connectionname="PostgreImportXML2"host="localhost"port="
5432"server=""database="postgres"url="jdbc:postgresql://localhos
t:5432/postgres2"user="postgres2"password="postgres2"type="prod"
/>
</connections>
Secureconnectionsfromediting
Itispossibletomakeconnectionsettingsread-only(protectedby
password)
GenerateMD5hashofyourpassword.Youcandoitfrom
commandlineusingLinuxutilitymd5sum( md5sum<<<"your
password"
)oryoucandoitonline-justgoogle"MD5hash
online".
Addattribute lockPassword inconnectiondescriptor(in
.dbeaver-data-sources.xml
filein <dataSource> tag.Soitwilllook
likethis:
<data-source
id="postgresql-1294077257514--1782558860"
provider="postgresql"
driver="postgres-jdbc"
name="Postgre-sample"
create-date="1294077257524"
update-date="1468749632751"
login-date="1469021247956"
save-password="true"
show-system-objects="true"
read-only="false"
lockPassword="2ba81a47c5512d9e23c435c1f29373cb">
Nowifuserwilltrytochangeconnectionsettingshe/shewill
beaskedforpassword
Managingdrivers
Configuredriverswithpre-installedjars
Youcancustomizedriversconfigurationin
${HOME}/.dbeaver4/.metadata/.plugins/org.jkiss.dbeaver.core/drivers.xml
file.Ifyouhavesomepre-installedjarfilesyoucanreference
themindrivers.xml.Example:
<librarytype="jar"path="absolute-jar-folder-path\driver-jar.jar"
custom="true"/>
Alsoindrivers.xmlyoucanusefollowingvariablestospecify
relativepaths:
Variable
drivers_home
Meaning
StandardDBeaverdriverslocation
( ${HOME}/.dbeaver-drivers bydefault)
dbeaver_home
DBeaverinstallationfolder
home
Userhomefolder
workspace
DBeaverworkspacepath
( ${HOME}/.dbeaver4 bydefault)
Forinstance:
<librarytype="jar"path="${dbeaver_home}\drivers\my-driver.jar"cu
stom="true"/>
DevelopinEclipse
DBeaverisanEclipseRCP
(https://wiki.eclipse.org/Rich_Client_Platform)application.
ItconsistsfromasetofEclipseplugins,featuresandproducts.
Sourcesstructure:
docs
-somedocumentations(mostlyoutdated)
features
-featuredescriptors.Doesn'tcontainanysource
code.Usedtostructurizeproductplugins/dependencies.
bundles
-verybaseplugins(likeutils)
plugins
-mainsourceslocation
org.jkiss.dbeaver.model
-modelAPIandbaseclasses.
Doesn'tcontainanyUIdependencies,justpuredata
model.
org.jkiss.dbeaver.core
-mainDBeavermodule.Mostof
baseUIclassesarehere.
org.jkiss.dbeaver.core.application
-relativelysmall
modulewhichconfiguresstandaloneDBeaverapplication.
org.jkiss.dbeaver.core.eclipse
-mainEclipseplugin.Adds
someextramenus/viewstostandardEclipseIDE.
org.jkiss.dbeaver.ext.*
product
-DBeaverextensions
-finalproducts(standaloneandEclipseplugin)
configuration.
OpeningworkspaceinEclipse
Youwillneedtosetup"EclipseforRCPandRAPdevelopers
(https://www.eclipse.org/downloads/packages/eclipse-rcp-and-rapdevelopers/oxygen1a)".CurrentlydefaultEclipseversionis
Oxygen(4.7).Buildmayfailonnewerorolderversions.
ThenyouwillneedtoinstallafewadditionalEclipsepluginswhich
DBeaverdependson(andwhicharenotincludedinthestandard
Eclipsedistribution):
OpenmainmenuHelp->InstallNewSoftware
Copy http://dbeaver.jkiss.org/eclipse-repo/ into"Workwith"
fieldandpressenterimages/eclipse-deps-install.png
Checkallpluginsandfinishtheinstallationprocess
NowyouneedtocheckoutDBeaverrepositorywith gitclone
https://github.com/serge-rider/dbeaver.git
command.
InEclipsecreateanewworkspaceandrunImportwizard.Choose
"General->ExistingprojectsintoWorkspace".
SelectDBeavercheckoutdirectoryasrootadirectory.Checkall
pluginsandfeaturesEclipsewillfindandfinishthewizard.
NowyoucanbuildDBeaver( Ctrl+B ).Torunthestandalone
versionfindfile DBeaver.product (itislocatedin product/standalone
directory).Openitandclickon"LaunchanEclipseapplication"or
"LaunchanEclipseapplicationinDebugmode".
Ifproductwon'tstartwith Noapplicationidhasbeenfound errortry
thisworkaround:
https://stackoverflow.com/questions/13575695/eclipse-rcp-noapplication-id-has-been-found
(https://stackoverflow.com/questions/13575695/eclipse-rcp-noapplication-id-has-been-found)
WhatyouneedtodoisgotoyourRunConfigurations(Run>RunConfigurations).SelectthePlug-instabandthenhit
"AddRequiredPlug-ins".Apply,thenRun,anditshouldwork
now.
That'sit.
Notes:
EverythingabovecoversCommunityEditionversion.
Featuresstructure
FeaturesStructure
TheDBeaverfeaturesarestructuredtosupportboth"IDE"and
"RCA"mode
(https://github.com/sergerider/dbeaver/wiki/images/development/DBeaver-CEFeatures.png)/images/development/DBeaver-CE-Features.png
Resetworkspace
Sometimes(especiallyaftermultipleDBeaverversionsupgrade)
workspacebecomemessy.
Somekeyboardshortcutsmaystopworking,toolbarslayoutmay
bebroken,etc,etc.
ToresetallUIsettings(thisincludesmenus,shortcuts,viewand
toolbarlayouts):
1. ShutdownDBeaver
2. Gotodirectoryto
%HOMEPATH%\.dbeaver\.metadata\.plugins\org.eclipse.e4.workbench\
Windows: Win+R ,enter
%HOMEPATH%\.dbeaver\.metadata\.plugins\org.eclipse.e4.workbench\
Linux: cd
$HOME/.dbeaver/.metadata/.plugins/org.eclipse.e4.workbench/
3. Deletefile workbench.xmi
4. StartDBeaver
Ifthatdoesn'thelpthenyoucantrytoremove
%HOMEPATH%\.dbeaver\.metadata\
folder.ThiswilleraseallyourUI
settingsandSQLscriptsconfigurations(butallconnectionsand
scriptswillremain).Doitonlyifnothingelsehelps!
That'sit.
Postingissues
Afewtips.
Checkexistingissuesforyourissue(includingclosedones).
Duplicatinganissueisslowerforbothpartiessosearch
throughopenandclosedissuestoseeifwhatyou’rerunning
intohasbeenaddressedalready.
Beclearaboutwhatyourproblemis:whatwastheexpected
outcome,whathappenedinstead?Detailhowsomeoneelse
canrecreatetheproblem.
Ifyoupostingabugreportcheck"ErrorLog"view.Ifthereare
anyerrorsrelatedtoyourbugthenpostacomplete
stacktrace.SometimestherearenoerrorsinErrorLog-then
trytofindtheminlogfiles.
Ifyourissueisrelatedtoadatabasedataormetadata
management-checktheQueryManagerview.Itcontains
informationaboutallqueriesDBeaverexecutes(explicitlyor
implicitly).Toseemoredetailedinformationyoucan
configureQueryManagerinPreferences.images/qm-view.png
Dependingonthenatureofyourbugreportprovide
informationabout:
Operatingsystem
Windowmanager(forLinux)
Database(nameandversion)
Databasedriver(nameandversion)
Donotwriteissuetypeintheissuetitle(likeFeature
Request:,Bug:etc).We'llreviewyourissueandassigna
correspondinglabel.
Logfiles
DBeaverwritesdifferentlogfiles.MostofthemareEclipselogs.
Usuallylogfilesresidesintheworkspace.
Defaultworkspacelocationis ${HOME}/.dbeaver ( ${HOME}/.dbeaver4
forDBeaver4.x+).
Twostandardlogfiles:
<workspace-path>/.metadata/.log
-allwarningsanderrorswhich
happensduringnormalwork
<workspace-path>/.metadata/dbeaver-debug.log
-thesameas .log
plusdebuginformation
Inspecialcaseslogfilescanwritteninotherdirectories.Special
caseisanemergencysituationwhenDBeavercan'tstartand
thereisnoworkspace.Twotypicalplacestofindemergencylogs:
<install-path>/configuration
${HOME}/.eclipse/org.jkiss.dbeaver.product_<dbeaver-version>
Ifyouarereportingaboutsomeerrorpleaseattachlogs(not
completefilebutvaluablepartofit).
Logsareveryuseful,bignumberoferrorscan'tbe
reproduced/fixedwithoutfullerrorstacktrace.
Threaddump
Sometimes(duetosomebug)DBeaverUIhangs,freezesorworks
incorrectly.Usuallyitisimpossibletofindthereasonofsuch
problemwithoutthreaddump.Threaddumpistheinformation
aboutinternalexecutionstateofJavaprogram.Togetthread
dump:
MacandLinux
Runthefollowingonyourterminal:
jstack$(psaux|grep-m1dbeaver|awk'{print$2}')>thread-dump
.txt
Windows
Justopentaskmanager(CTRL+Escape),findDBeaverinthe
processlistandcopyprocessIDvalue.OnWindows8+youneed
toswitchto"Details"tab.Run
jstack<PID>>thead-dump.txt
inCommandPrompt.
Nowyoucanattachthread-dump.txttotheGitHubissue.
Download PDF
Similar pages