Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi SSIS如何管理动态连接管理器?_Delphi_Ssis_Delphi 2006 - Fatal编程技术网

Delphi SSIS如何管理动态连接管理器?

Delphi SSIS如何管理动态连接管理器?,delphi,ssis,delphi-2006,Delphi,Ssis,Delphi 2006,这就是我想要实现的目标 1) Start the loop from 5 years back from current year 2) Check if database for that year is exist if not create new one ? 3) move the tables according to there year of creation into the database of that year ? 为此,我创建了SSIS包,并在连接管理器中添加了连

这就是我想要实现的目标

1) Start the loop from 5 years back from current year 
2) Check if database for that year is exist if not create new one  ?
3) move the tables according to there year of creation into the database of that year ?
为此,我创建了SSIS包,并在连接管理器中添加了连接字符串,该连接字符串为每年的每个循环动态设置。在检查数据库是否存在和创建新数据库时,该连接字符串工作正常,但当包尝试执行sql任务以移动数据表时,它会抛出错误作为

[Execute SQL Task] Error: Connection manager "dummyserver.dummydatabase2012" does not exist.

如果需要创建新数据库,请创建主数据库的连接管理器。您可以使用这一个CM来处理所有数据库,在引用表时只需使用DB.SCHEMA.TABLE语法(例如,从mydb.dbo.mytable中选择*。

您每次都可以尝试使用如下SQL语句创建表

创建表如果不存在TableName


您可以说动态设置了连接字符串。在该连接字符串中,为
ServerName
IntialCatlog
创建一个变量,并使用变量名分配该属性值,然后在运行时使用
script task
或如果变量来自数据库,则使用`sql task>根据连接要求更改变量名。如果有任何问题,请告诉我。

谢谢。!我用变量设置了我的服务器名,但没有设置导致错误的connections
IntialCatlog
属性。再次感谢。关于你的赏金,请更新你的问题,以反映哪些内容已过时。我们需要这里的细节。举一个例子,说明如果数据库已经存在,应该怎么做,以及如何“移动”表。我们必须担心李吗?是否有表的子集需要担心?