La herramienta SQLBCP2Azure es una herramienta de copia de datos eficiente entre SQL Server y SQL Server Azure y entre SQL Servers. Se trata de un reemplazo de la existente bcp.exe que viene con las herramientas cliente de SQL Server.
Los principales beneficios de utilizar esta herramienta son:
- Ficheros de configuración persistentes ( xml )
- Cifrado de passwords
Un ejemplo de configuración es el siguiente:
Create user table type
- <?xml version="1.0" encoding="utf-8" ?>
- <SolidQBCP ContinueOnError ="False"
- BatchSize="4096"
- NotifyAfter="10000"
- Hints="TABLOCK,CHECK_CONSTRAINTS"
- TimeOut="0">
- <!--
- ECB:
- How to encrypt a password:
- 1: SolidQ.BCP.exe -GenerateKeyEncryption -output c:\path\outputKey.txt
- 2: SolidQ.BCP.exe -EncryptPassword password -Key c:\path\outputKey.txt -Output c:\path\outputEncryptedPassword.txt
- 3: Copy in the "Password" tag of this XML (at destination or source, depending of what password are you encrypting)
- the exact output of de c:\path\outputEncryptedPassword.txt
- 4: Copy in the CDATA section, the exact value that you will find at c:\path\outputKey.txt
- Obviously, the two passwords must be generated with the same outputKey.txt :)
- Hints Values:
- - TABLOCK
- - CHECK_CONSTRAINTS
- - FIRE_TRIGGERS
- - KEEP_IDENTITY
- - KEEP_NULLS
- - USEINTERNALTRANSACTIONS
- TimeOut:
- Number of econds to the operation to complete after error
- if 0, no timeout specified
- -->
- <credentialsforce_column_mapping="true">
- <source
- SqlInstance ="10.1.1.99\sql2008r2"
- DatabaseName ="DWrendimiento"
- IntegratedSecurity="false"
- User="sa"
- IsPasswordEncrypted="false"
- Password ="password"
- UseQueryAsSource="true"
- TableName="snapshots.performance_counter_values"
- Query="select * from snapshots.performance_counter_values"
- ColumnNames="performance_counter_instance_id,snapshot_id,collection_time,formatted_value,raw_value_first,raw_value_second"
- />
- <destination
- SqlInstance ="(local)\sql2008r2_2"
- DatabaseName ="borrame"
- IntegratedSecurity="true"
- User="enriquecatala"
- IsPasswordEncrypted="false"
- Password ="n5SoiTel+ulzJuz83IUkBA=="
- TableName="dbo.performance_counter_values"
- ColumnNames="performance_counter_instance_id,snapshot_id2,collection_time,formatted_value,raw_value_first,raw_value_second2"
- />
- <key>
- <![CDATA[example: s&=79"7. D1_ XB-k6N7mja-5-$z2'1kx@*:z7R[V(] zx3=v-Pd|}gq?['\8Qs{i}1DypEG[+'0o7kf+h,Iz@{g2V+w="sjg9\o!H0&T8 y7C0gb*8#@QjC0*?$~C*reB>:NL,0hMF#/:!Kq-1=FW=VM0<3O&TvCQ t@GHd-4&I$]J4.ecS1A\@]]>
- </key>
- </credentials>
- </SolidQBCP>
La herramienta ha sido liberada en codeplex bajo licencia Microsoft Public License (Ms-PL).
Para más información http://bcp2sqlazure.codeplex.com/
No hay comentarios:
Publicar un comentario