IBExpert - Firebird...Firebird Demo Database db1_30.sql demodb script Table Editor – Field...
Transcript of IBExpert - Firebird...Firebird Demo Database db1_30.sql demodb script Table Editor – Field...
IBExpert
Advanced IDE Usage
Firebird Conference 2019Berlin, 17-19 October
Products
● Personal Edition● Day Edition● Developer Studio● CYE/ESYE● OEM
Modules
● IBExpert.exe● IBEscript.exe/IBEScript.dll● hkscc
Firebird Demo Database
● db1_30.sql demodb script● Table Editor
– Field dependencies
● Procedure Editor– Version History
● DB Registration– Show Systemtables
Package Editor
● Putils Package– Procedure Psoundex
● Header● Body
Functions
● Soundex– Lazy mode off
– Function uses SP for implementation
● IBExpert FreeAdhoc Function Library– Replacement for FreeAdhoc UDF dll/so
– Complete Implementation available for example for averp.fdb database on request
● Almost any existing dll/so udf can be converted– Ask IBExpert team for details
Version History
● Also available for – Functions– Trigger
– Packages
– Stored procs
SQL Editor
● Drag and drop objects from db explorer– Db registration
– Table object● Alias● Var prefix● Perform Code formatting
● Code Completion ● Keyboard Templates
SQL Editor <> Script Executive
● Multiline SQL Statements →Script executive● Singleline SQL Statements → SQL Editor● Both can only execute parts when parts are selected● Db Query Organizer● execute procedure initall(10000)
– Message– Performance Analysis
Debugging
● Open SP DELETEALL– Debugger
– Params, Breakpoints etc
– Debug mode:Collect Statistics
– F9 Run
– Goto Statistics Page ● Order by columns that took longest time
– Set breakpoint with condition
V_TOP100SALES View and how it works● Select on a stored proc● select * from v_top100sales in sql editor
– Runs massive operation only once per minute
– See sp for details
● Basic concept Materialized View
Using Version Control
● Tools-extract metadata– Vcs files
● Extract all to C:\conf\ex\● Open windows explorer, show file content● One file per object
– Separate Files● All meta objects and all data incl. Blobs● Optional Where clause● C:\conf\ex2\● Open windows explorer, show folder content
Stored Procedure/Trigger View Analyzer● Red lines → bad
– Unused variable– Compatibilty
– No pk
Dependencies Viewer
● Tools-dependencies viewer– Drag and drop product table– Expand all
Tools - Table data compare
● Master db1● Target db2● Select product table● Online sync● Options
Trace API
● Real world example● How to set up?● Grid mode
Benchmark
● How to measure speed of firebird hardware/software– Ibexpert benchmark– Params
● Ext● Async
Database inside
● What is database inside● How to use?● Db repair and export from corrupt databases
IBExpert
●Advanced IBExpert Scripting
IBEBlock Script Language
● Basic compatibilty to SP and Trigger language● A lot of extension
– Script editor– Drag and drop connection to editor
● Ibeblock create connection● ibec_createconnection F1● Odbc example
– Ibec_*
DLL and exe
● Exe parameter– Use params for
● Connectionstring● Username and password● Global variable● -e encrypt script file to unreadable mode
● DLL– Example
– Lazarus source code
Tools Extract Metadata
● Commandline based example– downgrade/upgrade db with global changes
● Charset● Owner
● Create script for extract● Show basics to search/replace in ibe$*.sql files
– ibec_stringreplace
– ibec_loadfromfile
– ibec_savetofile
More examples
● Email processing● Url Downloading● Reporting and pdf creation● Running ibescript from Windows Scheduler
Other tools
● Ibegbak.exe● Ufw.exe● Hkscc.exe● Watchdog