Divi WordPress Theme

Change database schema in SQL 2005 database

Topic: Change database schema in SQL 2005 database  (Read 7943 times)

Offline Raju

  • New Member
  • *
  • Posts: 21
  • iTrader: +0/-0
    • View Profile
Change database schema in SQL 2005 database
« on: March 09, 2009, 04:36:21 PM »
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
VPS Hosting - AccuWebHosting

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 658
  • iTrader: +153/-0
    • View Profile
Re: Change database schema in SQL 2005 database
« Reply #1 on: March 10, 2009, 09:34:47 AM »
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

Offline Raju

  • New Member
  • *
  • Posts: 21
  • iTrader: +0/-0
    • View Profile
Re: Change database schema in SQL 2005 database
« Reply #2 on: March 11, 2009, 12:52:37 AM »
Thanks. It worked.

Raju
Shopify Divi WordPress Theme
Tags:

change include_path using .htaccess

Started by HRameshBoard Apache

Replies: 1
Views: 7974
Last post October 26, 2008, 08:17:33 AM
by Kailash
Change title of the topic in phpbb3 - Optimal Titles

Started by KailashBoard Forums and Content Management

Replies: 0
Views: 4973
Last post November 16, 2008, 10:35:20 AM
by Kailash
Change nameservers while transferring domain

Started by scottBoard Domain Registration

Replies: 1
Views: 4289
Last post November 18, 2008, 10:33:42 AM
by Kailash
How to change character encoding in the file

Started by KailashBoard How Tos

Replies: 0
Views: 5515
Last post September 12, 2009, 10:39:47 AM
by Kailash
Google has Change Layout

Started by John23Board Google

Replies: 2
Views: 2719
Last post June 15, 2010, 10:27:01 AM
by Nile Hadwards