Hi,
I am trying to bulk copy a text file into a table and I get this error
message:
SQLState = 28000, NativeError = 18452
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'Test Login'. Reason: Not associated with a trusted SQL Server connection.
I am pretty sure that my username and password are correct because I just
created them 5 minutes before.
Any clues on how to get around this problem?
JDHi
It would help if you showed the command you where executing, but it seems
that you have specified the -T option possibly instead of -t (the arguements
are case sensitive!). See Books online for more information on the BCP
utility.
John
"Joe Delphi" <delphi561@.nospam.cox.net> wrote in message
news:Zi7Xe.253734$E95.165564@.fed1read01...
> Hi,
> I am trying to bulk copy a text file into a table and I get this error
> message:
> SQLState = 28000, NativeError = 18452
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
> user
> 'Test Login'. Reason: Not associated with a trusted SQL Server connection.
> I am pretty sure that my username and password are correct because I just
> created them 5 minutes before.
> Any clues on how to get around this problem?
>
> JD
>
>|||Joe Delphi (delphi561@.nospam.cox.net) writes:
> I am trying to bulk copy a text file into a table and I get this error
> message:
> SQLState = 28000, NativeError = 18452
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
> user'Test Login'. Reason: Not associated with a trusted SQL Server
> connection.
> I am pretty sure that my username and password are correct because I just
> created them 5 minutes before.
It appears that the SQL Server is not configured for SQL authentication,
but only accepts Windows authentication. To examine this right-click
the sercer in Enterprise Manager and select Properties. Then go the
Security tab.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Sorry, here is the command I am using. I am not using the -t or -T option.
bcp "[local].Compensation.tblOCImport" in "PAYOC.txt" -c -o"C:\2005\Raw
Extracts\OutputLog.txt" -U"Test Login" -P"TestPassword"
I changed the Server properties to use both Windows authentication and also
SQL Server authentication and now I get this error message:
SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database
requested in login '[local]'. Login fails.
Like I said in my original post, I just created my login and password a few
minutes ago so I know they are correct. But I don't understand why I am
getting the error message.
JD
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:%238cosSCvFHA.664@.tk2msftngp13.phx.gbl...
> Hi
> It would help if you showed the command you where executing, but it seems
> that you have specified the -T option possibly instead of -t (the
arguements
> are case sensitive!). See Books online for more information on the BCP
> utility.
> John
> "Joe Delphi" <delphi561@.nospam.cox.net> wrote in message
> news:Zi7Xe.253734$E95.165564@.fed1read01...
connection.
just
>|||The qualified table name is specified the format: <database
name>.<schema>.<object>. The server name can be specified with the '-S' BCP
parameter.
It is unclear what your server and database names are. Assuming a database
named 'Compensation' in the 'dbo' schema on the local server:
bcp "Compensation.dbo.tblOCImport" in "PAYOC.txt" -c -o"C:\2005\Raw
Extracts\OutputLog.txt" -U"Test Login" -P"TestPassword" -S"(local)"
The -S parameter can be omitted for the local server. For a remote server:
bcp "Compensation.dbo.tblOCImport" in "PAYOC.txt" -c -o"C:\2005\Raw
Extracts\OutputLog.txt" -U"Test Login" -P"TestPassword" -S"MyServer"
Hope this helps.
Dan Guzman
SQL Server MVP
"Joe Delphi" <delphi561@.nospam.cox.net> wrote in message
news:ISfXe.253752$E95.85768@.fed1read01...
> Sorry, here is the command I am using. I am not using the -t or -T
> option.
> bcp "[local].Compensation.tblOCImport" in "PAYOC.txt" -c -o"C:\2005\Raw
> Extracts\OutputLog.txt" -U"Test Login" -P"TestPassword"
> I changed the Server properties to use both Windows authentication and
> also
> SQL Server authentication and now I get this error message:
> SQLState = 37000, NativeError = 4060
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open
> database
> requested in login '[local]'. Login fails.
> Like I said in my original post, I just created my login and password a
> few
> minutes ago so I know they are correct. But I don't understand why I am
> getting the error message.
> JD
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:%238cosSCvFHA.664@.tk2msftngp13.phx.gbl...
> arguements
> connection.
> just
>|||Joe Delphi (delphi561@.nospam.cox.net) writes:
> Sorry, here is the command I am using. I am not using the -t or -T
> option.
> bcp "[local].Compensation.tblOCImport" in "PAYOC.txt" -c -o"C:\2005\Raw
> Extracts\OutputLog.txt" -U"Test Login" -P"TestPassword"
> I changed the Server properties to use both Windows authentication and
> also SQL Server authentication and now I get this error message:
> SQLState = 37000, NativeError = 4060
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open
> database requested in login '[local]'. Login fails.
> Like I said in my original post, I just created my login and password a
> few minutes ago so I know they are correct. But I don't understand why
> I am getting the error message.
Did you also add the Test login as a user in the database? You get this
message if the user does not have access to the database. You also get it,
if the database does not exist at all.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
2012年3月20日星期二
BCP Problem
标签:
18452error,
bcp,
bulk,
copy,
database,
errormessagesqlstate,
file,
microsoft,
microsoftodbc,
mysql,
nativeerror,
oracle,
server,
sql,
table,
text
订阅:
博文评论 (Atom)
没有评论:
发表评论