Home > Archive > MS SQL Server > August 2005 > attach / detach newbie question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author attach / detach newbie question
JL Adamson

2005-08-30, 3:23 am

I've looked at all the microsoft articles relating to moving a database from
one location to another using the attach/detach commands and I have one
question. Are those commands typed from a command prompt or do I need to run
these from SQL manager?
Hari Prasad

2005-08-30, 3:23 am

Hi,

You can execute those commands from

1. Selecting Query Analyzer from SQL Program groups. (issue the user name
and password to login)

Once you go inside the Query analyzer you could execute all TSQL
commands which includes the detach and attach db commands.

2. FROM command prompt execute OSQL

OSQL -Usa -Ppassword -S <SQL Servername> (enter)

This will go to a SQL prompt; there execute those sp_detach_db and
sp_attach_db commands.

Thanks
Hari
SQL Server MVP

"JL Adamson" < JLAdamson@discussion
s.microsoft.com> wrote in message
news:8886FE74-93B2-4FD9-997F- 25884FA0F953@microso
ft.com...
> I've looked at all the microsoft articles relating to moving a database
> from
> one location to another using the attach/detach commands and I have one
> question. Are those commands typed from a command prompt or do I need to
> run
> these from SQL manager?



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com