Creating a Proxy Table

A proxy table is a locally named alias, displayed as a table, that points to a remote object such as an entire table, a view, a materialized view, or a set of remote table columns. Before you can map remote objects to a local proxy table, you must define the remote server where the remote object is located.

Prerequisites
Database Version Table Privileges
SAP Sybase IQ 15.3 and 15.4 Proxy table to be owned by self – you must have RESOURCE authority with CREATE permission on the main store dbspace in which the table is created.

Proxy table to be owned by any user – you must have DBA authority.

SAP Sybase IQ 16.0

Proxy table to be owned by self – you must have CREATE PROXY TABLE system privilege.

Proxy table to be owned by any user – you must have one of:
  • CREATE ANY TABLE system privilege
  • CREATE ANY OBJECT system privilege
Task

You can use a proxy table to access any object (including tables, views, and materialized views) that the remote database exports as a candidate for a proxy table. Location transparency of remote data is enabled by creating a local proxy table that maps to the remote object.

  1. In the Perspective Resources view, select the resource, and select Resource > Administration Console.
  2. In the left pane, expand IQ Servers > Schema Objects > Tables, and then select Proxy Tables.
  3. Click the arrow next to Proxy Tables and select New.
    The Create Proxy Table wizard appears.
  4. On the Server and User page, specify
    Option Description
    Select a resource for which the proxy table will be created From the list, select the resource for which the proxy table will be created.
    To which remote server do you want to create the proxy table? From the list, select the remote server.
    Which user will own the proxy table? From the list, select the user to own the table. Default is dba user.
    (Optional) Remote database name Specify the name of the remote database associated with the remote server.
    Note: You specify a remote database on which your remote login has system privileges.
  5. Click Next.
  6. On the Table Selection page, specify:
    Option Description
    Which table do you want to use for this proxy table? From the list, select the object on the remote server (table / view / materialized view) that will be used as the target of the local proxy.
    What do you want to name the new proxy table. Enter a unique name for the new proxy table. You cannot create two tables with the same name under the same user ID. The default name of the proxy table is the name of the object on the remote server. However, this may not be a unique name to your user ID.
  7. Click Next.
  8. On the Column Selection page, select the columns to be used in the proxy table. Default is to use all columns. Click Next.
  9. On the Comments page, add a descriptive comment for the proxy table. Comments help you organize the database.
  10. Click Finish.
Next
Before using a new proxy table on a multiplex secondary server, disconnect and reconnect to the server.
Related concepts
Table Columns
Table Permissions
Table Constraints
Table Indexes
Table Triggers
Table Partitions
Related tasks
Creating a Table with No Partitions in the IQ Main Store
Creating a Table with No Partitions in the IQ (Catalog) System Store
Creating a Table with a Hash Partition
Creating a Table with a Range Partition
Creating a Table with a Hash-Range Partition
Creating a Global Temporary Table
Viewing Table Data in the Execute SQL Window
Deleting a Table
Generating Table DDL Commands
Moving a Table to Another Dbspace
Validating a System Store Table
Setting the Primary Key
Setting a Clustered Index
Merging Table Data from RLV Store with IQ Main Store
Calculating the Number of Rows in a Table
Moving Table Objects to Another Dbspace
Enabling or Disabling Row-Level Versioning in a Table
Viewing or Modifying Base Table Properties
Viewing or Modifying Global Temporary Table Properties
Viewing and Modifying Proxy Table Properties
Authenticating a Login Account for a Managed Resource
Related reference
Table Privilege Summary