显示标签为“gtbcp”的博文。显示所有博文
显示标签为“gtbcp”的博文。显示所有博文

2012年3月27日星期二

bcp Utility login failure

What am I doing wrong to cause this error
C:\>bcp bookshop..bookcondition in bookcondition.txt -c -T -Ujack -Ppasswor
SQLState = 28000, NativeError = 1845
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'J
CK_WACHTLER\Jack Wachtler'
Thanks for your help
JackJack,
you'll need to remove the -T argument which selects trusted security and
therefore ignores the last 2 arguments. Have a look in BOL : bcp utility,
overview for a listing of all the individual arguments.
HTH,
Paul Ibison|||Using the trusted connection it should assume I am already logged in as a authenticated user. So why am I getting this error? I don't get it
C:\>bcp BookShopDB..BookCondition in BookCondition.txt -c -
SQLState = 28000, NativeError = 1845
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'J
CK_WACHTLER\Jack Wachtler'
Jack|||Jack,
this will create a separate connection to sql server and will only work if
'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
instance of sql server on the local computer where you are running bcp, or
alternatively if this windows user exists in a group added as a windows
login.
HTH,
Paul Ibison|||Hi Jack,
Dont you require the -S <Server_name> along with your bcp command? Try to
include this option and verify.
THanks
Hari
MCDBA
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OL6HON4OEHA.2356@.TK2MSFTNGP10.phx.gbl...
> Jack,
> this will create a separate connection to sql server and will only work if
> 'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
> instance of sql server on the local computer where you are running bcp, or
> alternatively if this windows user exists in a group added as a windows
> login.
> HTH,
> Paul Ibison
>sql

bcp Utility login failure

What am I doing wrong to cause this error?
C:\>bcp bookshop..bookcondition in bookcondition.txt -c -T -Ujack -Ppassword
SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login fai
led for user 'JA
CK_WACHTLER\Jack Wachtler'.
Thanks for your help!
JackJack,
you'll need to remove the -T argument which selects trusted security and
therefore ignores the last 2 arguments. Have a look in BOL : bcp utility,
overview for a listing of all the individual arguments.
HTH,
Paul Ibison|||Using the trusted connection it should assume I am already logged in as a au
thenticated user. So why am I getting this error? I don't get it.
C:\>bcp BookShopDB..BookCondition in BookCondition.txt -c -T
SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login fai
led for user 'JA
CK_WACHTLER\Jack Wachtler'.
Jack|||Jack,
this will create a separate connection to sql server and will only work if
'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
instance of sql server on the local computer where you are running bcp, or
alternatively if this windows user exists in a group added as a windows
login.
HTH,
Paul Ibison|||Hi Jack,
Dont you require the -S <Server_name> along with your bcp command? Try to
include this option and verify.
THanks
Hari
MCDBA
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OL6HON4OEHA.2356@.TK2MSFTNGP10.phx.gbl...
> Jack,
> this will create a separate connection to sql server and will only work if
> 'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
> instance of sql server on the local computer where you are running bcp, or
> alternatively if this windows user exists in a group added as a windows
> login.
> HTH,
> Paul Ibison
>

bcp Utility login failure

What am I doing wrong to cause this error?
C:\>bcp bookshop..bookcondition in bookcondition.txt -c -T -Ujack -Ppassword
SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'JA
CK_WACHTLER\Jack Wachtler'.
Thanks for your help!
Jack
Jack,
you'll need to remove the -T argument which selects trusted security and
therefore ignores the last 2 arguments. Have a look in BOL : bcp utility,
overview for a listing of all the individual arguments.
HTH,
Paul Ibison
|||Using the trusted connection it should assume I am already logged in as a authenticated user. So why am I getting this error? I don't get it.
C:\>bcp BookShopDB..BookCondition in BookCondition.txt -c -T
SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'JA
CK_WACHTLER\Jack Wachtler'.
Jack
|||Jack,
this will create a separate connection to sql server and will only work if
'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
instance of sql server on the local computer where you are running bcp, or
alternatively if this windows user exists in a group added as a windows
login.
HTH,
Paul Ibison
|||Hi Jack,
Dont you require the -S <Server_name> along with your bcp command? Try to
include this option and verify.
THanks
Hari
MCDBA
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OL6HON4OEHA.2356@.TK2MSFTNGP10.phx.gbl...
> Jack,
> this will create a separate connection to sql server and will only work if
> 'JACK_WACHTLER\Jack Wachtler' exist as a windows login on the default
> instance of sql server on the local computer where you are running bcp, or
> alternatively if this windows user exists in a group added as a windows
> login.
> HTH,
> Paul Ibison
>

2012年3月22日星期四

BCP Question.

Am using bcp to upload data files to sql server. The data file contains some
duplicate values. So I used something like ">bcp pubs.dbo.stores in
"stores.txt" -m 50..." assuming, the bcp stops only after encountering more
than 50 duplicate. But BCP stops whenever it encounters the first duplicate
value!!
How to continue with BCP, ignoring the duplicate values?
Thanks.
I think it would be best to bcp into a staging table and then do an insert
with a not in subquery keying off the pk.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Viga" <Viga@.discussions.microsoft.com> wrote in message
news:89E94705-F691-4DCD-8E9C-BAEEDDD5C722@.microsoft.com...
> Am using bcp to upload data files to sql server. The data file contains
some
> duplicate values. So I used something like ">bcp pubs.dbo.stores in
> "stores.txt" -m 50..." assuming, the bcp stops only after encountering
more
> than 50 duplicate. But BCP stops whenever it encounters the first
duplicate
> value!!
> How to continue with BCP, ignoring the duplicate values?
> Thanks.