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?
You can use
New Schema Wizard:
Note: It will create a new schema
I’m not create new schema. I need to integrate into existing schema.
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.
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?
Check DA Server sample (Delphi).
It can work with 2 schemas -
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.
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?
You can store connection name, ServiceSchema name , etc inside
Session on server-side.
it can be filled during
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;