Undocumented Microsoft SQL Server 2008
SQL Server 2005 and the new little brother SQL Server 2008 are full of new technique below and above the surface. This article describes a few of them.
OpenRowSet
OpenRowSet was already possible in MSSQL 2000 but now in MSSQL 2008 this technique is used allover in system itself although it is rarely documented. If you start a DAC connection you can run queries as:
select * from OpenRowset(TABLE ALUCOUNT,1,1)
as used in many views as allocation_units. An equel statement with delete returns a syntax error. It's hard to understand where this table ALUCOUNT has to be come from. The openrowset method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data by using OLE DB. The advice from Microsoft to use linked server instead is probably not for internal procedures.
The TABLE is a synonym for the data provider, ALUCOUNT is the datasource. The OpenRowSet is used as an undocumented loopback method.
|