March 30, 2010 at 1:48 am
Dear All,
I uses this
declare @str varchar(500)
set @str='bcp dbo.EMTemp in E:\CSVConversion\EMTest1.csv -n -T -S info71\SQLEXPRESS'
print @str
exec master..xp_cmdshell @str
but Received this error
SQLState = 37000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database "dbo" requested by the login. The login failed.
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
NULL
More over In shared DB The Host wont allow bulk insert. So I am In trouble now. Can any one help me to use this BCP with out xp_cmdshell.
March 30, 2010 at 2:59 am
ferdin448 (3/30/2010)
Dear All,I uses this
declare @str varchar(500)
set @str='bcp dbo.EMTemp in E:\CSVConversion\EMTest1.csv -n -T -S info71\SQLEXPRESS'
print @str
exec master..xp_cmdshell @str
but Received this error
SQLState = 37000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database "dbo" requested by the login. The login failed.
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
NULL
More over In shared DB The Host wont allow bulk insert. So I am In trouble now. Can any one help me to use this BCP with out xp_cmdshell.
Pass the database name (dbname.dbo.EMTemp)
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
March 30, 2010 at 7:53 am
Thanks a Lot...
But I have one more doubt because the shared database is not allowing bulk insert, BCP & OPENDATASOURCE. Any oherway to import data from Excel or CSV file?
March 30, 2010 at 11:02 pm
Glad to help you.
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
March 30, 2010 at 11:10 pm
Please Start new thread.
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply