SQL Server and Oracle CREATE view users

Source: Internet
Author: User

In the development of data integration, it is often necessary to create views for each other so that they can view some of the necessary data. Create a user in the database and assign permissions to the user to query the view

First, SQL Server

--Create Login user account
Use [Master]gocreate LOGIN [Kyst] with password=n ' xxx ', default_database=[rdsyscasv121003], Check_expiration=off, Check_policy=on

--Create database user use [rdsyscasv121003]gocreate user [Kyst] for LOGIN [Kyst];

--Assigning permissions
Grant SELECT on View_hr to Kyst with GRANT OPTION;

SQL Server can refer to: http://www.cnblogs.com/xwdreamer/archive/2012/06/25/2562828.html

Second, Oracle

--1, creating a view with a user with DBA authority create user Kyst identified by 123456 account Unlock;grant Connect to  kyst;grant Create any view To Kyst;--2, a user with DBA authority to create a view and assign permissions to the "create" or replace view Share_hras (SELECT  ID idfrom s_hr); GRANT Select on share_hr to Kyst  with Grant Option;--3, Kyst user's role creates a view create or replace view  Share_unit as   sel ECT * from  RDSYSCASV121003. SHARE_HR;

  

 

SQL Server and Oracle CREATE view users

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.