How to grant access to view linked in another DB

Hello,
I have two DBs. "DatabaseA" and "DatabaseB". I have table "tableA" in databaseA and I have created view in "ViewB" which contains simple SQL query "select * from DatabaseA.dbo.tableA".
Rigth now I want to get user access to view "viewB" without possibility to see original databaseA tableA

Rigth now I want to get user access to view "viewB" without possibility to see original databaseA tableA
If you really have to stick to views, one option is to enable
database-ownership-chains between those 2 databases.
Be careful to only enable those 2 databases via
ALTER DATABASE [DB1]
SET DB_CHAINING ON
ALTER DATABASE [DB2]
SET DB_CHAINING ON
Then they have to be owned by the same Server Principal/Login (preferably
not a sysadmin, but that's yet another discussion)
You can read more about such ownership-chains here:
http://technet.microsoft.com/en-us/library/ms188676%28v=sql.105%29.aspx
You then have to be very careful with ALL Objects in Database 1 and 2 - because the chain will work for all of them - as long as they share a common owner. You would have to make sure that only that table (schema) is owned by the same owner.
And if DDL-permissions come into play, this becomes almost impossible to secure..
So If you do not fully understand the risks involved by this, I would advise against such a setup and refer to other options.
One better option even with Views:
Even with views you can select from a function. And functions can be signed with a certificate.
So a much more secure option is to go for Certificate Mapped Logins, working for only specific objects that you sign.
http://msdn.microsoft.com/en-us/library/ms173463.aspx
I can't find a complete article on that this moment, but I'm sure you can find it.
Andreas Wolter
Microsoft Certified Master SQL Server 2008
Microsoft Certified Solutions Master SQL Data Platform, SQL Server 2012
Blog: www.insidesql.org/blogs/andreaswolter
Web: www.andreas-wolter.com |
www.SarpedonQualityLab.com

Similar Messages

  • My ipod touch has a huge collection of music that I don't want to lose or replace but my computer has now crashed beyond recovery. How can I access my itunes account from another computer or transfer my playlists to another computer from my ipod?

    My ipod touch has a huge collection of music that I don't want to lose or replace but my computer has now crashed beyond recovery. How can I access my itunes account from another computer or transfer my playlists to another computer from my ipod?

    You can transfer iTunes purchases to your "new" computer by
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    You can transfer other stuff by:
    Best iPod to PC
    How to transfer or sync files from iPod to PC - Windows mac iPhone iPod software reviews - Software Wiki

  • How can i access two view in a method

    hi i have a situation where i have to access two view in one method how can i do that am in jdeveloper 11.1.2.1.0
    Edited by: Tshifhiwa on 2012/07/03 4:33 PM

    Hi ,
    ViewObject svo = this.findViewObject("AGR1");
                        ViewObject svo1 = this.findViewObject("AFUN");
                        svo.executeQuery();
                        svo1.executeQuery();
                        Row row = svo.first();
                        Row row1= svo1.first();This is correct .But can you let us know where you are getting java null pointer exception.Moreover again can you check the VO name which you are looking here is available in AM or not.and also check the AM object as well .It should not be null
    Thanks
    Prateek

  • How to grant access to sharepoint for the user from different Domain

    Hi All
        I need to grant access to user from different domain. 
        Where I can able to view the users in people picker (different domain).
    Thanks in Advance.
    Raj

     Hi
    Trevor Seward
    Sorry to disturb
    you again.
      I am trying to restrict user from search from other domain, say we have domain A and Domain B, where I am trying to restrict all the user from domain B (Search users)for a site collection. I have found couple of stsadmin command to do so. but none
    of them works. Below are the commands I have tried
    STSADM.exe -o setproperty -pn peoplepicker-searchadforests -pv "domain:<Name>.domain" -url "http://Site URL"
    stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv “(canonicalName=<Name>.domain*)” -url "Site URL"
    we have two way trust.
    Can you suggest any solution.
    Thanks 
    Raj

  • Grant Access on View

    Hi,
    I would like to know the appropriate and easy way of granting access (SELECT,INSERT,UPDATE..Etc) on newly created object (VIEWS/SYNONYMS) to all users at one go.
    I have created a public synonym so that I can grant the access on synonym.
    Appreciate any suggestions.
    Thanks

    You will need a script or package to do this.
    e.g something like :-
    spool grant_select_to_all.sql
    select 'grant select on '||object_name||' to select_role;'
    from user_objects where object_type in('VIEW','TABLE');
    spool off;
    @grant_select_to_all.sql

  • How fast is findByKey and View Links

    Hello,
    I'm developing an application in which I'll have two very populated View Objects (one with ~1000 and other with ~13000). My code will pick up one row in the first view object and it will search the related rows in the second view object.
    I have some questions about this operation:
    1. Should I implement it by calling findByKey in the second View Object or View Links between them?
    2. How fast is findBykey? O(n) or something better? And about the View Link, does it execute a SQL query or does it solve by comparison between Java objects?
    Thanks,
    Eduardo

    This reply from the community seems to say yes:
    Ethernet = 1 Gbps
    Wireless G, Wireless N (2.4 GHz) = 130 Mbps
    Wireless N (5 GHz) = 300 Mbps
    Wireless "g" is 54 Mbps, not 130 Mbps
    This article from Gizmodo seems to say no:
    http://gizmodo.com/5921456/apple-airport-express-2012-lightning-review-probably- the-best-router-ever
    The article never even mentioned what type of download speed or plan was used, so the numbers are meaningless.
    The AirPort Express has a 100 Mbps Ethernet WAN port, which would connect to a modem. Your download speed will depend on the Internet service plan that you have with your provider.
    If you really do have a 100 Mbps download plan with your provider, you could probably expect about 85 Mbps because some speed is always lost in the  routing process.
    What is the speed of your plan with your ISP?

  • How can I access an iPhoto library from another account?

    We have 2 user accounts on my iMac.  How can I access another user's iPhoto library when I am logged in?

    move the iPhoto library to a shared folder on your Mac.

  • How can I access a web link using forms

    Hi,
    I need to access a Application using a link provided. I need to pass the parameter like userid, password and connection string to that link.
    How can I achieve this in forms????
    I use forms 11.1.1.4 and Window 7 and IE 8
    Thanks,
    maddy
    Edited by: maddy on 27-Nov-2012 21:19

    WEB.SHOW_DOCUMENT ('http://www.oracle.com','_blank');The url can be generated dynamically from your code by replacing it with variables.
    WEB.SHOW_DOCUMENT ('http://myServer/someApp?' || myParameter || '=' || myParamaterValue,'_blank');

  • How to grant access to?????

    User needs read access to triggers, procedures, function and MV's on all schema.
    Which system privileges I have to grant?

    If we're limiting ourselves to SQL*Plus, then access to the appropriate DBA_ tables, like DBA_SOURCE, should be sufficient. I assume that Amiel made a typo when he referred to the ALL_ tables-- every user has access to the ALL_SOURCE table by default, the rows that are returned from that view depend on the privileges the user has to execute that particular piece of code. The DBA_SOURCE table, on the other hand, has the source for all the PL/SQL in the database, so users with access to DBA_SOURCE can see the source code for any procedure/ package/ function in the database.
    SCOTT @ jcave102 Local> conn / as sysdba
    Connected.
    SYS @ jcave102 Local> create user sam identified by sam;
    User created.
    Elapsed: 00:00:00.29
    SYS @ jcave102 Local> grant create session to sam;
    Grant succeeded.
    Elapsed: 00:00:00.06
    SYS @ jcave102 Local> grant select on sys.dba_source to sam;
    Grant succeeded.
    Elapsed: 00:00:00.18
    SYS @ jcave102 Local> conn sam/sam
    Connected.
    SAM @ jcave102  > ed
    Wrote file afiedt.buf
      1  select text
      2  from dba_source
      3  where owner = 'SCOTT'
      4  and name = 'GET_NUM_TBL'
      5* order by line
    SAM @ jcave102  > /
    TEXT
    function get_num_tbl
      return num_tbl
    is
      l_nums num_tbl;
    begin
      l_nums := num_tbl();
      l_nums.extend;
      l_nums(1) := 1;
      return l_nums;
    end;
    10 rows selected.
    Elapsed: 00:00:00.06Justin

  • IPhone 2.2: How does one access street view?

    At my old age maybe I am just losing it. Can't figure out how to access the street view in Maps after updating to 2.2. I see no obvious option to go to that view from the Maps app. Help!
    Ken

    Drop a pin on a map where street view is available. Note that street view is not available everywhere so try a major metropolitan area first or your own neighborhood if in fact you know street view is available there.
    Tap the pin and you will see an icon on the left of the blue information window. Again, if street view is not available the icon will not be active (bright) it will be dimmed.
    Tap that icon. You should now see street view.
    Use swiping motions to change camera view or tap the arrow to move down the street.
    Tap the map icon to return to the map.

  • How to grant access to all workbooks to a particular responsibility?

    Hi,
    I am new to Discoverer. i have installed OAS 10.1.2.3 and I have done EUL_SET up on my E-Business Suite R12 and now 'SYSADMIN' owns all the workbook under "System Administrator" responsibility. Now users want to see all workbooks.
    I need to provide access. how can I do that?
    Ram

    Hi,
    You need to connect as SYSADMIN using Discoverer Desktop or Plus. (You may need to grant more privileges to SYSADMIN to do this). Then under workbook management go to workbook sharing and select the user -> workbook tab. You will then be able to select the responsibility and share some or all of your workborks with that responsibility.
    Rod West

  • How to restrict access to views for some users in the app?

    Hi SDN!
    I have an WD application wich embedded in the portal. Appication has 2 iViews (and 2  pages respectively). These iViews consist several views connected with each other (e.g. one view provide list data, second view is add/edit form for this data). I need to restrict access for some users for view with add/edit form. I can't make separate page for this view.
    What I've done:
    1) create yet another UIContainer for this view in main window and embed view to this container. It was be done for create separate iView for form.
    2) in the portal I create iView for this form but don't embedd in any page.
    When I try to call my form from list data (that is one iView from another) I get exception:
    <b>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: duplicate usage of view .MyCarRentalAddCity</b>
    Is there a way to get needed functional?
    Thanks,
    Lev

    Hi,
    do you need to remove the IView from the portal menu or do you just want to make a View container in your WD application invisible if the user doesn't have the rights to see it.
    If so, you could create your own roles on the app server:
    You need to create a new class that extends NamePermission like:
    import com.sap.security.api.permissions.NamePermission;
    public class ApplicationAccessPermission extends NamePermission {
               * @param name
              public ApplicationAccessPermission(String name) {
                   super(name);
               * @param name
               * @param action
              public ApplicationAccessPermission(String name, String action) {
                   super(name, action);
    Also, you have to create an Action.XML file that looks like this:
    <BUSINESSSERVICE
         NAME="com.vendor.administration">
         <DESCRIPTION
              LOCALE="en"
              VALUE="actions view usage"/>
         <ACTION
              NAME="View Permission">
              <DESCRIPTION
                   LOCALE="en"
                   VALUE="Show view"
                   />
              <PERMISSION
                   CLASS="com.vendor.utilities.ApplicationAccessPermission"
                   NAME="ShowView"
                   />
         </ACTION>
    </BUSINESSSERVICE>
    If you have created these to files in your packages, you can access this function like:
    IUser user ;
    try {
              user = WDClientUser.getCurrentUser().getSAPUser();
              if(user.hasPermission(new ApplicationAccessPermission("Show view"))){
                   wdContext.currentV_UIElement().setViewVisibility(WDVisibility.VISIBLE);
              }else{
                   wdContext.currentV_UIElement().setViewVisibility(WDVisibility.NONE);
         }catch (WDUMException e1) {
              wdContext.currentV_UIElement().setViewVisibility(WDVisibility.NONE);
                    e1.printStacktrace();
    You have to bind the ViewVisibility attribute of the context to the View Container you want to hide.
    The applicationAccessPermission you defined in the XML File will be visible in the UME Manager of you J2EE engine. With this action you can create a new role and group that you can map to the users that should see you view.
    But, the exception you get is because you have embedded one view twice, which is not possible.
    Hope this helps.
    Regards,
    Dennis

  • How can I access/identify the linked subreport parameter fields?

    In my report, I have subreports, which have linked SQL parameters.  How can I identify these linked parameters, and what they are linked to in code?
    Thanks.

    reportClientDoc.SubreportController.GetSubreportLinks("<subreport name>").GetSubreportLinks()<i>.MainReportFieldName and
    reportClientDoc.SubreportController.GetSubreportLinks("<subreport name>").GetSubreportLinks()<i>.SubreportFieldName
    Where i is the ith linked parameter and is indexed from 1.
    Hope this helps.
    Thanks
    Aasavari
    Edited by: Aasavari Bhave on Feb 15, 2011 11:05 AM

  • How to grant access to a Oracle Report  Program

    Hi hussein,
    I am checking/debugging our clients registered customized report program setup.
    I want to grant the program to my ID so I can test print and see its output.
    The steps I followed are the ff:
    A.
    System Administrator resp: Concurrent Program > Executable :
    Executable : CEC2CREC
    Application : ABC Customizations
    Execution Method : Oracle Reports
    Execution File Name: CEC2CREC
    B.
    System Administrator resp: Concurrent Program > Define :
    Program : Bank Reconciliation Report ( 2 Column )
    Short Name : CEC2CREC
    Application : ABC Customizations
    Executsble Method : Oracle Reports
    Executable Name : CEC2CREC
    I want to grant this program "Bank Reconciliation Report ( 2 Column )" to my USERID.
    I followed these steps:
    - Login to System Administrator responsibility
    - Navigate to Security > Responsibility > Define
    - Query the "ABC Customization" responsibility
    But I can not find any "ABC Customization" responsibility
    Is there other way to test run the program?
    Thanks a lot
    Edited by: yxes2009 on Sep 14, 2009 3:23 AM

    Hi,
    System Administrator resp: Concurrent Program > Executable :
    Executable : CEC2CRECApplication : ABC Customizations
    But I can not find any "ABC Customization" responsibility According to the above, "ABC Customizations" is an executable file (concurrent program) and not a responsibility. From (Security > Responsibility > Define), query the responsibility which is assigned to the user, and check the "Request Group" which is attached to this responsibility, then navigate to (Security > Responsibility > Request) and add "ABC Customization" request to the request group.
    Regards,
    Hussein

  • How to provide access to login oem to another user except sysman?

    Hi,
    i have installed OracleGrid 10.2.0.3 in windows 2003 server and configuared 10 servers and 15 databases in oem. i created one user in oem repository database. that user should access only two databases through oem. how configuare this?
    Thanks,

    You should not create a super administrator to meet your requirement. So, uncheck the 'super administrator' and choose only the targets which you need to provide access. Follow all the six steps of user creation. You can also provide a full access or just view only.

Maybe you are looking for

  • Character set AL32UTF8;

    Hello All, I have oracle 10gr2 and i want to get support of Portuguese character set, for that , i suppose AL32UTF8 is recommended, but when i try to modify the character set i get this error. SQL> select value from nls_database_parameters where para

  • Extended Analytics Flat File extract question

    I have modified the Extended Analytics SDK application as such: HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_FLATFILE instead of HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_STANDARD I am trying to figure out where the Flat file ext

  • I get ERROR U44M1P7: Error log file location: C:\Program Files (x86)\Common Files\Adobe\Installers

    When updating Photoshop CS6 (Creative Cloud) I get ERROR U44M1P7: Error log file location: C:\Program Files (x86)\Common Files\Adobe\Installers. Initial Installation and actual funcioning wuith no problem, only on updating. I have tried several times

  • Drag and Drop not working right in IE

    Hi, I am using CP8 and created a course that has 2 drag and drop interactions. The first drag and drop works just fine in all browsers, but the second drag and drop isn't releasing the next button (on success) as it should be, but it's only doing tha

  • Edge Animate command - not exporting images

    I've installed the Edge Animate command extra for Fireworks and have a series of png's each in it's own state - set to 'include when exporting.' When I use this extra (using any of the export options) either only one png is created or none are. All t