[progress Communities] [progress Openedge Abl] Forum Post: Create New Tenant Performance

Status
Not open for further replies.
P

Peter Willer

Guest
Hello, we have a multi tenant enabled database with three database areas and 255 Tables with indices and some lob fields. The generated script to create a new tenant takes about 30 seconds to create a new tenant. Why is it so slow? I even don't see any raising in database size. setSuperUser(). SET-EFFECTIVE-TENANT(cTenantName, "multidb") NO-ERROR. IF NOT ERROR-STATUS:ERROR THEN DO: /* Tenant exists already */ RETURN TRUE. END. /* Start a service for the "multidb" database. */ service = NEW DataAdminService("multidb"). /* Instantiate a new ITenant */ tenant = service:NewTenant(cTenantName). ASSIGN tenant:Type = "Regular" tenant:IsDataEnabled = YES tenant:DefaultDataArea = service:GetArea("DataArea") tenant:DefaultIndexArea = service:GetArea("IndexArea") tenant:DefaultLobArea = service:GetArea("LobArea") tenant:DefaultAllocation = "Immediate" . /* Instantiate a new IDomain */ domain = service:NewDomain(cDomainName). ASSIGN domain:AuthenticationSystem = service:GetAuthenticationSystem("_oeusertable") domain:IsEnabled = YES domain:Description = "" domain:Comments = "" domain:AuditingContext = "" domain:AccessCode = cAccessCode domain:SystemOptions = "" domain:RuntimeOptions = "" . /* Instantiate a new IUser */ /* myUser = service:NewUser("master"). assign myUser:password = cPassword myUser:Description = "" myUser:IsSqlOnly = no myUser:Number = 0 myUser:GivenName = "" myUser:MiddleInitial = "" myUser:SurName = "" myUser:Telephone = "" myUser:EMail = "" . */ /* Add the new myUser to the domain's Users collection. */ /* domain:Users:Add(myUser). */ /* Add the new domain to the tenant's Domains collection. */ tenant:Domains:Add(domain). /* Create (commit) the tenant in the service */ service:CreateTenant(tenant). /** Set default allocation back to 'immediate' */ tenant:DefaultAllocation = "Immediate". /* Update (commit) the Tenant with the DefaultAllocation. */ service:UpdateTenant(tenant). Thank you Regards Peter

Continue reading...
 
Status
Not open for further replies.
Top