DYNAMICRESOLUTION | NODYNAMICRESOLUTION,dynamicresolution

來源:互聯網
上載者:User

DYNAMICRESOLUTION | NODYNAMICRESOLUTION,dynamicresolution

有時候開啟OGG進程的時候較慢,可能是因為需要同步的表太多,OGG在開啟進程之前會將需要同步的表建立一個記錄並且存入到磁碟中,這樣就需要耗費大量的時間。OGG同時也提供了DYNAMICRESOLUTION | NODYNAMICRESOLUTION參數來解決這個問題,看官方如何描述的:

DYNAMICRESOLUTION | NODYNAMICRESOLUTIONValid for Extract and ReplicatUse the DYNAMICRESOLUTION and NODYNAMICRESOLUTION parameters to control how tablenames are resolved.Use DYNAMICRESOLUTION to make processing start sooner when there is a large number oftables specified in TABLE or MAP statements. By default, whenever a process starts, OracleGoldenGate queries the database for the attributes of the tables and then builds an objectrecord for them. The record is maintained in memory and on disk, and the process ofbuilding it can be time-consuming if the database is large.DYNAMICRESOLUTION causes the object record to be built one table at a time, instead of all atonce. A table’s attributes are added to the record the first time its object ID enters thetransaction log, which occurs with the first extracted transaction on that table. Recordbuildingfor other tables is deferred until activity occurs. DYNAMICRESOLUTION is the same asWILDCARDRESOLVE DYNAMIC.NODYNAMICRESOLUTION causes the object record to be built at startup. This option is notsupported for Teradata. NODYNAMICRESOLUTION is the same as WILDCARDRESOLVE IMMEDIATE.For more information about WILDCARDRESOLVE, see page 389.

    c++ builer 中怎讀取系統顯示設定

    你可以在cb的線上協助中找 ChangeDisplaySettings ,可以找到所有的屬性。
    附上用CB動態改變顯示器解析度的代碼:
    void __fastcall TForm1::btnGetClick(TObject *Sender)
    {<
    void __fastcall TForm1::btnGetClick(TObject *Sender)
    {
    int x,y;
    x = GetSystemMetrics(SM_CXSCREEN);
    y = GetSystemMetrics(SM_CYSCREEN);
    ShowMessage("顯示器水平解析度:" + AnsiString(x) + " 顯示器垂直解析度:" + AnsiString(y));

    }
    //---------------------------------------------------------------------------
    void __fastcall TForm1::DynamicResolution(int x,int y)
    {
    TDeviceModelpDevMode;
    bool Result;

    Result = EnumDisplaySettings(NULL,0,&lpDevMode);
    if (Result)
    {
    lpDevMode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
    lpDevMode.dmPelsWidth = x;
    lpDevMode.dmPelsHeight = y;
    Result = ChangeDisplaySettings(&lpDevMode,0);
    // = DISP_CHANGE_SUCCESSFUL;
    }
    }
    void __fastcall TForm1::BitBtn1Click(TObject *Sender)
    {
    DynamicResolution(800,600);
    }
    //---------------------------------------------------------------------------

    void __fastcall TForm1::BitBtn2Click(TObject *Sender)
    {
    DynamicResolution(1024,768);
    }
     
    利用delphin編程 改變螢幕解析度 與在顯示器間切換

    筆記本輸出端子和其螢幕的輸出訊號是一一對應的,改變了筆記本螢幕的解析度就改變了輸出端的顯示解析度。

    Delphi提供了可以動態改變螢幕解析度的函數,分別是EnumDisplaySettings()和ChangeDisplaySettings()。有了它們,編程時可以隨時改變解析度以適應要求。下面的CRTReset函數能方便實現這一功能:

    implementation

    function CRTReset(X, Y: Word): Boolean;

    var

    lpDevMode: TDeviceMode;

    begin

    Result:= EnumDisplaySettings(nil, 0, lpDevMode); //擷取顯示模式

    if Result then begin

    lpDevMode.dmFields := DM_PELSWID

    TH Or DM_PELSHEIGHT;

    lpDevMode.dmPelsWidth := X;

    lpDevMode.dmPelsHeight := Y; //設定螢幕的寬度和高度

    Result:= ChangeDisplaySettings(lpDevMode, 0) = DISP_CHANGE_SUCCESSFUL;

    //改變螢幕解析度並返回成功與否

    end;

    end;

    procedure TForm1.Button1Click(Sender: TObject);

    begin

    if CRTReset(800, 600) then ShowMessage('Now is 800*600'); //調用函數,設定解析度為800×600

    end;

    // 動態設定解析度

    function DynamicResolution(x, y: WORD): Boolean;
    var
    lpDevMode: TDeviceMode;
    begin
    Result := EnumDisplaySettings(nil, 0, lpDevMode);
    if Result then
    begin
    lpDevMode.dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
    lpDevMode.dmPelsWidth := x;
    lpDevMode.dmPelsHeight := y;
    Result := Chan......餘下全文>>
     

    相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.