Enable the use of 'Ad Hoc Distributed Queries' SQLServer 2005

by Rajesh 28. August 2009 01:06

Enable the use of 'Ad Hoc Distributed Queries' SQLServer 2005

The OpenRowset and OpenDatasource functions support ad hoc connections to remote data sources without linked or remote servers. We can enable these functions by checking the "Enable OPENROWSET and OPENDATASOURCE support" checkbox.

 

 

SQL2005: T-SQL to change the schema for a given object

by Rajesh 13. March 2008 03:06

T-SQL to change the schema for a given object

To change the schema for all the tables in a database.

exec sp_MSforeachtable "ALTER SCHEMA <newschemaName> TRANSFER ? PRINT '? modified' "

Drop all tables in a SQL 2005

by Rajesh 13. March 2008 02:59

Sql query to drop all tables in a DB

-- drop tables in a DB : exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped'"

Asha Zurich Chapter

Calendar

<<  November 2017  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar