• Welcome to Web Hosting Forum - A Web Hosting Community for Webmasters.
 

Recommended Providers



WordPress Hosting

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress

Recent Topics

Forum Membership

Forum Membership

Change database schema in SQL 2005 database

Started by Raju, March 09, 2009, 04:36:21 PM



Raju

Hi,

I have restored my SQL 2005 database file (.mdf) file but it shows the database schema to the user that I was using in my local system. How can I set the database schema to dbo ?

Thanks,

Raju

Kailash

Sql Server 2005 provides a T-SQL statement to change the table schema. You will need to execute following SQL statement to change the schema:

exec sp_MSforeachtable "ALTER SCHEMA your_schema_name TRANSFER ? PRINT '? modified' "

Replace your_schema_name with your new schema name.

Kailash

Raju



WordPress Hosting