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.
| Author |
Topic |
|
rauk10
Starting Member
16 Posts |
Posted - 2008-08-09 : 13:37:27
|
| I am trying to use a BCP commandif I type the below code on command prompt Bcp AdventureWorks.Sales.Currency out "c:\abc.txt" -c -TThen the abc.txt is created on the C drive with all the values from that table.but if I use my own table and write Bcp test.dbo.tempInfo out "c:\abcd.txt" -c -Tthen I will get this errorSQLState = 28000, NativeError = 18456Error = [Microsoft][SQL Native Client] [Sql server] login failed for user 'Rauk\Rauk'.SQLState = 42000, NativeError = 4060Error = [Microsoft][SQL Native Client] [Sql server] cannot open database "test" requested by the login. The login failed Any help will be appreciated. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-09 : 14:22:06
|
| Are both the databases in the same server? |
 |
|
|
rauk10
Starting Member
16 Posts |
Posted - 2008-08-09 : 14:26:26
|
quote: Originally posted by visakh16 Are both the databases in the same server?
Yes they both are in the same server. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-09 : 14:37:39
|
| and also in same instance?also do you have access to the database test? |
 |
|
|
rauk10
Starting Member
16 Posts |
Posted - 2008-08-09 : 14:58:15
|
quote: Originally posted by visakh16 and also in same instance?also do you have access to the database test?
Thank You. I got it now. I was just a punk. I had two instances and on both instance I had AdventureWorks. So on the first case it was using the default instance and also searching on default instance in the second case. So I added the -S Servername on the second one and its working fine now.Thank You for your help. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-09 : 15:01:29
|
quote: Originally posted by rauk10
quote: Originally posted by visakh16 and also in same instance?also do you have access to the database test?
Thank You. I got it now. I was just a punk. I had two instances and on both instance I had AdventureWorks. So on the first case it was using the default instance and also searching on default instance in the second case. So I added the -S Servername on the second one and its working fine now.Thank You for your help.
cool |
 |
|
|
|
|
|