连接说明

where <server_type> is one of either 'sqlserver' or 'sybase' (their meaning is quite obvious), <port> is the port the database server is listening to (default is 1433 for SQL Server and 7100 for Sybase) and <database> is the database name -- JDBC term: catalog -- (if not specified, the user's default database is used). The set of properties supported by jTDS is:

appName (default - "jTDS")
Application name. No practical use, it's displayed by Enterprise Manager or Profiler associated with the connection.
batchSize (default - 0 for SQL Server; 1000 for Sybase)
Controls how many statements are sent to the server in a batch. The actual batch is broken up into pieces this large that are sent separately. The reason for this is to avoid Sybase "hangs" caused by running out of space with very large batches. The problem doesn't seem to occur with SQL Server, hence the default limit of 0 (unlimited) in this case.
bindAddress (default - determined by the Java implementation; requires Java 1.4 or later)
Specifies the local IP address to bind to for outgoing TCP/IP connections to the database. Useful for multi-homed systems (those with more than one external IP address) where the default IP address picked by Java will not connect to the database. Currently has no effect when using named pipes to connect to a database (see namedPipe). Since after jTDS-1.2.
bufferDir (default - System.getProperty("java.io.tmpdir"))
Controls the destination where data is buffered to disk.
See also bufferMaxMemory and bufferMinPackets.
bufferMaxMemory (default - 1024)
Controls the global buffer memory limit for all connections (in kilobytes). When the amount of buffered server response packets reaches this limit additional packets are buffered to disk; there is however one exception: each Statement gets to buffer at least <bufferMinPackets> to memory before this limit is enforced. This means that this limit can and will usually be exceeded.
Server responses are buffered to disk only when a request is made on a Statement while another Statement belonging to the same Connection still hasn't processed all its results. These situations can be avoided in most cases by setting the useCursors property, but this will also affect performance.
See also bufferMinPackets.
bufferMinPackets (default - 8)
Controls the minimum number of packets per statement to buffer to memory. Each Statement will buffer at least this many packets before being forced to use a temporary file if the <bufferMaxMemory> is reached, to ensure good performance even when one Statement caches a very large amount of data.
Server responses are buffered to disk only when a request is made on a Statement while another Statement belonging to the same Connection still hasn't processed all its results. These situations can be avoided in most cases by setting the useCursors property, but this will also affect performance.
See also bufferMaxMemory.
cacheMetaData (default - false)
When used with prepareSQL=3, setting this property to true will cause the driver to cache column meta data for SELECT statements. Caching the meta data will reduce the processing overhead when reusing statements that return small result sets that have many columns but may lead to unexpected errors if the database schema changes after the statement has been prepared. Use with care. Only applicable to SQL Server (there is no prepareSQL=3 mode for Sybase).
charset (default - the character set the server was installed with)
Very important setting, determines the byte value to character mapping for CHAR/VARCHAR/TEXT values. Applies for characters from the extended set (codes 128-255). For NCHAR/NVARCHAR/NTEXT values doesn't have any effect since these are stored using Unicode.
domain
Specifies the Windows domain to authenticate in. If present and the user name and password are provided, jTDS uses Windows (NTLM) authentication instead of the usual SQL Server authentication (i.e. the user and password provided are the domain user and password). This allows non-Windows clients to log in to servers which are only configured to accept Windoes authentication.
If the domain parameter is present but no user name and password are provided, jTDS uses its native Single-Sign-On library and logs in with the logged Windows user's credentials (for this to work one would obviously need to be on Windows, logged into a domain, and also have the SSO library installed -- consult README.SSO in the distribution on how to do this).
instance
Named instance to connect to. SQL Server can run multiple so-called "named instances" (i.e. different server instances, running on different TCP ports) on the same machine. When using Microsoft tools, selecting one of these instances is made by using "<host_name>\<instance_name>" instead of the usual "<host_name>". With jTDS you will have to split the two and use the instance name as a property.
lastUpdateCount (default - true)
If true only the last update count will be returned by executeUpdate(). This is useful in case you are updating or inserting into tables that have triggers (such as replicated tables); there's no way to make the difference between an update count returned by a trigger and the actual update count but the actual update count is always the last as the triggers execute first. If false all update counts are returned; use getMoreResults() to loop through them.
lobBuffer (default - 32768)
The amount of LOB data to buffer in memory before caching to disk. The value is in bytes for Blob data and chars for Clob data.
loginTimeout (default - 0 for TCP/IP connections or 20 for named pipe connections)
The amount of time to wait (in seconds) for a successful connection before timing out.
If a TCP/IP connection is used to connect to the database and Java 1.4 or newer is being used, the loginTimeout parameter is used to set the initial connection timeout when initially opening a new socket. A value of zero (the default) causes the connection to wait indefinitely, e.g.,until a connection is established or an error occurs. See also socketTimeout.
If a named pipe connection is used (namedPipe is true) and loginTimeout is greater than zero, the value of loginTimeout is used for the length of the retry period when "All pipe instances are busy" error messages are received while attempting to connect to the server. If loginTimeout is zero (the default), a value of 20 seconds is used for the named pipe retry period.
macAddress (default - "000000000000")
Network interface card MAC address. It's displayed by Enterprise Manager or Profiler associated with the connection and is needed to resolve some issues regarding the number of clients allowed by the SQL Server license. The MAC address cannot be determined automatically from Java (i.e. without using native code) so you'll have to specify it yourself if you need it.
maxStatements (default - 500)
The number of statement prepares each connection should cache. A value of 0 will disable statement caching. A value of Integer.MAX_VALUE (2147483647) will enable fast caching (uses less memory and has no overhead associated with removing statements); the cache will never release any cached statements, so although experience has shown that this is usually not a problem with most applications, use with care.
namedPipe (default - false)
When set to true, named pipe communication is used to connect to the database instead of TCP/IP sockets. When the os.name system property starts with "windows" (case-insensitive), named pipes (both local and remote) are accessed through the Windows filesystem by opening a RandomAccessFile to the path. When the SQL Server and the client are on the same machine, a named pipe will usually have better performance than TCP/IP sockets since the network layer is eliminated. Otherwise the JCIFS library is used. JCIFS provides a pure Java named pipe implementation and uses NTLM authentication, so the domain parameter is required.
This feature supports the instance parameter (which changes the named pipe URL), but it does not currently support the named pipe at a location other than /sql/query on the server. The port parameter is ignored if set.
packetSize (default - 4096 for TDS 7.0/8.0; 512 for TDS 4.2/5.0)
The network packet size (a multiple of 512).
password (required)
Password to use for login. When using getConnection(String url, String user, String password) it's not required to set this property as it is passed as parameter, but you will have to set it when using getConnection(String url, Properties info) or JtdsDataSource.
prepareSQL (default - 3 for SQL Server, 1 for Sybase)
This parameter specifies the mechanism used for Prepared Statements. Value Description
0 SQL is sent to the server each time without any preparation, literals are inserted in the SQL (slower)
1 Temporary stored procedures are created for each unique SQL statement and parameter combination (faster)
2 sp_executesql is used (fast)
3 sp_prepare and sp_cursorprepare are used in conjunction with sp_execute and sp_cursorexecute (faster, SQL Server only)

progName (default - "jTDS")
Client library name. No practical use, it's displayed by Enterprise Manager or Profiler associated with the connection.
processId (default - 123)
The client process ID associated with the connection. Must be an integer value or the string "compute" to let jTDS choose a process ID.
sendStringParametersAsUnicode (default - true)
Determines whether string parameters are sent to the SQL Server database in Unicode or in the default character encoding of the database. This seriously affects SQL Server 2000 performance since it does not automatically cast the types (as 7.0 does), meaning that if a index column is Unicode and the string is submitted using the default character encoding (or the other way around) SQLServer will perform an index scan instead of an index seek. For Sybase, determines if strings that cannot be encoded in the server's charset are sent as unicode strings. There is a performance hit for the encoding logic so set this option to false if unitext or univarchar data types are not in use or if charset is utf-8.
socketTimeout (default - 0)
The amount of time to wait (in seconds) for network activity before timing out.
Use with care! If a non zero value is supplied this must be greater than the maximum time that the server will take to answer any query. Once the timeout value is exceeded the network connection will be closed. This parameter may be useful for detecting dead network connections in a pooled environment. See also loginTimeout.
socketKeepAlive (default - false)
true to enable TCP/IP keep-alive messages
ssl (default - off)
Specifies if and how to use SSL for secure communication. Value Description
off SSL is not request or used; this is the default
request SSL is requested; if the server does not support it then a plain connection is used
require SSL is requested; if the server does not support it then an exception is thrown
authenticate Same as require except the server's certificate must be signed by a trusted CA

tcpNoDelay (default - true)
true to enable TCP_NODELAY on the socket; false to disable it.
TDS (default - "8.0" for SQL Server; "5.0" for Sybase)
The version of TDS to be used. TDS (Tabular Data Stream) is the protocol used by Microsoft SQL Server and Sybase to communicate with database clients. jTDS can use TDS 4.2, 5.0, 7.0 and 8.0. Version 4.2 is used by SQL Server 6.5 and Sybase 10. Version 5.0 is used with Sybase 11 onwards. Version 7.0 is used by SQL Server 7.0; this protocol also works with SQL Server 2000. Version 8.0 is used by SQL Server 2000 and SQL Server 2005.
Newer database server versions usually understand older protocol versions. This means that SQL Server 7.0 can be used with TDS 4.2, but the limitations of the protocol apply regardless of the server version (e.g. when using TDS 4.2 VARCHARs are limited to 255 characters). As a conclusion, you must set this property to "4.2" when connecting to SQL Server 6.5 or Sybase. You should not set this value to "7.0" or "8.0") when connecting to any version of Sybase as these are SQL Server specific protocols. Further, you should not set this value to "5.0") when connecting to any version of SQL Server as this is a Sybase specific protocol.
Currently jTDS automatically falls back from 8.0 to 7.0 (if used with SQL Server 7.0) and from 5.0 to 4.2 (with Sybase 10) so specifying the value for this parameter is only necessary for SQL Server 6.5.
useCursors (default - false)
Instructs jTDS to use server side cursors instead of direct selects (AKA firehose cursors) for forward-only read-only result sets (with other types of result sets server- or client-side cursors are always used).
With firehose cursors the SELECT query is sent and the server responds with all the resulting rows. This is the fastest approach but it means that the driver has to cache all results if another request needs to be made before all rows have been processed. So when using multiple Statements per Connection it is preferable to have server-side cursors instead; these will allow the driver to request only a limited number of rows at a time (controllable through the fetchSize property of a Statement). This means extra request-response cycles, but less caching by the driver.
With SQL Server a so called fast forward-only cursor will be created when this property is set to true. With Sybase a usual forward-only read-only cursor is created.
useJCIFS (default - false)
Controls whether the jCIFS library will be used instead of the local file system with named pipe connections on the Windows operating system. (The jCIFS library will always be used with named pipes when the operating system is not Windows.) Useful when connecting via named pipes to a server that is located in a different domain than the client. See also namedPipe. Since after jTDS-1.2.
useLOBs (default - true)
Controls whether large types (IMAGE and TEXT/NTEXT) should be mapped by default (when using getObject()) to LOBs or Java types (String and byte[]). The default JDBC type constant returned is also controlled by this property: Types.BLOB for IMAGE and Types.CLOB for TEXT/NTEXT when true, Types.LONGVARBINARY for IMAGE and Types.LONGVARCHAR for TEXT/NTEXT when false.
This is useful when printing out directly the values returned by getObject() (e.g. when using JSTL or other frameworks), as Blob and Clob don't implement toString() (both because it's not required and because it can easily lead to OutOfMemoryErrors in unexpected situations, such as when logging data). The default setting of true has the advantage that the amount of data that is cached in memory for a large object can be controlled via the lobBuffer property; a setting of false will still use the Blob and Clob implementations internally but the values will be materialized to memory when getObject() is called, possibly leading to memory issues.
useNTLMv2 (default - false)
Set to true to send LMv2/NTLMv2 responses when using Windows authentication
user (required)
User name to use for login. When using getConnection(String url, String user, String password) it's not required to set this property as it is passed as parameter, but you will have to set it when using getConnection(String url, Properties info) or JtdsDataSource.
wsid (default - the client host name)
Workstation ID. No practical use, it's displayed by Enterprise Manager or Profiler associated with the connection.
xaEmulation (default - true)
When set to true, emulate XA distributed transaction support, when set to false use experimental true distributed transaction support. True distributed transaction support is only available for SQL Server 2000 and requires the installation of an external stored procedure in the target server (see the README.XA file in the distribution for details).
Properties can be passed to jTDS in one of three ways: in the URL, in the Properties object passed to getConnection() or by using the JtdsDataSource's setters (if connections are obtained through a DataSource rather than using the DriverManager). Because there is no URL when using the JtdsDataSource there are three other properties (with setters and getters) to take the place of those items that are part of the URL's syntax: serverName, portNumber and databaseName (their meaning should be quite clear).
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 一、Fanuc连接说明书的功能主要包括以下几个方面: 1. 提供设备和配件的基本信息:Fanuc连接说明书中会详细介绍设备和配件的基本信息,包括型号、规格、技术参数等,帮助用户了解设备和配件的性能和特点。 2. 提供安装和调试指导:Fanuc连接说明书中提供了设备和配件的安装和调试指导,包括安装位置、安装方法、调试步骤等,帮助用户正确地安装和调试设备。 3. 提供操作和维护指南:Fanuc连接说明书中提供了设备和配件的操作和维护指南,包括操作步骤、常见故障排除方法等,帮助用户正确操作设备和进行日常维护。 4. 提供故障诊断和维修指导:Fanuc连接说明书中提供了设备和配件的故障诊断和维修指导,包括故障现象、故障原因、故障排除方法等,帮助用户分析和解决设备故障。 5. 提供安全注意事项:Fanuc连接说明书中会提供设备和配件的安全注意事项,包括安全操作规程、防护措施等,帮助用户正确使用设备,预防意外事故的发生。 总之,Fanuc连接说明书的功能是提供设备和配件的基本信息、安装和调试指导、操作和维护指南、故障诊断和维修指导以及安全注意事项,以便用户正确使用和维护设备,提高生产效率和安全性。 ### 回答2: Fanuc连接说明书是指Fanuc数控系统的连接使用说明书。Fanuc数控系统是一种广泛应用于机械加工领域的数控设备,而连接说明书则是为了帮助用户正确连接和使用该设备而编写的。Fanuc连接说明书主要包含以下几个方面的功能: 1. 连接步骤:说明书中会详细介绍如何将Fanuc数控系统与其他设备(如电脑、编程器等)进行正确连接。通过详细的步骤和图示,用户能够迅速了解正确的连接方法和顺序。 2. 连接方式:Fanuc连接说明书会针对不同的连接方式提供详细说明,如串行连接、以太网连接等。对于不同的情况,用户可以根据说明书选择最合适的连接方式。 3. 连接参数设置:Fanuc连接说明书会介绍在连接过程中需要设置的参数,如IP地址、端口号等。这些参数的正确设置对于设备能够正常通信和工作至关重要,说明书会提供清晰的指导让用户能够正确设置这些参数。 4. 故障排除:在连接过程中,可能会出现各种故障,如连接失败、通信中断等。Fanuc连接说明书会提供解决这些问题的方法和技巧,以帮助用户快速排除故障,并确保设备正常连接和工作。 总之,Fanuc连接说明书通过提供正确的连接方法、连接方式、参数设置和故障排除等功能,帮助用户正确连接和使用Fanuc数控系统,确保设备能够正常运行。这对于机械加工行业的生产效率和产品质量有着重要的影响。 ### 回答3: Fanuc连接说明书是一种技术文档,旨在提供Fanuc机器人和相关设备的连接指南。它包含了关于连接的详细信息,例如引脚配置、电缆布线、通信协议以及所需的硬件设备。连接说明书的主要功能如下: 1. 提供连接配置指南:Fanuc连接说明书详细介绍了不同设备之间的连接方式和配置要求。它列出了每个设备的引脚配置和相应的连接方法,帮助用户正确地安装和连接设备,确保连接的稳定性和可靠性。 2. 解释通信协议:连接说明书提供了关于通信协议的解释和指导。它说明了Fanuc系统与其他设备之间进行通信所使用的协议类型和必要的设置。通过了解通信协议,用户可以根据自身需求进行设备之间的数据交换和控制。 3. 指导电缆布线:电缆布线是确保连接正常工作的关键,连接说明书提供了布线指导和建议。它描述了电缆的选择、引导皮套、接地要求和电缆长度的限制等方面的要求,使用户能够进行正确的电缆布线,以减少电磁干扰和保护线缆。 4. 提供故障排除方法:连接说明书还包含了针对连接问题的故障排除方法。当连接出现故障或不稳定时,用户可以根据说明书的指导,找到可能的故障原因并采取相应的解决措施,以恢复连接的正常工作。 总之,Fanuc连接说明书的功能是为用户提供关于连接设备的详细指导,确保各设备之间的连接稳定和可靠,并提供故障排除方法解决连接问题。这有助于用户更好地理解和操作Fanuc机器人和相关设备,提高工作效率和生产质量。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值