Yeah, you just need the one command in the file. When you call EXECUTE SCRIPT, you will need to provide a file name.
"second doubt is will slonik automaticall switch the db to mydb(contactdb), before executing that commnad?" I'm not sure what you mean by that...can you be more specific? What is meant by switching, and are db/mydb different machines or different databases? I think I need to get a better understanding of your architecture. --Richard On May 10, 2010, at 4:09 AM, sowjanya v wrote: > Is it sufficient to have only one line mentioned below in .sql file or is > there any syntax for it? send me one sample file. > > alter table sowjanya add column address1; > > second doubt is will slonik automaticall switch the db to mydb(contactdb), > before executing that commnad? > > > On Mon, May 10, 2010 at 11:56 AM, Richard Yen <[email protected]> wrote: > If you haven't populated the new column on db1, you can just drop the column. > then, you can add the column via EXECUTE SCRIPT and you should be all > set--that will create the column on both db1 and db2. > > --Richard > > > On May 9, 2010, at 10:29 PM, sowjanya v wrote: > > > Hi, > > > > I have two databases db1 and db2. db2 is replica of db1. Now i have added a > > column in a table in db1. Since schema changes do not propogate by itself > > to db2, need to execute execute script. But the input for that is a sql > > file with all difference in schema. Hence please let me know how replicate > > the schema changes. If i do the diff of two schemas, it only shows the > > lines where the difference is present and not the sql command to be > > executed on db2 to make it same as db1. Please do reply immediately. > > > > -- > > Sowjanya > > Wipro Technologies > > Bangalore > > _______________________________________________ > > Slony1-general mailing list > > [email protected] > > http://lists.slony.info/mailman/listinfo/slony1-general > > > > > -- > Sowjanya > Wipro Technologies > Bangalore _______________________________________________ Slony1-general mailing list [email protected] http://lists.slony.info/mailman/listinfo/slony1-general
