sql server - Transfer SQL Objects using ssis according to given name -


suppose, have 2 databases , db_1 , db_2.

there table named 't1' in db_1, now,i need package in ssis ask names sql objects.if choose 't1',the data transfered db_2.

i dont know if possible.

generally ssis not meant used in interactive mode. user input either introduced config setting or environment variable or values in other table.

alternately, can prompt , capture input values outside of ssis package , execute ssis package, in c# or asp.net or other interactive platform.

that said, if must prompt input , use it, way instantiating , displaying form in script component.

create variable @ appropriate scope called tablename in package. use code below (modify needed) set tablename variable's value whatever user enters. finally, use same tablename variable in control flow copy data from.

system.windows.forms.form frm = new form(); textbox      = new textbox(); button submitbutton = new button();  public void main() {     submitbutton.text = "enter source table name";     submitbutton.width = 300;     submitbutton.height = 80;     submitbutton.click += new eventhandler(submitbutton_click);     tablenametextbox.name = "input";     frm.controls.add(tablenametextbox);     frm.controls.add(submitbutton);     frm.showdialog();     messagebox.show(dts.variables["tablename"].value.tostring());       dts.taskresult = (int)scriptresults.success; }  void submitbutton_click(object sender, eventargs e) {     dts.variables["tablename"].value = tablenametextbox.text;     frm.close(); } 

ref: https://stackoverflow.com/a/4121557/325521


Comments