Re: [Caché] Upgrading CACHE.DAT file to newer version, 5.0.X to 2012.2.3

652 views
Skip to first unread message

Tom Fitzgibbon

unread,
Apr 7, 2013, 8:21:29 AM4/7/13
to intersystems...@googlegroups.com
Brian -

Can you get to a Cache command line?  If so, type in Do $system.OBJ.CompileAllNamespaces("u").

This method upgrades and compiles class dictionaries in every namespace.

Note you had .OB not .OBJ.

One way to get to a Cache command line is to click on the Cache cube (depending on your platform), click on terminal, then get a prompt like User>, then type in Do $system.OBJ.CompileAllNamespaces("u").

Tom Fitzgibbon | Multidata | 212-967-6700 x537

On Fri, Apr 5, 2013 at 3:44 PM, Brian ODwyer <bpo...@gmail.com> wrote:
I am trying to restore an old backup from version 5.0.x to a new 2012.2.3 version of Cache. I was able to add the DB and create name space with DB mount. I can connect to the DB with a SQL tool, but am unable to see anything but the default % schemas and tables. I was able to connect to the samples DB and can see the schemas and tables in that file.
 
Any ideas on how to upgrade or convert the data file to the new version. I get an error when I use studio that tells me the dictionary is out of date and to run the upgrade utility. Error 5075  $system.OB.Upgrade(). Not being a CACHE' expert I am stuck here. Is there a utility to upgrade/convert the older DB/dictionary.
 

thanks
BrianO

--
--
Caché, Ensemble, DeepSee
 
---
You received this message because you are subscribed to the Google Groups "Caché, Ensemble, DeepSee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Kurt Hofman

unread,
Apr 7, 2013, 11:10:16 AM4/7/13
to intersystems...@googlegroups.com
Don't forget to Do $System.OBJ.UpgradeAll() an then Do $System.OBJ.CompileAllNamespaces()

Op vrijdag 5 april 2013 21:44:15 UTC+2 schreef Brian ODwyer het volgende:

bradders66

unread,
Apr 8, 2013, 8:52:36 AM4/8/13
to intersystems...@googlegroups.com
Hi Brian,

The upgrade path can be lengthy depending on how many databases you have. We specialise in legacy upgrades and even moving from a 2007.1 to a 2012 can take a few steps. Essentially they are as follows;

1. do ##Class(SYS.Database).FixDefaultGlobalCollation("path_to_database",1,.Messages) for every database
2. do ##Class(SYS.Database).FixDefaultGlobalCollation("path_to_database") for every database
3. in %SYS - do $system.OBJ.UpgradeAll("c")
4. in each namespace  do ##class(%Library.Routine).CompileAll()
5. in each namespace  do $System.OBJ.CompileAll("cdk")
6. in each namespace  do $System.OBJ.CompileAll("cuk")

Trust me on these last two - some CSP and/or Zen classes may fail otherwise

Joel Solon

unread,
Apr 9, 2013, 1:43:50 PM4/9/13
to intersystems...@googlegroups.com
I think it would be great if you would explain the need for calling FixDefaultGlobalC​ollation().
-Joel

Regards,
Joel
«Sent from Blackberry»
--

don

unread,
Apr 9, 2013, 11:05:28 PM4/9/13
to intersystems...@googlegroups.com

don

unread,
Apr 9, 2013, 11:07:18 PM4/9/13
to intersystems...@googlegroups.com
Joel,
 
I think the reason for the collation check is that brian does not mention which DB size he running or how he got to 5x.
If it is an older DB the global collations may not be what is currently in use. Even using GBLOCKCOPY if you have an older collation like '1' it asks (or use to) if you want to convert the collation the person running it could decline.
 
Also Brian, this is important
Was your backup done 'offline' where no users were on the system, and the DB dismounted or an incremental where a file is generated at the end with the db updates that occurred while the DB was being backed up?
If it was an incremental the steps would be 1) bring in the backup to its new place.  2) in %SYS relabel the DB. 3) in %SYS mount the DB. 4) in %SYS 'D ^BACKUP' select the option to restore incremental data file. Only then can you 'touch' the DB. If you go into the DB before the incr is brought in the DB is no good and you need to start over.
 
don

don

unread,
Apr 10, 2013, 8:08:27 AM4/10/13
to intersystems...@googlegroups.com
Additional thought.
 
Brian is attempting to upgrade a restored DB most likley some where else on the system, possibly on a different server. He is not doing an in place upgrade of cache or of the DB's.
Now this is not my strong area but I thought the DB only held the .INT code of the compiled classes. If that is the case, Brian would need to go to the 5.x system export his views and do an export from the studio (for that DB) of all of the .cls and .mac's and import them to the properly restored DB under 2012.
please correct me if that isn't right.
 
don

Sukesh

unread,
Apr 13, 2013, 10:45:49 AM4/13/13
to intersystems...@googlegroups.com
Brian


Perhaps one way to do so would be to

1) export the schema (namespace wise) to an XML file from Studio.
Tools->Export.

2) Export the Data From the System Management Portal.
Data Management ->Global->Export
(Use the extension .gbl for the file to which data is exported).

3) Import the schema (and compile) and import data in 2012 using the above utilities.

AFAIR, I have never had problem using the above route, and I have done this from several versions to a higher  one. Caché seems to take care of all the upgrade issues.

HTH

Regards
Sukesh Hoogan
Bombay, India.

PS: I am not a very frequent visitor here any more. Some of the old timers may remember me.

Sukesh

unread,
Apr 13, 2013, 10:48:50 AM4/13/13
to intersystems...@googlegroups.com
Just forgot to add

In case of version 5.0, you may export data via Caché Explorer.

Regards
Sukesh Hoogan
Reply all
Reply to author
Forward
0 new messages