Friday, March 30, 2012

How to attach a database using SQL Server 2005

Hello
In the full version of SQL Server I can use enterprise manager to attach a
database. I have an SQL Server 2005 database from another machine which I
want to attach to a new computer with SQL Server 2005 Express. Is there a
tool I can use or do I need to run a command?
Angushave you try the sp_attach stored procedure?
"Angus" <nospam@.gmail.com> wrote in message
news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>|||Yes I have found the sp_attach syntax - but how do I run these commands?
Can I run them from the command line? But if I navigate to prog
files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg sp_attach?
Is this not the right path?
Or have I maybe not installed something?
There is a Start menu item, Microsoft SQL Server 2005... Configuration
Tools... SQL Server Configuration Manager - but can't see where I could type
commands in there?
Angus
"Jeje" <willgart@.hotmail.com> wrote in message
news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
> have you try the sp_attach stored procedure?
> "Angus" <nospam@.gmail.com> wrote in message
> news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
a[vbcol=seagreen]|||"Angus" <nospam@.gmail.com> wrote in
news:ecHo7S8kHHA.4188@.TK2MSFTNGP02.phx.gbl:

> Yes I have found the sp_attach syntax - but how do I run these
> commands? Can I run them from the command line? But if I navigate to
> prog files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg
> sp_attach? Is this not the right path?
> Or have I maybe not installed something?
> There is a Start menu item, Microsoft SQL Server 2005... Configuration
> Tools... SQL Server Configuration Manager - but can't see where I
> could type commands in there?
You can use the OSQL command-line utility to run stored procedures. See
BOL for how to use it.

> Angus
> "Jeje" <willgart@.hotmail.com> wrote in message
> news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...
> a
> I
> a
>|||On Fri, 11 May 2007 12:52:21 +0100, "Angus" <nospam@.gmail.com> wrote:

>Hello
>In the full version of SQL Server I can use enterprise manager to attach a
>database. I have an SQL Server 2005 database from another machine which I
>want to attach to a new computer with SQL Server 2005 Express. Is there a
>tool I can use or do I need to run a command?
>Angus
SQL Server Management Studio Express has an attach command.
Click on Databases, right context mouse click, attach..
Another way to move a database from one machine to another is to make
a backup and then restore the backup to the new machine.|||Hi
CREATE DATABASE ...command has FOR ATTACH option ,please take a look at
BOL.
"Angus" <nospam@.gmail.com> wrote in message
news:%23iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>sql

No comments:

Post a Comment