Navigation:  Advantage SQL > System Procedures > Procedures >


Advantage SQL Engine

Previous pageReturn to chapter overviewNext page

Moves the physical file or files associated with a dictionary object.








Options,Integer )



ObjectType (I)

Object type of the object to move. Only ADS_DD_TABLE_OBJECT and ADS_DD_INDEX_FILE_OBJECT are supported at this time.

ObjectName (I)

Name of the object to move.

NewFilePath (I)

Fully qualified path to move the object file(s) to.

IndexFiles (I)

List of index files to move with a table file. Only used with table objects.

Parent (I)

Name of parent object. Name of Only used with index file objects.

Options (I)

Must be zero. Reserved for future use.


sp_MoveDDObjectFile can be used to move a database object's file or associated files to a new location on the server. If ObjectType is 1 (ADS_DD_TABLE_OBJECT), ObjectName must be the database object name of a table. To move a table's index files along with the table, IndexFiles must contain a semicolon-delimited list of the index file's database object names (filename plus extension).

If ObjectType is 3 (ADS_DD_INDEX_FILE_OBJECT), ObjectName must be the database object name of an index file (filename plus extension). IndexFiles will be ignored, but the Parent must be the database object name of the index file's table.

Note The destination directory specified by NewFilePath must exist prior to calling sp_MoveDDObjectFile.


Note ALTER TABLE permissions are required to move a table or a table's index file.


Note This function can be called inside a transaction, but will not be part of the transaction. Any changes it makes cannot be rolled back.


EXECUTE PROCEDURE sp_MoveDDObjectFile( 1 /* ADS_DD_TABLE_OBJECT */, 'customers', '\\adsserver\data\newdirectory', 'business_ID.adi;business_name.adi', NULL, 0 )

EXECUTE PROCEDURE sp_MoveDDObjectFile( 3 /* ADS_DD_INDEX_FILE_OBJECT */, 'business_ID.adi', '\\adsserver\data\newdirectory', NULL, 'customers', 0 )

See Also