I am using the below code in my command prompt and it is copying all the records from a particular table and dropping in Flat file format in particular folder location. The below code is working if I am pointing to my local database but if I need to point to different database outside my environment how should I set it here also including the case where User ID and password are required to access the db.
bcp AdventureWorks.HumanResources.Department out C:\myDepartment_c_t.txt -c -t, -r \n -T -S.
MBH