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

<<  December 2018  >>
MoTuWeThFrSaSu
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

View posts in large calendar