I created view in database1 based on tables in database2. I gave SELECT permission to a user who has access only to database1. The user can't get this view to work because he doesn't have an account in database2. How can I solve this issue? I don't want to create an account in database2.
I have been asked by a client to implement some views for reporting purposes, the views will be accessed via PowerBI, Excel and SSRS. The designated user will only have access to the view and no underlying tables must be available to the user.  The problem I have encountered in that the SQL within the view touches 3 different schemas (All within the same database):   Pupil Provider  Security   The view is:  CREATE VIEW dbo.vTestPermissions AS SELECT a.Column1,        b.Column1,        c.Column1 FROM Pupil.Table1 a JOIN Provider.Table2 b ON a.Column1 = b.Column1 JOIN Security.Table3 c ON a.Column1 = c.Column1   The owners of the Tables/View are as follows:   Pupil.Table1 - Owner Pupil Provider.Table2 - Owner Provider Security.Table3 - Owner Security vTestPermissions - Owner dbo   When I select from the view I get an error:     The SELECT permission was denied on the object 'table3', database   'TEST', schema 'Security'   I have tried giving SELECT permission with and without the GRANT option to the schema, and the tables, but that makes the underlying tables available to the user.  Any help on this will be greatly appreciated.
Consider the infinite line, $L$ in $2D$ consisting of all points $p$ such that $p.[0.3511 0.9263]= 6$. Find the point on the line closest to $(10, 20)$. Find the point on the line closest to $(4, 3)$. Find the distance from the line to both of these points.  Hi, I was reading the book $3D$ Maths Primer for Graphics and Game Development. The book mention about $2$ formulas but I don't know how to apply them.   $\text{Signed distance} = d-q.n$  $q' = q + (d-q.n)n$  for any point $q$, the point $q'$ that is the closest point on $L$ to $q$.  This is what I have tried,   Since the lines are parallel then the normal are the same so   $q' = q + (6 - q(0.3511 0.9263))(0.3511 0.9263)$   I'm stuck here. In the decimal system: $...-3, -2, -1, 0, 1, 2, 3...$ In the binary system: $...-11, -10, -1, 0, 1, 10, 11...$ In the unary system: $-111, -11, -1, \text{ ??? }, 1, 11, 111...$   I was only able to find a related question but none with an answer so far: Let $A$ be a real square matrix en let $I$ be the identity matrix with the same size. Let $n&gt;0$ be the smallest natural number for which there exist  $a_0,a_1,...a_{n-1} \in {R}$ such that $A^n+a_{n-1}A^{n-1}+....+a_1A+a_0I=O$.  Show that A is invertible if and only if $a_0\neq0 $.  So i need to proof    $A$ invertible $\rightarrow$$a_0 \neq 0$ $a_0 \neq0 \rightarrow$ $A$ invertible    I don't really know where to start with 1, and with 2 I tried to prove it with a contradiction but I don't think it's right either. A classic exponential inequality: $x^y+y^x>1$ Maximum Likelihood Estimate with different parameters 'setenv' command not working on tcsh shell when called explicitly I can run setenv command just fine in my tcsh shell like this:  echo $0 /usr/bin/tcsh echo $SHELL /usr/bin/tcsh setenv START_TIME `date +%s` echo $START_TIME 1499355967   But, whenever I run it explicitly like shown below, it doesn't work. I need to do this because I have to specify shell when executing it via python subprocess call, otherwise it will call a sh shell as default.  /usr/bin/tcsh -i -f -c 'setenv START_TIME `date +%s`' echo $START_TIME START_TIME: Undefined variable.   What's the problem here? I searched for this issue online, but couldn't find any issue similar to this. This is extremely frustrating. Include chapters in List of Figures with titletoc? Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated. Show that if $a \neq b$ and a and b are positive then $\frac{a}{b}+\frac{b}{a}$ is never an integer Mouse disappear in VirtualBox I am using latest version of VirtualBox (VirtualBox 4.3.6 for Windows hosts) and after installing any OS and clicking inside of it mouse disappear. It is not visible until I press right CRTL. Anyone know what can cause this problem. I have also installed extension pack. Joint density for exponential distribution Let $X_1$ and $X_2$ be independent random variables each having a exponential distribution with mean $\lambda = 1$.  (a) Find the joint density of $Y_1 = X_1$ and $Y_2 = X_1 + X_2$.  (b) Get the marginal density of $f_1(y_1)$ and $f_2(y_2)$.  $f(x_1)=e^{-x_1}$, $f(x_2)=e^{-x_2}$  Since $X_1$ and $X_2$ are independent, $f(x_1, x_2)=f(x_1)f(x_2)=e^{-x_1-x_2}$  However, how could I find the joint density?  I mean, it is quite easy to find marginal ones from the joint one, but how can I do the opposite? How to compile self-referencing functions (to perform recursive a task) The vote fraud script breaks legitimate polling questions - A serial downvoter's lament I've downvoted several of the answers on these Meta discussions:       Both questions are typical self evaluations, Stack Exchange runs them on all young Beta sites and as you may have noticed they are essentially polls, a series of example questions from the site that we are supposed to vote on.  Today I noticed that almost all of my votes have disappeared on both evaluations, only an upvote remains in the later one. My votes triggered the serial voting script, something that :      Heh, it appears I just serially downvoted you (I downvoted a lot of the answers here), hopefully the script is smart enough to not reverse my votes. Will check back in 24h, and if it does, I'll rant about it on MSO ;)    My voting behaviour on both evaluations was very simple:   I had the evaluation open in the left monitor, Opened all the example questions in their own tab, in the right monitor, Scanned each question quickly, and voted on the Meta answer (most of my votes were downvotes), Repeat for the next one, and so on...   I didn't spend more than a few seconds on any question, as I'm fairly regular on the site and I've already read all of them while casually browsing the site. In fact, if my memory isn't failing me, I had voted (up/down) and/or commented, and/or voted to close on each of the 20 example questions. I might have spend a minute or two re-reading a couple, but I mostly scanned through them. In any case I think my voting pattern is quite normal, and the script should be somehow tweaked to take serial posts, posted by the same user in quick succession, into consideration, especially on Metas.   Since I had anticipated that the script would kick in, I could have tried to fool it by pausing a bit between votes or trying to look for other Meta posts to vote on, in between voting on the evaluation answers. However I'm a very active voter on Meta Workplace, there aren't many posts I haven't already voted on, and the few that I haven't is probably because I neither agree or disagree with (my opinion on them is simply "meh"). In any case I think my voting behaviour was natural, and although the serial voting script is awesome, this time it caught and reversed a perfectly legitimate behaviour.  Animuson, in , mentions that the script isn't really optimal on Area51 as well:      Yes, please implement this on Area 51 proposals too! Oftentimes a single user would suggest a plethora of "example" questions to their own proposal which are just terrible, yet all of everyone's votes get reversed and the question just sits there at 0. I've noticed several times that my votes have gotten reversed.    I haven't noticed it myself, but it certainly seems plausible, especially early in a proposal's life.  Mysticial found a related discussion, , but it's focused on voting patterns on main sites, where reputation is also a factor. I can understand jumping through hoops to satisfy the script on main sites where, unfortunately, there are a lot of people trying to get some cheap rep or "punish" others with their downvotes, but not on Metas, and especially not on these evaluation posts.   Voting fraud is a problem, and more often than not the script works wonderfully, but in my case it was extremely counterproductive. Critical evaluations are essential for a young Beta site, and their answers typically only get a handful of votes. I wonder how many of these votes have silently gone away...  Fix this please. Top-bar hat misplaced Why does my Mac OS X 10.6 kernel run in 32-bit mode? I have a MacBook Pro (5,1) with 4GB of memory running 10A432 - but it's running the 32-bit kernel.  Any ideas why it wouldn't be running in 64-bit mode, and how I can get it to do so? How to compute the  formula $\sum  \limits_{r=1}^d r \cdot 2^r$? How do you mass-delete emails in iOS Mail? I don't know if this is documented anywhere, but just to bring it to current attention… Can Button[] generate output without using Print[]? Drawing users' attention to unrecoverable actions? The function $f(z)=z+\frac{1}{z}$ maps $\Omega$ biholomorphically on the upper plane The question states:     Let $\Omega$ be the upper half plane minus the unit disk. Show that the map $f: z \mapsto z+1/z$ maps $\Omega$ biholomorphically on the upper plane. Describe the preimages of the lines $\mathrm{Im}(z)=\text{a constant}&gt;0$.   So how exactly does one show the mapping is biholomorphic. I'm not sure where I should start, so unfortunately I haven't made any progress