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

<<  September 2017  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

View posts in large calendar