cls
@echo off
echo ----------------------------------------------------------------------------------
echo Exploration Air Benefits Sample Site SQL Server BCP OUT script 
echo ----------------------------------------------------------------------------------
echo.
echo This batch file BCPs OUT the SQL Server database for Exploration Air Benefits.
echo.
echo Usage is OutputExAirBenefits.cmd {server} where {server} is the name of the computer where 
echo SQL Server 6.5 resides.
echo.
echo Note there are some assumptions: 
echo   1) SQL Server is located in c:\mssql\ 
echo   2) The admin account is SA with no password
echo   3) The data is in database ExAirBenefits
echo.
pause
if '%1' == '' goto oops

echo Outputting database

bcp ExAirBenefits..BenefitStatus out BenefitStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EBDStatus out EBDStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EDStatus out EDStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EmployeeStatus out EmployeeStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..PlanStatus out PlanStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..QualifierStatus out QualifierStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Benefit out Benefit.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..DependentType out DependentType.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Field out Field.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Gender out Gender.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..GeoArea out GeoArea.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Physician out Physician.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Plans out Plans.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..QualifierClass out QualifierClass.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..TaxStatus out TaxStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..BenefitPlan out BenefitPlan.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..BenefitTaxStatus out BenefitTaxStatus.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Dependent out Dependent.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Employee out Employee.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..PlanField out PlanField.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..PlanGeoArea out PlanGeoArea.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..Qualifier out Qualifier.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..BenefitQualifier out BenefitQualifier.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EmployeeBenefit out EmployeeBenefit.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EmployeeDependent out EmployeeDependent.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EmployeeQualifier out EmployeeQualifier.bcp -S%1 -Usa -P -n
bcp ExAirBenefits..EmployeeBenefitDependent out EmployeeBenefitDependent.bcp -S%1 -Usa -P -n

goto outta_here

:oops
echo Usage is: BuildExAirBenefits.cmd {server} please provide the name of your server
Please try again

:outta_here
Echo Done!