Problems with fn_remote_foreign_keys

  • Hello,

    I could not found fn_remote_foreign_keys in SQL Server 2005.

    I see that sys.sp_foreignkeys use this function, but if I want to use it, did not work.

    Else, if I copy the code of sys.sp_foreignkeys to a user SP, did not work.

    Best regards

    Sorry for my english

  • What are you trying to do? There is a view available, sys.foreign_keys, which shows the basic information on a given set of keys within a database. Is that what you're looking for?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Hello,

    Perhaps I can do it, but I don't know how.

    There is a process that pass the relations from a linked server pointing to a database in MS Access to a new database in SQL Server 2005.

    This process works fine in SQL Server 2000.

    The sp_foreignkeys works diferent in SQL 2005 and we try to copy the code of sp_foreignkeys to a user SP but the function fn_remote_foreign_keys is unrecognized.

    Best regards

     

  • Hello,

    Perhaps I can do it, but I don't know how.

    There is a process that pass the relations from a linked server pointing to a database in MS Access to a new database in SQL Server 2005.

    This process works fine in SQL Server 2000.

    The sp_foreignkeys works diferent in SQL 2005 and we try to copy the code of sp_foreignkeys to a user SP but the function fn_remote_foreign_keys is unrecognized.

    Best regards

     

  • Yeah, you'll need to change the app. The methods for accessing system metadata within SQL 2005 are different than they were in 2000. The views that look like the old system tables have some different column names, etc. That's why you're getting the errors.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Hello,

    I dont't think so, can I use sys.foreign_keys in Linked Servers to an access database? I think that is no posible.

    sp_foreignkeys returns something like this

    Procesos prcssis_codigo Exclu        excssis_codigo2           1

    Procesos prcssis_codigo Exclu        excssis_codigo1           1

    Procesos prc_Cod           Exclu        excprc_Cod1               2

    Procesos prc_Cod           Exclu        excprc_Cod2               2

    Procesos prcssis_codigo  ProcXTer  pxtssis_Codigo            1

    Procesos prc_Cod            ProcXTer  pxtprc_Cod                 2

    How can I know if the relation excssis_codigo2 correspond with excprc_cod1 ord excprc_Cod2, this is a bug.

    In SQL Server 2000 this come like this

    Procesos prcssis_codigo Exclu        excssis_codigo2           1

    Procesos prc_Cod           Exclu        excprc_Cod2               2

    Procesos prcssis_codigo Exclu        excssis_codigo1           1

    Procesos prc_Cod           Exclu        excprc_Cod1               2

    Procesos prcssis_codigo  ProcXTer  pxtssis_Codigo            1

    Procesos prc_Cod            ProcXTer  pxtprc_Cod                 2

    I know that changing a Linked server, to a Script I solve the problem, but this a masive distribution software, and affects a lot of customers.

    Best regards.

     

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply