BCP

1.Handles Data in Native Format

EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[FactClickUDC_ALL]" out d:\01.dat -S . -T   -n '

EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[ALL]" in d:\01.dat -S .  -T   -n '

2.Performs the operation using a character data type. This option does not prompt for each field
EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[FactClickUDC_ALL]" out d:\01.dat -S . -T   -c '

EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[ALL]" in d:\01.dat -S .  -T   -c '


3.Performs the bulk-copy operation using the native (database) data types of the data for noncharacter data, and Unicode characters for character data.
EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[FactClickUDC_ALL]" out d:\01.dat -S . -T   -N '

EXEC master..xp_cmdshell 'bcp "[HopsDW].[dbo].[ALL]" in d:\01.dat -S .  -T   -N '

Notes:

-T :Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security.



 

posted @ 2011-04-07 16:35  reagent  阅读(275)  评论(0编辑  收藏  举报