• sql2005 64 位 连接 sql2000 32位


    首先确定sql2000必须达到sp3补丁以上,再执行下列语句,可处理定时任务无法执行问题。

    USE [master]

    GO

    /****** 对象:  StoredProcedure [dbo].[sp_tables_info_rowset_64]    脚本日期: 12/10/2013 16:23:34 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    /*  Procedure for 8.0 server */  

    create procedure [dbo].[sp_tables_info_rowset_64]  

        (  

        @table_name sysname,   

        @table_schema   sysname = null,   

        @table_type nvarchar(255) = null   

        )  

    as  

        select  *  

        from    (select TABLE_CATALOG       = db_name(),  

                TABLE_SCHEMA        = user_name(o.uid),  

                TABLE_NAME      = o.name,  

                TABLE_TYPE      = convert(nvarchar(30),  

                                case o.type   

                                when 'U' then   

                                    case when ObjectProperty(o.id, 'IsMSShipped') = 0  

                                    then N'TABLE' else N'SYSTEM TABLE' end  

                                when 'S' then N'SYSTEM TABLE'  

                                when 'V' then   

                                    case when ObjectProperty(o.id, 'IsMSShipped') = 0  

                                    then N'VIEW' else N'SYSTEM VIEW' end  

                                end),  

                TABLE_GUID      = convert(uniqueidentifier, null),  

                BOOKMARKS       = convert(bit, 1),  

                BOOKMARK_TYPE       = convert(int, 1 /*DBPROPVAL_BMK_NUMERIC*/),  

                BOOKMARK_DATATYPE   = convert(smallint, 21 /*DBTYPE_UI8 */),  

                BOOKMARK_MAXIMUM_LENGTH = convert(int, 8),  

                BOOKMARK_INFORMATION    = convert(int, 0),  

                TABLE_VERSION       = convert(bigint, ObjectPropertyEx(o.id, 'objectversion')),  

                CARDINALITY     = x.rows,  

                DESCRIPTION     = convert(nvarchar(1), null),  

                TABLE_PROPID        = convert(int, null)   

          

            from    sysobjects o left join sysindexes x on o.id = x.id and x.indid in (0,1)  

            where   o.name = @table_name  

            and     o.type in ('U','V','S')  

            and permissions(o.id) <> 0) as t  

      

        where   (@table_schema is null or @table_schema = TABLE_SCHEMA)  

        and     (@table_type is null or @table_type = TABLE_TYPE)  

        order by 4, 2, 3  

  • 相关阅读:
    php rewrite 简单
    第十六章 复杂的抽像类结构 简单
    php数学函数 简单
    PHP PCLZIP压缩类的学习笔记 简单
    windows实战Git环境配置msysGit+TortoiseGit 简单
    配置php.ini支持图片exif信息 简单
    使用PHP连接POSTGRES数据库 简单
    jQuery Ajax 实例 全解析 简单
    第十六章 多态性(一) 简单
    C#委托与事件
  • 原文地址:https://www.cnblogs.com/martian6125/p/9631070.html
Copyright © 2020-2023  润新知