Skip to content

Invoke-SQLBulkCopy Help Needed #119

Closed Answered by mithrandyr
kartar67 asked this question in Q&A
Discussion options

You must be logged in to vote

The steps are to open a connection to each database (so you will have two connections). Then to use Invoke-SqlBbulkCopy to copy data from one connection to the other. When doing the copying, you have to specify the tablename in the destination. For the source, you can either specify a table name or specify a query (with parameters). You can also specify the matching (if the columns names in the source do not match the destination).

Examples

# open connection to MySQL and name the connection 'src'
Open-MySqlConnection -Server someMySQL -Database someDB -ConnectionName src

# open connection to SQL Server and name the connection 'dst'  (the names don't matter, only that they are different, …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kartar67
Comment options

@gitfvb
Comment options

@mithrandyr
Comment options

Answer selected by kartar67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants