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

<<  July 2018  >>
MoTuWeThFrSaSu
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar