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