User Level
Business Administrator
User LevelBusiness Administrator SyntaxAdd VaultUse the Add Vault command to define a vault. Syntax
File ClauseThis clause defines the map or parameters filename for foreign or external vaults respectively. The scott.map file is placed in the ENOVIA_INSTALL/api/mxff/ directory when the Studio Federation Toolkit is installed. The map file can be specified with the File clause. For example:
Vault TypesThere are three types of vaults: local, foreign and external. Most vaults are local. Foreign vaults are used with Adaplets™, which allow data from virtually any source to be modeled as objects. External vaults are used with external stores that contain data maintained by external servers. When defining a vault in MQL, you don’t need to specify which type it is and there is no clause that allows you to specify the type. To define a vault type, include the clauses for that vault type:
Tablespace ClauseThis clause is used to specify the data and index storage areas in which the data tables for an object vault are stored. The names of the tablespaces and their associated storage are defined by the database administrator (DBA). This must be done prior to defining vaults. If you do not specify a tablespace name, the default data tablespace is used. Consult the database administrator about which tablespace you should use. For SQL server, file groups are roughly the equivalent of the tablespaces used in other databases. For more information, see the Installation Guide. Indexspace ClauseThis clause is used to specify the Oracle tablespace in which the index and constraint information for an object vault is stored. The names of tablespaces and their associated storage are defined by the database administrator (DBA). This must be done prior to defining vaults. If you do not specify a tablespace name, the default index tablespace is used. pathvault, pathvaulttablespace, and pathvaultindexspace ClausesUse these clauses to define an optional
path vault. The The Use this syntax to define a path vault:
Path vaults are hidden; they do not show up when you use the
Interface ClauseThis clause is used to define the full path name of the library for a foreign vault. The Interface should be specified as ENOVIA_INSTALL/api/mxff/mxff, with no extension. The .dll or shared library file is then used to access the vault, depending on whether the client is a Windows or a UNIX client. This field cannot be modified once the vault has been created. If changes are required, the vault must be deleted and then recreated. Deleting foreign vaults deletes only the database tables associated with it. The data from the foreign federation is left intact. The interface can be used in more than one vault definition, but only by making a copy of it with a different name. For example, if the mxff interface is used to link a second database with 3DSpace (presumably with a different mapping), a copy of mxff should be created and renamed, and then referenced in the second foreign vault definition. Use of the same interface (of the same name) by more than one vault will cause problems when accessing business objects. Each Foreign vault must use a uniquely named interface. The mxff library can be copied and renamed for different vaults. Map ClauseThis clause is used to specify a string which defines the schema map for a foreign vault. The schema map indicates which metadata in the foreign data maps to what types of data in 3DSpace. It becomes part of the vault definition and is always referred to when accessing the data. The Map clause specifies the server, mode, and each table in the data source. For more information, see Adaplet Programming Guide: Mapping the Data. Param ClauseThis clause is used to specify a string of XML to define the parameters for an external vault. You can alternatively use the File clause to indicate a file that provides the XML parameters. Modify VaultAfter a vault is defined, you can change the definition with the Modify Vault command. This command lets you add or remove defining clauses and change the value of clause arguments:
Each modification clause is related to the clauses and arguments that define the vault. When modifying a vault, you first name the vault to change and then list the changes to make. For example, the following command assigns new name and description to the vault called The Cleveland Project.
Clear VaultWhile maintaining vaults and their associated databases and tables, the LXSIZE column in the LXFILE_* table for each new vault is defined as type FLOAT. SyntaxThe Clear Vault command is used to delete all business objects and associations in a vault:
Once a vault has been established and used, you should NOT use the Minorrevision ClauseInclude this clause before actually clearing the vault to have first remove the business objects in the named vault from revision chains of objects in other vaults. This involves modifying rows in the vaults lxBO table (marking rows that need to be cleaned up). Upon successful execution of this command, all revision chains that need adjustment prior to the clear vault command are fixed. Relation ClauseInclude this clause before actually clearing the vault to first disconnect business objects in the named vault from objects in other vaults. This involves modifying rows in the vaults lxRO table (marking rows that need to be cleaned up). Upon successful execution of this command, all connections to objects in other vaults are removed. Full ClauseInclude this clause before actually clearing the vault to have first perform both a “clear vault relationship” and a “clear vault revision.” Additionally all tables of the vault are dropped and recreated, cleaning up the marked rows. Size ClauseInclude this clause of the clear vault command to indicate a transaction size before the relation or revision changes are committed to the database. For example, to remove all connections to or from objects in other vaults and commit the changes 100 at a time use the following: clear vault MyVault relation size 100; When used without the Revision, Relation or Full clauses, the Size clause is ignored. Copy VaultThe Copy Vault command lets you copy the contents of a source vault to a destination vault.
Index VaultThe Index command should be used periodically, after modifications and deletions, to clean up the database indices. Syntax
Re-indexing vaults can improve find performance whether or not transaction boundaries have been used in the data loading process. If data is loaded from a sequentially sorted data file, the resulting index will be less than optimal. Re-indexing randomizes the index, making find performance noticeably better. Indexing a vault in this manner rebuilds the system indices that must be present for locating objects by name, type, and owner, as well as other SQL convertible fields. When you index an object vault, it also indexes any associated path vault. To show the SQL commands for a particular index vault command, without actually
changing the indices, use the
This is helpful to use on very large databases, where indexing a vault could take many hours. The validate output shows the SQL commands that need to be run. You could then manually run the commands in order, to make progress with minimal disruption. Table ClauseInclude this clause to indicate which database tables should be re-indexed. Only those columns that have indexing defined will be re-indexed. You should include up to and including the “_” in a table name, since what follows is specific to the vault specified. For example:
This command might generate and execute SQL similar to: alter index lxBO_abbe6b7a_lxOid_Index rebuild; alter index lxBO_abbe6b7a_lxName_Index rebuild; alter index lxBO_abbe6b7a_lxOwner_Index rebuild; alter index lxBO_abbe6b7a_lxPolicy_Index rebuild; The Engineering-1 vault is associated with the Indexspace ClauseUse this clause to specify an alternate database tablespace to use for processing this command. For example:
This SQL generated is as follows: alter index lxBO_abbe6b7a_lxOid_Index rebuild tablespace USER_DATA alter index lxBO_abbe6b7a_lxName_Index rebuild tablespace USER_DATA; alter index lxBO_abbe6b7a_lxOwner_Index rebuild tablespace USER_DATA; alter index lxBO_abbe6b7a_lxPolicy_Index rebuild tablespace USER_DATA; alter index lxBO_abbe6b7a_lxState_Index rebuild tablespace USER_DATA; This command adds indices to all columns of lxBO_ table (of the vault Engineering-1) that have indexing defined, and the command would use tablespace USER_DATA to hold the index data. You must also include the table clause with using the indexspace clause. Fixing Fragmented Vaults (Tidy Vault)As objects are deleted from a vault, storage gaps will occur in the
vault database file. These gaps represent wasted disk space and can cause an
increase in access time. MQL provides the Syntax
This command consolidates the fragmented database file. It deletes rows in the
database tables that are marked for deletion. You must run When you use the Updating Sets with Change VaultWhen an object’s vault is changed, by default the following occurs behind the scenes.
When a business object is deleted, it also gets removed from any sets to which it belongs. This includes both user-defined sets and sets defined internally. IconMail messages and the objects they contain are organized as members of an internal set. So when the object’s vault is changed, it is not only removed from its sets, but it is also removed from all IconMail messages that include it. In many cases the messages alone, without the objects, are meaningless. To address this issue, the change vault command includes the following additional functionality:
The additional functionality could affect the performance of the change vault operation if the object belongs to many sets and/or IconMails. The default functionality has not been changed, but business administrators can execute the following MQL command to enable/disable this functionality for system-wide use:
For example, to turn the command on for all users, use:
Once this command has been run, when users change an object’s vault through any application (that is, all products, 3DEXPERIENCE Platform), all IconMails that reference the object are fixed. You can also fix IconMail at the time the change vault is performed (in MQL only). For example:
Validate VaultThe Validate Vault command can be used to identify files in a vault that are not associated with any business object in the database. You must have System Administrator privileges to run the validate command.
Print VaultThe Print Vault command prints the vault definition to the screen allowing you to view it. When a Print command is entered, MQL displays the various clauses that make up the vault definition and their current values.
A print vault command lists only objects that have been updated (those objects for which there is a database table entry). You cannot directly print a path vault, but you can use a selectable to view that information. To do so, use this syntax: print vault OBJECTVAULTNAME select pathvault.suffix; Delete VaultIf a vault is no longer required, you can delete it with the Delete Vault command.
Only empty vaults can be deleted. To remove all objects from a vault, use
the This command searches the list of existing vaults. If the name is found and the vault contains no business objects, the vault is deleted. If the name is not found, an error message is displayed. If you attempt to delete a vault that contains business objects, an error message is displayed. For example, to delete the vault named “1965 Bank Loans,” enter:
After this command is processed, the vault is deleted and you receive an MQL prompt for another command. |