Divi WordPress Theme

Change database schema in SQL 2005 database

Topic: Change database schema in SQL 2005 database  (Read 8198 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: 662
  • 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 in .eu domain expiry date

Started by KailashBoard Domain Registration

Replies: 1
Views: 3090
Last post October 01, 2014, 01:58:55 PM
by DouglasSmith
What are the ways to Change IP ?

Started by ChestonBoard Dedicated Server Hosting

Replies: 1
Views: 342
Last post October 28, 2021, 02:44:54 PM
by jacobwallace
What are the ways to Change IP ?

Started by BoraboraBoard Other Web Hosting Stuff

Replies: 0
Views: 395
Last post May 13, 2021, 06:49:27 PM
by Borabora
Do keywords ranking change when we redesign the site?

Started by WalterDaviesBoard Search Engine optimization and Link Exchange

Replies: 1
Views: 613
Last post August 18, 2020, 11:18:25 AM
by maheshseo
Should you change SSH port on VPS?

Started by ChrisBoard Hosting Security and Technology

Replies: 5
Views: 1815
Last post November 10, 2021, 02:40:08 PM
by jacobwallace