Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 BCP Issue Cannot Open Database

Author  Topic 

josh2009
Yak Posting Veteran

81 Posts

Posted - 2011-01-27 : 16:02:38
Hi,

I am using BCP with SQL 2005 to import data into a table. I am able to use BCP to download from SQL to txt file but having issues uploading data into a table. I get an error msg - "Cannot Open database "DBTest" requested by the login. I am using the same login ID for downloading and it works just fine but not when I'm uploading to SQL. Server is on a VM image. Here is my code -

bcp DbTest.dbo.testTable in c:\bcp\testTable.txt -S test -C -T -f c:\bcp\testTable.fmt 


Any help on this would be greatly appreciated.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-27 : 16:19:54
What permissions do you have on that database?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

josh2009
Yak Posting Veteran

81 Posts

Posted - 2011-01-27 : 16:34:41
Sorry for the trouble but it was my mistake - typo error on the server name. I got it now.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-27 : 17:01:48


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -