En cours

SQL Stored Procedur bulk insert linked server

Hi

I need a SP to load many tables to a Stage db (source will be a linked server and you will read tables/views).

The names of the fields can be different in source and destiny. but the qnt of fields will be the same.

I will have a "table 1" with a list of the tables I need to load, fields will be:

-id (int)

-linked server name

-source table/view name

-destiny db name

-destiny db table name

I need a log table 2:

-id (of the table we are loading)

-date/hour start

-date/hour finish

-status

-row loaded

If there is a error, what can we do? please propose (mail, log, etc).

Your SP will read "table 1", first row, load data, then second and so on. With every "load", you will fill the log record.

Thanks

Compétences : Serveur SQL Microsoft, SQL

Voir plus : linked int, sql server insert xml, sql server insert file, vbs sql server insert

Concernant l'employeur :
( 67 commentaires ) Silla, Spain

N° du projet : #8466688