mount

Attaches a database to a destination or secondary SAP ASE server.

mount decodes the information in the manifest file and makes the set of databases available. mount differs from other copying procedures such as the bcp bulk copy utility in that all required supporting activities are executed, including adding database devices, if necessary, and activating them, creating the catalog entries for the new databases, and recovering them.

If you are using different device names at the destination SAP ASE server when mounting the databases, use mount with listonly and modify the device path names at the destination server, then use mount to actually mount the databases.

Note: For every login that is allowed access to a database on the original SAP ASE server, it is more convenient to have a corresponding login for the same suid at the destination SAP ASE server, to avoid user ID reconciliation issues.

For permissions to remain unchanged, the login maps at the destination SAP ASE server must be identical to that on the source SAP ASE server. For more information on login maps, see Managing Remote Servers in System Administration Guide, Volume 1.

Syntax

mount database all | database_mapping[, database_mapping, ...]
	from "manifest_file" 
	[using device_mapping [, device_mapping...] 
		[with listonly]
	database_mapping:
			origdbname as newdbname
		|	newdbname = origdbname
		|	origdbname
		|	newdbname
	device_mapping
			logical_device_name as new_physical_name
		|	new_physical_name = logical_device_name
		|	original_physical_name
		|	new_physical_name

Parameters

Examples

Usage

  • The using clause allows you to define a mapping via the “=” sign or the “as” clause.

  • If there are more than one device, a mapping can be one using “=” and another using “as.”

  • You can map devices by name in both databases and devices, specifying both logical and physical, and by order. If a database is mapped by name, all databases must be mapped by name and vice versa. The same happens for devices.

  • You cannot mount a subset of a transported set of databases at the destination SAP ASE server; all databases and their devices in the manifest file must be mounted together.

  • When executing the mount command at the destination SAP ASE server:
    • The page size in the destination SAP ASE server must be equal to the page size in the source SAP ASE server.

    • There must be enough devices configured at the destination SAP ASE server to successfully add all the devices belonging to the mounted databases.

    • If the logical device you are mounting from the source SAP ASE server has the same name as the logical device on the destination SAP ASE server, these devices are automatically renamed unless you include an alias with the mount command.

      If the physical device name already exists on the destination SAP ASE server, you must rename the physical device name on the source SAP ASE server at the operating system level and provide the new physical device name with the mount command.

    • The log version must be the same in the source and destination SAP ASE servers.

    • You cannot mount a database from an SAP ASE server with a higher major version number. For example, you cannot mount a 15.0 version database on a 12.5.x version of SAP ASE.

    • The platforms of the source and destination SAP ASE servers must be the same.

    • Differences in the sort order or character set are resolved by rules followed by load database. A database with a different character set can be mounted only if the sort order is binary.

mount database and unmount database are supported in the Cluster Edition. If an instance fails while one of these commands is in progress, the command may abort. In this case, the user must reissue mount database or unmount database when the instance failover recovery is complete.

Once databases are mounted on the destination SAP ASE server, certain settings are cleared on the mounted database:
  • Replication is turned off.

  • Audit settings are cleared and turned off.

  • CIS options, default remote location, and type are cleared.

  • Cache bindings are dropped for both the mounted databases and their objects.

  • Recovery order is dropped for the mounted databases and becomes the default dbid order.

System considerations:
  • You cannot use the mount command in a transaction.

  • You cannot mount a database on server configured for high availability.

When you mount databases onto an SAP ASE server, if you change the dbid of the database you are mounting, all procedures are marked for recompilation in the database. This increases the time it takes to recover the database at the destination, and delays the first execution of the procedure.

For renaming devices, the manifest file contains the device paths known to the source SAP ASE server that created the manifest file. If the destination SAP ASE server accesses the devices with a different path, you can specify the new path to the mount command.
  1. Use the mount command with listonly to display the old path:

    mount database all from "/work2/Mpubs_file" with listonly
    go
    [database]
      mydb
    [device]
      "/work2/Devices/pubsdat.dat" = "pubs2dat"
  2. If the new path for the device pubs2dat is /work2/Devices/pubsdevice.dat (the devices path in Windows), specify the new device in the mount command:
    mount database all from "/work2/Mpubs_file" using 
       "/work2/datadevices/pubsdevice.dat" = "pubs2dat"

    If the logical device names exist in the destination server, they are renamed using an automatically generated unique name.

See also Database Mount and Unmount in System Administration Guide: Volume 2.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

The permission checks for mount differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with mount any database privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role or oper_role.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

101

Audit option

mount

Command or access audited

mount database

Information in extrainfo
  • Roles – current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

  • Proxy information – original login name, if a set proxy is in effect

Related reference
unmount
quiesce database