Obwohl [EMAIL PROTECTED] schon am 27.12.01 schrieb: > Hi, > > I get on your nerves, I know... But I need the opinion of experts: > I am using Linux, so there is no SQL-Studio. My database constists of more > than 80 tables. I want to create the database in a batch-like mode. What is > the best way to create tables? Using dbmcli with sql_execute is a little bit > long-winded (you need to insert '/' and no comments allowed for the > fields..). Is it a better choice to use PERL? Are there samples? > > Thanks in advance for comments > > Thomas
Well, you can also write a batch of sql statements and have them executed by the replication manager. That could look like this: /* -------------------------------------------------------- / A line beginning with a slash is a remark / / and you can even emulate the remark identifiers of / most popular sql processors. But you must have empty / lines between sql statements. /*/ drop table AdditionalInfo create table AdditionalInfo ( ADDINFO_ID varchar(40), EVENT_ID varchar(40), parameter varchar(30), my_value varchar(30), unit varchar(30), description varchar(100), primary key (ADDINFO_ID) ) create index ix1_AdditionalInfo on AdditionalInfo (EVENT_ID) grant select on table AdditionalInfo to plr_user grant select, insert, update, delete on table AdditionalInfo to plr_worker /* -------------------------------------------------------- */ Execute the sql batch file with the following command in a DOS box: repmcli -d <db> -u <username>,<password> -b <sqlbatchfilename> For the example above, the -E (number of allowed errors) option might be useful, to avoid stopping execution when the table of the drop table statement does not exist. Rüdiger ______________________________________________________________________________ Darf es ein bisschen mehr sein? Mehr Speicher, mehr Mail, mehr Erlebnis, mehr Prämie, mehr WEB.DE. Der WEB.DE Club - http://club.web.de