DYNAMICRESOLUTION | NODYNAMICRESOLUTION,dynamicresolution
有时候开启OGG进程的时候较慢,可能是因为需要同步的表太多,OGG在开启进程之前会将需要同步的表建立一个记录并且存入到磁盘中,这样就需要耗费大量的时间。OGG同时也提供了DYNAMICRESOLUTION | NODYNAMICRESOLUTION参数来解决这个问题,看官方如何描述的:
DYNAMICRESOLUTION | NODYNAMICRESOLUTION Valid for Extract and Replicat Use the DYNAMICRESOLUTION and NODYNAMICRESOLUTION parameters to control how table names are resolved. Use DYNAMICRESOLUTION to make processing start sooner when there is a large number of tables specified in TABLE or MAP statements. By default, whenever a process starts, Oracle GoldenGate queries the database for the attributes of the tables and then builds an object record for them. The record is maintained in memory and on disk, and the process of building 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 at once. A table’s attributes are added to the record the first time its object ID enters the transaction log, which occurs with the first extracted transaction on that table. Recordbuilding for other tables is deferred until activity occurs. DYNAMICRESOLUTION is the same as WILDCARDRESOLVE DYNAMIC. NODYNAMICRESOLUTION causes the object record to be built at startup. This option is not supported for Teradata. NODYNAMICRESOLUTION is the same as WILDCARDRESOLVE IMMEDIATE. For more information about WILDCARDRESOLVE, see page 389.你可以在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);
}
笔记本输出端子和其屏幕的输出信号是一一对应的,改变了笔记本屏幕的分辨率就改变了输出端的显示分辨率。
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......余下全文>>