Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: BCP connect error via shared memory to local instance

79 views
Skip to first unread message

501Blues

unread,
May 26, 2009, 7:42:01 PM5/26/09
to
How do you specify the path? Is this something within the script or some
other place.
--
IT Mgr


"TBQ" wrote:

> Duh - I had to specify the path to the SQL Server 2005 version of BCP...
>
> "TBQ" wrote:
>
> > I have three SQL server instances on my local box:
> >
> > (local) = SQL Server 2000
> > (local)\SQL2005 = Developer Edition SQL Server 2005
> > (local)\SQLExpress = SQL Server 2005 Express Edition
> >
> > ONLY shared memory is enabled.
> >
> > I am trying to write some BCP scripts against my (local)\SQL2005 instance,
> > but cannot get it to work. Is there an issue with BCP using shared memory to
> > a SQL Server 2005 local instance?
> >
> > ** Works (against SQL Server 2000 (local):
> > bcp "myDB.dbo.myTable" out C:\test.txt -c -SmyPC -T
> > bcp "myDB.dbo.myTable" out C:\test.txt -c -S(local) -T
> >
> >
> > ** fails (against SQL Server 2005 (local)\SQL2005:
> > bcp "myDB.dbo.myTable" out C:\test.txt -c -SmyPC\SQL2005 -T
> >
> > ** Error message:
> > SQLState = 08001, NativeError = 14
> > Error = [Microsoft][ODBC SQL Server Driver][DBMSLPCN]Invalid connection.
> > SQLState = 01000, NativeError = 14
> > Warning = [Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionOpen
> > (ParseConnectParams()).
> >
> > I have tried a number of variations in server name specification (computer
> > name, (local), ., enclosed in "" and [], but to no avail).
> >
> > I am running (on XP SP2)
> > Microsoft SQL Server 2000 - 8.00.2055 (Intel X86)
> > Microsoft SQL Server 2005 - 9.00.3077.00 (Intel X86)
> >
> > respectively.
> >
> > Any help will be greatly appreciated.
> >
> > Tore.
> >

TBQ

unread,
May 27, 2009, 9:27:01 AM5/27/09
to
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\bcp.exe"
"myDB.dbo.myTable" out C:\test.txt -c -SmyPC\SQL2005 -T

Also, looking at my PATH variable, the SQL Server 2000 path comes before the
SQL Server 2005 path on my system, which is probably why I had to specify the
path. I will change my PATH variable once most of our databases are ported.

Regards,
Tore.

0 new messages