Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 12 total |
Full table SQL? |
Sat, Oct 13 2018 1:10 AM | Permanent Link |
Ian Branch | Hi Team,
Is there some way to get the full Table creation sql including Constraints, Indexes & Triggers? I just spent a painful period replicating a whole pile of indexes into two backup tables. Would be much nicer if the 'Create Copy of Table' replicated all the original under the new name... Regards, Ian |
Sat, Oct 13 2018 2:51 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
> Is there some way to get the full Table creation sql including Constraints, Indexes & Triggers? > I just spent a painful period replicating a whole pile of indexes into two backup tables. Yes but its not built in. It can be done via Delphi since all the bits needed are there - look in the information tables - Tim has added a CreateSQL column so you can filter and add all the bits you need. The other approach is to use the Reverse Engineer Database and copy out the bits you want. > Would be much nicer if the 'Create Copy of Table' replicated all the original under the new name... No. Unless its fully "optioned". Generally when I copy a table its either to use as an archive holder in which case the data just sits there and I don't want triggers etc or its to use as the base for a new table and having to go through and remove all the stuff I didn't want would be a pain. Roy |
Sat, Oct 13 2018 5:33 PM | Permanent Link |
Ian Branch | Hi Roy,
Roy Lambert wrote: > Ian > > > Is there some way to get the full Table creation sql including Constraints, Indexes & Triggers? > > I just spent a painful period replicating a whole pile of indexes into two backup tables. > > Yes but its not built in. It can be done via Delphi since all the bits needed are there - look in the information > tables - Tim has added a CreateSQL column so you can filter and add all the bits you need. The other approach is to > use the Reverse Engineer Database and copy out the bits you want. IB - The Reverse Engineer has potential. > > > Would be much nicer if the 'Create Copy of Table' replicated all the original under the new name... > > No. Unless its fully "optioned". Generally when I copy a table its either to use as an archive holder in which case > the data just sits there and I don't want triggers etc or its to use as the base for a new table and having to go > through and remove all the stuff I didn't want would be a pain. IB - It is easier to delete than re-type it all. Perhaps the 'Copy' function could have the option to select which elements are copied? I have a 2 level Archive system. The first level, Current to Archive, transfers all relevant records to the Archive table. These are accessible using a utility supplied. Typically this would be done at 12 months and every month there after. All indexes are maintained. The second level, Archive to _Archive, transfers all relevant records from Archive to _Archive tables. All indexes are maintained. This is typically done after 15 months and every month thereafter. These records are accessed using Manager. In both cases the Customer can choose his Archive/_Archive regime. Ian |
Sun, Oct 14 2018 4:35 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
I had another idea whilst thinking of how easy it would be to write a Delphi utility >IB - It is easier to delete than re-type it all. You don't have to type much - a bit of copy'n'paste is all it takes - SELECT LIST(REPLACE('Accounts','ArchiveAccounts',CreateSQL),'!'+#13) FROM Information.Indexes WHERE TableName = 'Accounts' SELECT LIST(REPLACE('Accounts','ArchiveAccounts',CreateSQL),'!'+#13) FROM Information.Triggers WHERE TableName = 'Accounts' run these in the database you're interested in, copy the contents of the column to the clipboard, add the final !, paste to a New sql window and run Roy ps that's the beauty of a catalog based system when you get used to it |
Mon, Oct 15 2018 1:41 AM | Permanent Link |
Richard Harding Wise Nutrition Coaching | Ian
<< Is there some way to get the full Table creation sql including Constraints, Indexes & Triggers?>> I just spent a painful period replicating a whole pile of indexes into two backup tables. Would be much nicer if the 'Create Copy of Table' replicated all the original under the new name... Do you know about the Reverse Engine Database feature? It will create an SQL file or a script with all objects of the database. It can also compare two databases and create an upgrade SQL. Very useful. Richard |
Mon, Oct 15 2018 4:20 PM | Permanent Link |
Ian Branch | Richard Harding wrote:
> > Do you know about the Reverse Engine Database feature? It will create an SQL file or a script with all objects of the > database. It can also compare two databases and create an upgrade SQL. Very useful. > Hi Richard, Thanks for your input. I did look at that and it is an option I will consider. Regards, Ian |
Tue, Oct 16 2018 2:55 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
When I get finished with fiddling with D2007 I'll knock up a little utility. Roy Lambert |
Tue, Oct 16 2018 1:46 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ian,
<< Is there some way to get the full Table creation sql including Constraints, Indexes & Triggers? >> There are a lot of different places to get reverse-engineered SQL in EDB, but in the Explorer treeview the big issue is the lack of multi-select support. I need to get that in place, and then you can just drag and drop the selected indexes, etc. into the SQL window. Tim Young Elevate Software www.elevatesoft.com |
Sat, Oct 20 2018 9:44 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>There are a lot of different places to get reverse-engineered SQL in EDB, but in the Explorer treeview the big issue is the lack of multi-select support. I need to get that in place, and then you can just drag and drop the selected indexes, etc. into the SQL window. Or alternatively just pop up a selection form when a table is dropped in a clean sql window. I'd much prefer to tick a few boxes on a form rather than drag'n'drop a load of stuff Roy |
Sat, Oct 20 2018 2:26 PM | Permanent Link |
Ian Branch | +1
|
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |