Migration SQL SERVER 4.2 DATA TO SQL SERVER 6.5

Migration SQL SERVER 4.2 DATA TO SQL SERVER 6.5

Post by S.Jeyaram » Thu, 22 Apr 1999 04:00:00



In a SQL-Server 4.2 to 6.5 migration, we have used a "LOAD DATABASE"
command to bring data from a 4.2 backup to a newly created 6.5
database.  Data has been restored successfully.  However, all primary
key and foreign key information for the loaded tables is not present in
the 6.5 database.  Is this to be expected?  Where (if anywhere) is this
behaviour documented?  What means (if any) exist to get the keys details
into 6.5?  What remedial action is needed or recommended to overcome
this problem?
 
 
 

Migration SQL SERVER 4.2 DATA TO SQL SERVER 6.5

Post by Tibor Karasz » Thu, 22 Apr 1999 04:00:00


S,

SQL Server didn't support PK and FK other than for documentation purposes.
These are _not_ upgraded to PK and FK constraints.

The (4.x) "documentation" is found in the syskeys table. There might some
other table as well. You probably have to use some SQL hacking to the info
out so that you can use it to define constraints.

I believe that ODBC uses catalog stored procedure to expose these keys.
These might have been re-written in 6.0, and use documentation for active
constraints. This means that apps that relies on this info will not find the
keys until you port them to constraints (or hack the catalog stored
procedures). Not sure about this, though.
--
Tibor Karaszi
MCSE, MCSD, MCT, SQL Server MVP
Cornerstone Sweden AB
Please do not respond by e-mail unless explicitly asked for.


>In a SQL-Server 4.2 to 6.5 migration, we have used a "LOAD DATABASE"
>command to bring data from a 4.2 backup to a newly created 6.5
>database.  Data has been restored successfully.  However, all primary
>key and foreign key information for the loaded tables is not present in
>the 6.5 database.  Is this to be expected?  Where (if anywhere) is this
>behaviour documented?  What means (if any) exist to get the keys details
>into 6.5?  What remedial action is needed or recommended to overcome
>this problem?