SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Attaching Database


Attaching Database

Author
Message
dheer
dheer
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 Visits: 158
Hi,
Due to disk space issues I tries to move a database this morning using Microsoft Management Studio. I then detached the database and copied the mdf to the new drive. When I tried to attach the database in Microsoft Management Studio I received the following error:

"Proposed new database owner is already a user or aliased in the database - error 15510"

Could you please help me out in with this issue

Thanks
ronnie.edgar-1068255
ronnie.edgar-1068255
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 25
Change the owner to be sa in the attach DB dialog
dheer
dheer
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 Visits: 158
How can i change that could you please guide me
ronnie.edgar-1068255
ronnie.edgar-1068255
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 25
can you see the attach db dialog?

once you add the mdf, there is a combobox for owner listing server user, drop it down and select sa.
dheer
dheer
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 Visits: 158
In the attach database dailog box i can see only ADD button .When i click tat button and directed to .mdf file and after that i clicked OK .....then i m getting this error.
@SQLNumpty
@SQLNumpty
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1224 Visits: 694
Reading books on line would be a help. See the bold bit below.

In SQL Server Management Studio Object Explorer, connect to an instance of the Microsoft SQL Server Database Engine and then expand that instance.

Right-click Databases, point to Tasks, and then click Attach. The Attach Databases dialog box appears.

To specify the database to be attached, click Add, and in the Locate Database Files dialog box, select the disk drive where the database resides and expand the directory tree to find and select the .mdf file of the database; for example:

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_Data.mdf

Important:
This example assumes that the AdventureWorks database has previously been detached. For information on detaching a database, see How to: Detach a Database (SQL Server Management Studio).



Optionally, to specify a different name for the database to attach as, enter the name in the Attach as column of the Attach Databases dialog box.

Optionally, change the owner of the database by selecting a different entry in the Owner column.

When you are ready to attach the database, click OK.
ronnie.edgar-1068255
ronnie.edgar-1068255
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 25
Look at the screen once you have added the file don't just go blindly clicking buttons, *before* you look at the screen.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search