You can hide a materialized view definition from users, which obfuscates the view definition stored in the database. This setting is irreversible.
You must be the owner of the materialized view or have one of the following system privileges:
Context and remarks
When a materialized view is hidden, debugging using the debugger does not show the view definition, nor is the definition available through procedure profiling. The view can still be unloaded and reloaded into other databases.
Hiding a materialized view is irreversible and only possible using SQL.
Connect to the database.
Execute an ALTER MATERIALIZED VIEW...SET HIDDEN statement.
The following statements create a materialized view, EmployeeConfid3, refresh it, and then obfuscate its view definition.
CREATE MATERIALIZED VIEW EmployeeConfid3 AS SELECT EmployeeID, Employees.DepartmentID, SocialSecurityNumber, Salary, ManagerID, Departments.DepartmentName, Departments.DepartmentHeadID FROM Employees, Departments WHERE Employees.DepartmentID=Departments.DepartmentID; REFRESH MATERIALIZED VIEW EmployeeConfid3; ALTER MATERIALIZED VIEW EmployeeConfid3 SET HIDDEN;
When you are done running the following example, you should drop the materialized view you created. Otherwise, you will not be able to make schema changes to its underlying tables, Employees and Departments, when trying out other examples.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|