Difference between revisions of "TFBAdmin/fr"

From Lazarus wiki
Jump to navigationJump to search
(Created page with "{{TFBAdmin}} {{Infobox databases/fr}} '''TFBAdmin''' image:tfbadmin.png is a component that aids in Interbase/Firebird administration tasks. It can be found on the SQLd...")
 
m (Fixed syntax highlighting)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
 
{{Infobox databases/fr}}
 
{{Infobox databases/fr}}
  
'''TFBAdmin''' [[image:tfbadmin.png]] is a component that aids in Interbase/Firebird administration tasks. It can be found on the [[SQLdb tab]] of the [[Component Palette]] and resides in the FBAdmin unit. It provides the following functionality:
+
'''TFBAdmin''' [[image:tfbadmin.png]] est un composant qui aide dans les tâches d'administration de Interbase/Firebird. Il se trouve dans l'[[SQLdb tab/fr|onglet SQLdb]] de la [[Component Palette/fr|palette de composants]] et réside dans l'unité FBAdmin. Il fournit les fonctionnalités suivantes :
* add, modify or delete database users
+
 
* backup and restore databases using single or multiple (split) files
+
* Ajoute, modifie ou supprime les utilisateurs de la base de données.
* get general database information
+
* Sauvegarde et restaure les bases de données en utilisant des fichiers simples ou multiples (découpage ''split'')
* get the database log file listing important database events and errors
+
* Obtenir des informations générales sur la base de données.
There is also a Lazarus component and demo that allows use of the FPC TFBAdmin component.
+
* Obtenir le fichier journal de la base de données listant les événements et erreurs importants de la base de données.
 +
 
 +
Il y a aussi un composant Lazarus et une démo qui permettent l'emploi du composant FPC TFBAdmin.
  
 
== Exemple ==
 
== Exemple ==
This shows how to create a multi file backup of a database on a linux server; 3 backup files, size limited to 600MB; backup progress shown in a TMemo:
+
 
<syntaxhighlight>
+
Ceci montre comment créer une sauvegarde multi-fichier d'une base de données sur un serveur Linux ; 3 fichiers de sauvegarde, limités en taille à 600 Mo ; la progression de la sauvegarde est montrée dans un TMemo :
procedure TForm1.logadm(Sender: TObject; msg: string; IBAdminAction: string);
+
 
 +
<syntaxhighlight lang=pascal>
 +
procedure TForm1.logadm(Sender: TObject; msg: string; IBAdminAction: string);0
 
begin
 
begin
 
   Memo1.Lines.add(IBAdminAction+' : '+msg);
 
   Memo1.Lines.add(IBAdminAction+' : '+msg);
Line 44: Line 48:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
A demo program is also available in the examples directory of the fcl-db package.
+
Un programme de démo est aussi disponible dans le dossier des exemples du paquet fcl-db.
  
The following example shows how to backup to and restore from a single file on a Windows-server:
+
L'exemple suivant montre comment sauvegarder vers et restaurer depuis un fichier unique sur un serveur Windows :
<syntaxhighlight>
+
 
 +
<syntaxhighlight lang=pascal>
 
uses  
 
uses  
 
   FBAdmin;
 
   FBAdmin;
Line 108: Line 113:
  
 
== Voir aussi ==
 
== Voir aussi ==
 +
 
* [[Firebird/fr|Firebird]] Utilisation de Firebird avec FPC/Lazarus SQLdb.
 
* [[Firebird/fr|Firebird]] Utilisation de Firebird avec FPC/Lazarus SQLdb.
  
 
{{LCL Components/fr}}
 
{{LCL Components/fr}}

Latest revision as of 04:51, 1 March 2020

English (en) français (fr)

Portail de la base de données

Références:

Tutoriels/articles pratiques :

Bases de données

Advantage - MySQL - MSSQL - Postgres - Interbase - Firebird - Oracle - ODBC - Paradox - SQLite - dBASE - MS Access - Zeos

TFBAdmin tfbadmin.png est un composant qui aide dans les tâches d'administration de Interbase/Firebird. Il se trouve dans l'onglet SQLdb de la palette de composants et réside dans l'unité FBAdmin. Il fournit les fonctionnalités suivantes :

  • Ajoute, modifie ou supprime les utilisateurs de la base de données.
  • Sauvegarde et restaure les bases de données en utilisant des fichiers simples ou multiples (découpage split)
  • Obtenir des informations générales sur la base de données.
  • Obtenir le fichier journal de la base de données listant les événements et erreurs importants de la base de données.

Il y a aussi un composant Lazarus et une démo qui permettent l'emploi du composant FPC TFBAdmin.

Exemple

Ceci montre comment créer une sauvegarde multi-fichier d'une base de données sur un serveur Linux ; 3 fichiers de sauvegarde, limités en taille à 600 Mo ; la progression de la sauvegarde est montrée dans un TMemo :

procedure TForm1.logadm(Sender: TObject; msg: string; IBAdminAction: string);0
begin
  Memo1.Lines.add(IBAdminAction+' : '+msg);
end;

procedure TForm1.backup;
var
  Admin:TFBAdmin;
  sl:TStringList;
begin
  Admin:=TFBAdmin.Create(self);
  sl:=TStringList.create;
  try
    Admin.UseExceptions:=true;
    Admin.Host:='192.168.2.98';
    Admin.Protocol:=IBSPTCPIP;
    Admin.User:='sysdba';
    Admin.Password:='masterkey';
    Admin.Port:= 3050;                   //change if not using the default port
    Admin.Connect;
    Admin.OnOutput:=@logadm;
    sl.Add('/home/firebird/test.bak1');
    sl.Add('/home/firebird/test.bak2');
    sl.Add('/home/firebird/test.bak3');
    Admin.BackupMultiFile('/home/firebird/test.fdb',sl,600000000,[IBBkpVerbose]);
  finally
    sl.Destroy;
    Admin.Destroy; //disconnects automatically
  end;
end;

Un programme de démo est aussi disponible dans le dossier des exemples du paquet fcl-db.

L'exemple suivant montre comment sauvegarder vers et restaurer depuis un fichier unique sur un serveur Windows :

uses 
  FBAdmin;
 
procedure TForm1.logadm(Sender: TObject; msg: string; IBAdminAction: string);
begin
  Memo1.Lines.add(IBAdminAction + ' : ' + msg);
end;
 
procedure Backup(Database, Backupfile: string);
var
  Admin: TFBAdmin;
begin
  Admin := TFBAdmin.Create(nil);
  try
    Admin.UseExceptions := True;
    Admin.Host := '192.168.1.66';
    Admin.Protocol := IBSPTCPIP;
    Admin.User := 'SYSDBA';
    Admin.Password := 'masterkey';
    Admin.Port := 3050;            //change if not using the default port
    Admin.Connect;
    Admin.OnOutput := @Form1.logadm;
    Admin.Backup(Database, Backupfile, [IBBkpVerbose]);
  finally
    Admin.Free; //disconnects automatically
  end;
end;
 
procedure Restore(Database, Backupfile: string);
var
  Admin: TFBAdmin;
begin
  Admin := TFBAdmin.Create(nil);
  try
    Admin.UseExceptions := True;
    Admin.Host := '192.168.1.66';
    Admin.Protocol := IBSPTCPIP;
    Admin.User := 'SYSDBA';
    Admin.Password := 'masterkey';
    Admin.Port := 3050;                   //change if not using the default port
    Admin.Connect;
    Admin.OnOutput := @Form1.logadm;
    Admin.Restore(Database, Backupfile, [IBResVerbose, IBResReplace]);
  finally
    Admin.Free; //disconnects automatically
  end;
end;
 
procedure TForm1.btBackupClick(Sender: TObject);
begin
  Backup('c:\data\demo.fdb', 'c:\temp\demo.fbk');
end;
 
procedure TForm1.btRestoreClick(Sender: TObject);
begin
  Restore('c:\data\demo_restored.fdb', 'c:\temp\demo.fbk');
end;

Voir aussi

  • Firebird Utilisation de Firebird avec FPC/Lazarus SQLdb.


Composant LCL
Onglet de palette Composants
Standard TMainMenu • TPopupMenu • TButton • TLabel • TEdit • TMemo • TToggleBox • TCheckBox • TRadioButton • TListBox • TComboBox • TScrollBar • TGroupBox • TRadioGroup • TCheckGroup • TPanel • TFrame • TActionList
Additional TBitBtn • TSpeedButton • TStaticText • TImage • TShape • TBevel • TPaintBox • TNotebook • TLabeledEdit • TSplitter • TTrayIcon • TControlBar • TFlowPanel • TMaskEdit • TCheckListBox • TScrollBox • TApplicationProperties • TStringGrid • TDrawGrid • TPairSplitter • TColorBox • TColorListBox • TValueListEditor
Common Controls TTrackBar • TProgressBar • TTreeView • TListView • TStatusBar • TToolBar • TCoolBar • TUpDown • TPageControl • TTabControl • THeaderControl • TImageList • TPopupNotifier • TDateTimePicker
Dialogs TOpenDialog • TSaveDialog • TSelectDirectoryDialog • TColorDialog • TFontDialog • TFindDialog • TReplaceDialog • TOpenPictureDialog • TSavePictureDialog • TCalendarDialog • TCalculatorDialog • TPrinterSetupDialog • TPrintDialog • TPageSetupDialog • TTaskDialog
Data Controls TDBNavigator • TDBText • TDBEdit • TDBMemo • TDBImage • TDBListBox • TDBLookupListBox • TDBComboBox • TDBLookupComboBox • TDBCheckBox • TDBRadioGroup • TDBCalendar • TDBGroupBox • TDBGrid • TDBDateTimePicker
Data Access TDataSource • TBufDataset • TMemDataset • TSdfDataSet • TFixedFormatDataSet • TDbf
System TTimer • TIdleTimer • TLazComponentQueue • THTMLHelpDatabase • THTMLBrowserHelpViewer • TAsyncProcess • TProcessUTF8 • TProcess • TSimpleIPCClient • TSimpleIPCServer • TXMLConfig • TEventLog • TServiceManager • TCHMHelpDatabase • TLHelpConnector
Misc TColorButton • TSpinEdit • TFloatSpinEdit • TArrow • TCalendar • TEditButton • TFileNameEdit • TDirectoryEdit • TDateEdit • TTimeEdit • TCalcEdit • TFileListBox • TFilterComboBox • TComboBoxEx • TCheckComboBox • TButtonPanel • TShellTreeView • TShellListView • TXMLPropStorage • TINIPropStorage • TIDEDialogLayoutStorage • TMRUManager • TStrHolder
LazControls TCheckBoxThemed • TDividerBevel • TExtendedNotebook • TListFilterEdit • TListViewFilterEdit • TTreeFilterEdit • TShortPathEdit • TLvlGraphControl
RTTI TTIEdit • TTIComboBox • TTIButton • TTICheckBox • TTILabel • TTIGroupBox • TTIRadioGroup • TTICheckGroup • TTICheckListBox • TTIListBox • TTIMemo • TTICalendar • TTIImage • TTIFloatSpinEdit • TTISpinEdit • TTITrackBar • TTIProgressBar • TTIMaskEdit • TTIColorButton • TMultiPropertyLink • TTIPropertyGrid • TTIGrid
SQLdb TSQLQuery • TSQLTransaction • TSQLScript • TSQLConnector • TMSSQLConnection • TSybaseConnection • TPQConnection • TPQTEventMonitor • TOracleConnection • TODBCConnection • TMySQL40Connection • TMySQL41Connection • TMySQL50Connection • TMySQL51Connection • TMySQL55Connection • TMySQL56Connection • TSQLite3Connection • TIBConnection • TFBAdmin • TFBEventMonitor • TSQLDBLibraryLoader
Pascal Script TPSScript • TPSScriptDebugger • TPSDllPlugin • TPSImport_Classes • TPSImport_DateUtils • TPSImport_ComObj • TPSImport_DB • TPSImport_Forms • TPSImport_Controls • TPSImport_StdCtrls • TPSCustomPlugin
SynEdit TSynEdit • TSynCompletion • TSynAutoComplete • TSynMacroRecorder • TSynExporterHTML • TSynPluginSyncroEdit • TSynPasSyn • TSynFreePascalSyn • TSynCppSyn • TSynJavaSyn • TSynPerlSyn • TSynHTMLSyn • TSynXMLSyn • TSynLFMSyn • TSynDiffSyn • TSynUNIXShellScriptSyn • TSynCssSyn • TSynPHPSyn • TSynTeXSyn • TSynSQLSyn • TSynPythonSyn • TSynVBSyn • TSynAnySyn • TSynMultiSyn • TSynBatSyn • TSynIniSyn • TSynPoSyn
Chart TChart • TListChartSource • TRandomChartSource • TUserDefinedChartSource • TCalculatedChartSource • TDbChartSource • TChartToolset • TChartAxisTransformations • TChartStyles • TChartLegendPanel • TChartNavScrollBar • TChartNavPanel • TIntervalChartSource • TDateTimeIntervalChartSource • TChartListBox • TChartExtentLink • TChartImageList
IPro TIpFileDataProvider • TIpHttpDataProvider • TIpHtmlPanel