Click to See Complete Forum and Search --> : Export Database


loiler
03-26-2001, 10:33 PM
I am trying to make a copy of the SQL database to another server; however,
since the two computers and servers are not connected, cannot connect to
the internet as well, I will have to save the database to a disk first, I
tried the bcp commands:

bcp intranet..fundcode out c:\bcpout -c -U login -P pswd -S servername -T

but the error message said:
incorrect syntax near "."

Can anyone help me with that? Or is there other methods to save the database
to a disk?

Craig Clearman
03-27-2001, 08:51 AM
>bcp intranet..fundcode out c:\bcpout -c -U login -P pswd -S servername -T
>
>but the error message said:
>incorrect syntax near "."

You're probably running it from SQL Query Analyzer, right?

Run it from the command line instead.

Ciao, Craig

DaveSatz
03-27-2001, 11:31 AM
try using xp_cmdshell to run your bcp commands if you want them to run under
SQL Server.

--
HTH,
David Satz
Principal Software Engineer
Hyperion Solutions
->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
(Please reply to group only - emails answered rarely)
-----------------------------------------------------------------

"loiler" <wivina_lo@impiric.com.hk> wrote in message
news:3ac00a05$1@news.devx.com...
>
> I am trying to make a copy of the SQL database to another server; however,
> since the two computers and servers are not connected, cannot connect to
> the internet as well, I will have to save the database to a disk first, I
> tried the bcp commands:
>
> bcp intranet..fundcode out c:\bcpout -c -U login -P pswd -S servername -T
>
> but the error message said:
> incorrect syntax near "."
>
> Can anyone help me with that? Or is there other methods to save the
database
> to a disk?

Tim Byng
04-03-2001, 09:37 AM
"loiler" <wivina_lo@impiric.com.hk> wrote:
>
>I am trying to make a copy of the SQL database to another server; however,
>since the two computers and servers are not connected, cannot connect to
>the internet as well, I will have to save the database to a disk first,
I
>tried the bcp commands:
>
>bcp intranet..fundcode out c:\bcpout -c -U login -P pswd -S servername -T
>
>but the error message said:
>incorrect syntax near "."
>
>Can anyone help me with that? Or is there other methods to save the database
>to a disk?

When I need to copy a database to another server, I just back it up to disk
and then restore it on the other computer.