SQL Server Foundation SQL view encryption, permanently hides the text of the view definition

Source: Internet
Author: User

SQL can encrypt the view. That is, you can permanently hide the text of a view definition.

Note This action is not reversible. After you encrypt the view, you cannot modify it again because the view definition is no longer visible. If you need to modify the encrypted view, you must delete it and recreate the other view.

Example code:

Create ViewUserft asSelectusers.userid,users.username,users.ftnum,ft. Subject,ft. Content fromUsersInner JoinFt onUsers.userid=Ft.useridGoAlter ViewUserft withEncryption--Encrypt a view asSelectusers.userid,users.username,users.ftnum,ft. Subject,ft. Content fromUsersInner JoinFt onUsers.userid=Ft.useridGo--Delete TriggerDrop ViewUserft

Enterprise Manager Encryption View

      1. In Server Explorer, ensure that the data Connections node is expanded, and that the node for the specific connection is expanded.
      2. Expand the Views node, right-click the target view, and choose Design View from the shortcut menu.
      3. Right-click the background of the Diagram pane and select Property Pages from the shortcut menu.
      4. Select Encrypt view, and then click Close. V

SQL Server Foundation SQL view encryption, permanently hides the text of the view definition

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.