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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 BCP Issue Cannot Open Database
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

josh2009
Yak Posting Veteran

81 Posts

Posted - 01/27/2011 :  16:02:38  Show Profile  Reply with Quote
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.


Edited by - josh2009 on 01/27/2011 16:38:32

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 01/27/2011 :  16:19:54  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 01/27/2011 :  16:34:41  Show Profile  Reply with Quote
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

USA
38200 Posts

Posted - 01/27/2011 :  17:01:48  Show Profile  Visit tkizer's Homepage  Reply with Quote


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

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000