Subject | RE: [firebird-support] Re: convert persistent table to temporary |
---|---|
Author | Dunbar, Norman (Capgemini) |
Post date | 2011-06-01T11:04:59Z |
Hi Milan,
"generate dependencies" feature, not that individual tables scripts
can't be created.
However, the method you mention above only gives the script to rebuild
everything about this table, except actually the CREATE TABLE statement
itself. For example, this is for the COUNTRY table in the employee
database:
SET AUTODDL ON;
ALTER TABLE "CUSTOMER" DROP CONSTRAINT "INTEG_61";
ALTER TABLE "JOB" DROP CONSTRAINT "INTEG_11";
ALTER TABLE "COUNTRY" DROP CONSTRAINT "INTEG_2";
/**************** DROPPING COMPLETE ***************/
ALTER TABLE "COUNTRY" ADD PRIMARY KEY ("COUNTRY");
ALTER TABLE "CUSTOMER" ADD FOREIGN KEY ("COUNTRY") REFERENCES "COUNTRY"
("COUNTRY");
ALTER TABLE "JOB" ADD FOREIGN KEY ("JOB_COUNTRY") REFERENCES "COUNTRY"
("COUNTRY");
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON "COUNTRY" TO
"PUBLIC" WITH GRANT OPTION;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON "COUNTRY" TO
"SYSDBA" WITH GRANT OPTION;
For a rebuild script, I expect (from other databases/other tools) a
complete script to CREATE TABLE, all of the above, and a whole pile of
INSERT INTO ... statements as well.
Just an observation! I love Flamerobin.
Cheers,
Norm. (At work!)
Norman Dunbar
Contract Senior Oracle DBA
Capgemini Database Team (EA)
Internal : 7 28 2051
External : 0113 231 2051
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
>> > Flamerobin, at version 0.9.3.1885 at least, doesn't appearAh, yes, thanks. I was meaning that Flamerobin didn't appear to have a
>> to have a similar function
>>
>> Open the table's properties page and click "Generate rebuild
>> script" at the bottom.
"generate dependencies" feature, not that individual tables scripts
can't be created.
However, the method you mention above only gives the script to rebuild
everything about this table, except actually the CREATE TABLE statement
itself. For example, this is for the COUNTRY table in the employee
database:
SET AUTODDL ON;
ALTER TABLE "CUSTOMER" DROP CONSTRAINT "INTEG_61";
ALTER TABLE "JOB" DROP CONSTRAINT "INTEG_11";
ALTER TABLE "COUNTRY" DROP CONSTRAINT "INTEG_2";
/**************** DROPPING COMPLETE ***************/
ALTER TABLE "COUNTRY" ADD PRIMARY KEY ("COUNTRY");
ALTER TABLE "CUSTOMER" ADD FOREIGN KEY ("COUNTRY") REFERENCES "COUNTRY"
("COUNTRY");
ALTER TABLE "JOB" ADD FOREIGN KEY ("JOB_COUNTRY") REFERENCES "COUNTRY"
("COUNTRY");
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON "COUNTRY" TO
"PUBLIC" WITH GRANT OPTION;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON "COUNTRY" TO
"SYSDBA" WITH GRANT OPTION;
For a rebuild script, I expect (from other databases/other tools) a
complete script to CREATE TABLE, all of the above, and a whole pile of
INSERT INTO ... statements as well.
Just an observation! I love Flamerobin.
Cheers,
Norm. (At work!)
Norman Dunbar
Contract Senior Oracle DBA
Capgemini Database Team (EA)
Internal : 7 28 2051
External : 0113 231 2051
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk