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

<<  February 2018  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011

View posts in large calendar