Hi,
I have to install Store reps for about 50 separate student teams on our Postgres server. What is the best way to build a script to do this. I don’t want to "Store.DbRegistry installDatabaseTables“ t0 times. Any hints are welcome. Thank you! Johannes ________________________________ Staatlich anerkannte private Fachhochschule NORDAKADEMIE Gemeinnützige Aktiengesellschaft Köllner Chaussee 11 25337 Elmshorn Vorstand: Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) Vorsitzender des Aufsichtsrats: Dr. h.c. Hans-Heinrich Bruns Sitz: Elmshorn, Amtsgericht Pinneberg, HRB 1682 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Johannes,
I'm sorry to tell you that there isn't a good way to do this. One thing you might consider is this: Postgres can create a new database in the server using another database as a template. You might try creating one database, installing the store schema into it and then using it as a template to create the others. Please see the Template Databases section in the online documentation for this. One issue with a single server having 50 databases on it is that the current Store setup grants SELECT, INSERT and some UPDATE permissions to PUBLIC. This means that everyone will have access to all of the databases. To fix this you would need to remove those privileges from PUBLIC and GRANT them to a ROLE you create as the group role for the students using a particular database. You would then need to grant that ROLE to all of the users for each database. The code that grants the permissions can be found in PostgresPlatform>>grantStoreSpecificPermissionsSQLUsingAccessor: . This method is called from Store.Glorp.StoreDescriptorSystem>>createTablesFor: I hope you find this helpful... Regards, Tom Robinson On 5/17/15 1:26 PM, Johannes Brauer wrote: > Hi, > > I have to install Store reps for about 50 separate student teams on our Postgres server. What is the best way to build a script to do this. I don’t want to "Store.DbRegistry installDatabaseTables“ t0 times. > > Any hints are welcome. > > Thank you! > > Johannes > > > > ________________________________ > > > Staatlich anerkannte private Fachhochschule > NORDAKADEMIE > Gemeinnützige Aktiengesellschaft > Köllner Chaussee 11 > 25337 Elmshorn > > Vorstand: > Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) > > Vorsitzender des Aufsichtsrats: > Dr. h.c. Hans-Heinrich Bruns > > Sitz: > Elmshorn, Amtsgericht Pinneberg, HRB 1682 > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by jb
Dear Johannes,
if you look at #createInstallScript, you can a) Use it to create an SQL script and then make 50 copies, changing whatever needs to be changed for each in a copying script you write. or b) Make the first statement in #createInstallScript scriptable so the connection profile is set up to each of the 50 logins you want in turn, switch off the installScript := true. line and edit or wrap some dialog lines while running your 50 timesRepeat loop calling it. (I can email you the dialog-wrapping code for this if you choose that route - just email me - as we use it for testing the #createInstallScript method.) In short, as Tom says, we don't already have a prepared and tested script but you could certainly write one. HTH Niall Ross >Hi, > >I have to install Store reps for about 50 separate student teams on our Postgres server. What is the best way to build a script to do this. I don’t want to "Store.DbRegistry installDatabaseTables“ t0 times. > >Any hints are welcome. > >Thank you! > >Johannes > > > >________________________________ > > >Staatlich anerkannte private Fachhochschule >NORDAKADEMIE >Gemeinnützige Aktiengesellschaft >Köllner Chaussee 11 >25337 Elmshorn > >Vorstand: >Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) > >Vorsitzender des Aufsichtsrats: >Dr. h.c. Hans-Heinrich Bruns > >Sitz: >Elmshorn, Amtsgericht Pinneberg, HRB 1682 > > >_______________________________________________ >vwnc mailing list >[hidden email] >http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Tom Robinson-4
Hi Tom!
> Am 19.05.2015 um 21:25 schrieb Tom Robinson <[hidden email]>: > … > I'm sorry to tell you that there isn't a good way to do this. One thing you might consider is this: Postgres can create a new database in the server using another database as a template. You might try creating one database, installing the store schema into it and then using it as a template to create the others. Please see the Template Databases section in the online documentation for this. I think we should give it a try. > > One issue with a single server having 50 databases on it is that the current Store setup grants SELECT, INSERT and some UPDATE permissions to PUBLIC. This means that everyone will have access to all of the databases. To fix this you would need to remove those privileges from PUBLIC and GRANT them to a ROLE you create as the group role for the students using a particular database. You would then need to grant that ROLE to all of the users for each database. The code that grants the permissions can be found in PostgresPlatform>>grantStoreSpecificPermissionsSQLUsingAccessor: . This method is called from Store.Glorp.StoreDescriptorSystem>>createTablesFor: This is no problem because we have got scripts for all these issues, which we used successfully in the last years. But we installed the Store-tables manually for each team. That is annoying and error-prone. > > I hope you find this helpful… yes, thank you Regards Johannes > > On 5/17/15 1:26 PM, Johannes Brauer wrote: >> Hi, >> >> I have to install Store reps for about 50 separate student teams on our Postgres server. What is the best way to build a script to do this. I don’t want to "Store.DbRegistry installDatabaseTables“ t0 times. >> >> Any hints are welcome. >> >> Thank you! >> >> Johannes >> >> >> >> ________________________________ >> >> >> Staatlich anerkannte private Fachhochschule >> NORDAKADEMIE >> Gemeinnützige Aktiengesellschaft >> Köllner Chaussee 11 >> 25337 Elmshorn >> >> Vorstand: >> Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) >> >> Vorsitzender des Aufsichtsrats: >> Dr. h.c. Hans-Heinrich Bruns >> >> Sitz: >> Elmshorn, Amtsgericht Pinneberg, HRB 1682 >> >> >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > ________________________________ Staatlich anerkannte private Fachhochschule NORDAKADEMIE Gemeinnützige Aktiengesellschaft Köllner Chaussee 11 25337 Elmshorn Vorstand: Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) Vorsitzender des Aufsichtsrats: Dr. h.c. Hans-Heinrich Bruns Sitz: Elmshorn, Amtsgericht Pinneberg, HRB 1682 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Niall Ross
Dear Niail!
yes, I could do it this way, but ...
BTW: I couldn’t figure out, what kind of variable installScript is.
Regards,
Johannes
Staatlich anerkannte private Fachhochschule NORDAKADEMIE Gemeinnützige Aktiengesellschaft Köllner Chaussee 11 25337 Elmshorn Vorstand: Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. Jörg Meier (stellv. Vorstand) Vorsitzender des Aufsichtsrats: Dr. h.c. Hans-Heinrich Bruns Sitz: Elmshorn, Amtsgericht Pinneberg, HRB 1682 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |