Microsoft SQL Server和Azure SQL数据库空间编写器参数

About Database Connections

数据库格式包括数据库连接参数,用于定义和存储身份验证信息。有关共享数据库连接的一般信息,请参阅Using Database Connections

请注意,根据上下文和/或数据库格式,数据库连接参数略有不同。

Connection

来自Connectionparameter in a database format, you can do one of the following:

  • 选择现有的先前定义的连接。看看重用数据库连接inUsing Database Connections
  • SelectAdd Database Connectionto define a new connection. See database-specific parameters below, as well as the sectionAdding a Database Connection in a WorkspaceinUsing Database Connections新连接只能可见于当前用户,或者可以在多个用户之间共享。

连接参数(添加数据库连接对话框)

用户名和密码

输入用户名和密码以访问该服务。

Spatial Parameters

Advanced

Start Transaction At

此参数指定上次成功事务的事务编号。第一次加载数据时,将此值设置为0。

此参数询问编写器何时开始将功能写入数据库时​​。在传入功能属于其交易编号的事务之后,编写器不会编写任何功能,其交易编号是指定的交易编号的交易。

指定值为0(这是通常设置)导致每个要输出的功能。仅在通过段落失败后恢复数据负载操作时,才会指定非零值。

在事务发生故障后,此参数可用于恢复写入。日志将打印类似的消息:

Translation aborted – rerun by setting the writer parameter “Transaction to Start Writing At” to n

wherenis the transaction number. Transaction numbers are an integer sequence (0, 1, 2, 3, etc.). All features written in the transaction whose number is logged will have been rolled back.

此时,您可能会发现服务器访问问题或输入功能中的问题,例如违反目标表的主键约束的功能。如果可以解决此问题而不更改输入功能的排序(例如,还原对服务器的访问权限,或重新生成功能上的主键属性值),则可以按照日志消息中的指令重新运行转换。

在重新运行期间,记录的交易前的交易中的所有功能都是通过翻译处理的,输入写入器,然后忽略。属于交易的特征,其数量等于或大于记录的事务编号将被写入目标表。

Note: ">不te:If this parameter is set to 0, then all features are written.

每次交易功能

This parameter sets the number of features to be placed in each transaction before a transaction is committed to the database.

默认值500用作事务间隔。

如果此参数设置为0,则使用基于功能的事务。随着作品处理的每个功能,都会检查调用的属性fme_db_transaction.。此属性的值指定撰写器是否应提交或回滚当前事务。

属性的值可以是其中一个commit_before.,commit_awter.,ROLLBACK_AFTER或者IGNORE。If thefme_db_transaction.attribute is not set in any features, then the entire write operation occurs in a single transaction.

SQL to Run Before Write

该参数允许SQL sta的执行tements before writing to a table. For example, it may be necessary to clean up a table before attempting to write to it. The statements will be executed only when the first feature arrives at the writer.

For detailed information about SQL functions, click the corresponding menu item in theSQL运行编辑器帮助关闭

Available menu options depend on the format.

Multiple SQL commands can be delimited by a character specified using thefme_sql_delimiter.指令,嵌入在SQL块的开头。此指令后的单个字符将用于将SQL块拆分为SQL语句,然后将发送到数据库以进行执行。不te:在角色之前包含一个空格。

例如:

fme_sql_delimiter;从教师删除;从LastName ='Doe'和FirstName ='John'的人那里删除

Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.

在执行这些SQL语句期间发生的任何错误通常会终止读取器或写入器(取决于SQL语句的执行情况而错误。如果指定的语句先于连字符(“ - ”),则忽略此类错误。

写完后运行的SQL

该参数允许SQL sta的执行tements after a set of tables has been written. For example, it may be necessary to clean up a temporary view after creating it.

For detailed information about SQL functions, click the corresponding menu item in theSQL运行编辑器帮助关闭

Available menu options depend on the format.

Multiple SQL commands can be delimited by a character specified using thefme_sql_delimiter.指令,嵌入在SQL块的开头。此指令后的单个字符将用于将SQL块拆分为SQL语句,然后将发送到数据库以进行执行。不te:在角色之前包含一个空格。

例如:

fme_sql_delimiter;从教师删除;从LastName ='Doe'和FirstName ='John'的人那里删除

Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.

在执行这些SQL语句期间发生的任何错误通常会终止读取器或写入器(取决于SQL语句的执行情况而错误。如果指定的语句先于连字符(“ - ”),则忽略此类错误。

TagsMSSQL MSSQL_Spatial Azure SQL