Simon's SQL

SQL,DBA,tuning,Trouble Shooting,Performance

Archive for November, 2011

permission test.(impersonate)

Posted by Simon Cho on 11/03/2011

select SUSER_ID(), SUSER_NAME()
go
select * from server_A.master.dbo.sysobjects
go

(1 row(s) affected)
Msg 18452, Level 14, State 1, Line 0
Login failed for user ‘(null)’. Reason: Not associated with a trusted SQL Server connection.

execute as login = ‘sql_admin’  –who has the permission to login the server.
go
select SUSER_ID(), SUSER_NAME()
go
select * from server_A.master.dbo.sysobjects
go

(1 row(s) affected)

(1277 row(s) affected)

revert;
go
select SUSER_ID(), SUSER_NAME()
go

Posted in Common | Leave a Comment »

SQL 2000 linked server error from x64 machine(Cannot obtain the schema rowset “DBSCHEMA_TABLES_INFO”)

Posted by Simon Cho on 11/03/2011

Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset “DBSCHEMA_TABLES_INFO” for OLE DB provider “SQLNCLI” for linked server “<LinkedServerName>”. The provider supports the interface, but returns a failure code when it is used.

You may receive an error message when you try to run distributed queries from a 64-bit SQL Server client to a linked 32-bit SQL Server

 

http://support.microsoft.com/kb/906954

 

Another method,

http://sqlblog.com/blogs/roman_rehak/archive/2009/05/10/issue-with-64-bit-sql-server-using-sql-2000-linked-server.aspx

create procedure sp_tables_info_rowset_64

      @table_name sysname, 

      @table_schema     sysname = null,   

      @table_type nvarchar(255) = null 

as

  declare @Result int set @Result = 0

  exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type
go

grant execute on sp_tables_info_rowset_64 to public

Posted in Common | Leave a Comment »

vmware tech pdf files.

Posted by Simon Cho on 11/01/2011

 

Technical Resource Center

http://www.vmware.com/resources/techresources/

Posted in Common | Leave a Comment »