Hi, I need to migrate the system and it has over 1000 tables, view & stored procedure. Any fast selection can select all tables and add into schema?
Hi,
You can use Tools
→ New Schema Wizard
:
Note: It will create a new schema
Hi,
I’m not create new schema. I need to integrate into existing schema.
Hi,
I don’t think it is a good idea to have such amount of tables/views/sp in one schema [and one DataAbstract service].
try to split it logically (i.e. by department, etc).
note: size of your .dfm will be very big and your service will be created very slooooowly.
Hi,
I also want to ask this question in future. How to manage multi schemas? I tried before it is failed. It looks like can’t switch the schema in runtime. If possible, could you provide a simple demo how to hand multi schema?
Hi,
Check DA Server sample (Delphi).
It can work with 2 schemas - Simple
and PCTrade
.
Client can pass schema name via login string (Relativity way) or schema name can be detected from user info from DB.
Schema name in given sample is stored in session.
Hi,
I checked DA Server sample that is using “ConnectionName” to switch the ServiceSchema. But how to apply “OpenDataSets”, “FillWithDASql”…? Or it will handle by DA Server automatically?
Hi,
You can store connection name, ServiceSchema name , etc inside Session
on server-side.
it can be filled during login
ConnectionName and ServiceSchema can be set in OnActivate event like
procedure TDataService.DataAbstractServiceActivate(const aClientID: TGUID;
aSession: TROSession; const aMessage: IROMessage);
begin
ConnectionName := Session['Schema'];
if ConnectionName = 'Simple' then ServiceSchema := SimpleSchema
else if ConnectionName = 'PCTrade' then ServiceSchema := PCTradeSchema;
end;