2012年2月25日星期六

BCP Cannot open database requested in login

I have several DB's that I am trying to bulk load with data using BCP
The problem is that all of them contain a decimal in the DB name.
When BCP runs it gets confused and tries to log on to just the first portion
of the database
For example with a DB named test.server I get the following error
SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database
requested in login 'test'. Login fails.
Is this just a limitation of BCP or is there some sort of work around?Scott,
Quote it.
c:\>bcp "[my_db_with_._etc].dbo.t1" out "c:\temp\test.txt" ...
AMB
"Scott B" wrote:
> I have several DB's that I am trying to bulk load with data using BCP
> The problem is that all of them contain a decimal in the DB name.
> When BCP runs it gets confused and tries to log on to just the first portion
> of the database
> For example with a DB named test.server I get the following error
> SQLState = 37000, NativeError = 4060
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database
> requested in login 'test'. Login fails.
> Is this just a limitation of BCP or is there some sort of work around?
>
>

没有评论:

发表评论