//----------------------------------------------------------------------------- // dbRebuild //----------------------------------------------------------------------------- /// <summary> /// Rebuild a database. /// </summary> /// <param name="sSourceDbPath"> /// The name of the control file of the database that is to be rebuilt. /// </param> /// <param name="sSourceDataDir"> /// The data file directory. See <see cref="dbCreate"/> for more information. /// </param> /// <param name="sDestDbPath"> /// The name of the control file of the destination /// database that is to be built from the source database. /// </param> /// <param name="sDestDataDir"> /// The destination database's data file directory. See <see cref="dbCreate"/> for /// more information. /// </param> /// <param name="sDestRflDir"> /// The destination database's roll-forward log /// directory. See <see cref="dbCreate"/> for more information. /// </param> /// <param name="sDictPath"> /// The name of a file containing dictionary definitions that /// are to be put into the destination database when it is created. /// May be null. /// </param> /// <param name="sPassword"> /// Password for opening the source database. This is only needed /// if the database key is currently wrapped in a password instead of the /// local NICI storage key. May be null. /// </param> /// <param name="createOpts"> /// A <see cref="XFLM_CREATE_OPTS"/> object that contains several parameters that /// are used in the creation of the destination database. /// </param> /// <param name="rebuildStatus"> /// If non-null this is an object that implements the <see cref="DbRebuildStatus"/> /// interface. It is a callback object that is used to report rebuild progress. /// </param> public void dbRebuild( string sSourceDbPath, string sSourceDataDir, string sDestDbPath, string sDestDataDir, string sDestRflDir, string sDictPath, string sPassword, XFLM_CREATE_OPTS createOpts, DbRebuildStatus rebuildStatus) { RCODE rc; DbRebuildStatusDelegate dbRebuildStatus = null; DbRebuildStatusCallback fnDbRebuildStatus = null; if (rebuildStatus != null) { dbRebuildStatus = new DbRebuildStatusDelegate( rebuildStatus); fnDbRebuildStatus = new DbRebuildStatusCallback( dbRebuildStatus.funcDbRebuildStatus); } if ((rc = xflaim_DbSystem_dbRebuild( m_pDbSystem, sSourceDbPath, sSourceDataDir, sDestDbPath, sDestDataDir, sDestRflDir, sDictPath, sPassword, createOpts, fnDbRebuildStatus)) != 0) { throw new XFlaimException( rc); } }
private static extern RCODE xflaim_DbSystem_dbRebuild( IntPtr pDbSystem, [MarshalAs(UnmanagedType.LPStr), In] string pszSourceDbPath, [MarshalAs(UnmanagedType.LPStr), In] string pszSourceDataDir, [MarshalAs(UnmanagedType.LPStr), In] string pszDestDbPath, [MarshalAs(UnmanagedType.LPStr), In] string pszDestDataDir, [MarshalAs(UnmanagedType.LPStr), In] string pszDestRflDir, [MarshalAs(UnmanagedType.LPStr), In] string pszDictPath, [MarshalAs(UnmanagedType.LPStr), In] string pszPassword, XFLM_CREATE_OPTS pCreateOpts, DbRebuildStatusCallback fnDbRebuildStatus);