tailieunhanh - The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P68

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P68: Congratulations on your journey to become certified in SQL Server 2008. This book will help prepare you for your exam and give you a practical view of working with SQL Server 2008. | ETL Techniques Chapter 8 317 Table Continued. Required BCP Syntax Arguments Syntax Element Description format Use this option to generate a format file. When format is used no import or export is performed. Use this option with the -f and or -x parameters to specify the path of the generated format file. We will discuss format files later. datafile The path of the data file that you will be importing from or exporting to. Optional arguments There are number of additional arguments that can be used with the BCP utility. They are optional overall but certain options may be required depending on what kind of operation you are performing. For example if you use the format argument to generate a format file you must also use the -f argument to specify the path of the file. See Table for a list of some additional common bcp arguments. In addition to the required arguments there are a number of options that can be used to control BCP s behavior. You can get a complete list from the SQL Server 2008 documentation. Table lists some of the options we will discuss in this chapter. Pay attention to the uppercase lowercase nature of the options. They are case sensitive. Test Day Tip WThe list of options available for BCP can be overwhelming at first. It is worth your time to be familiar with them but don t stress on them. You won t likely be tested on specific command-line switches. 318 Chapter 8 ETL Techniques Table Optional BCP Arguments Option Description -S instancename Specifies which instance of SQL Server BCP should connect to. If the -S option is not specified the local default instance is assumed. -T Indicates that you wish BCP to connect using a trusted connection aka Windows authentication . -U loginname Used to specify a SQL authentication login name when not using -T. -P password Used to specify the password associated with the -U login name. -N Use a Unicode native data file type. -n Use a native data file type use only when you don t have Unicode .