We have a database, lets name it DB1.
In that DB1 we have "Views" like mee.v_ZBO_RCP_HEADERS.
In SSMS I click get 1000 rows, code:
SELECT TOP (1000) [WERKS]
      ,[RECEIPT_ID]
      ,[POS_ID]
      ,[RECEIPT_NUMBER]
      ,[RCP_DATE]
      ,[RCP_TIME]
      ,[CASHIER_ID]
      ,[TOTAL_TAXES]
      ,[TOTAL_AMOUNT_INC]
      ,[Z_ID]
      ,[CCARD_ID]
      ,[STOR_ID]
      ,[lcn_id]
      ,[RCP_psls_date_id]
      ,[DURATION]
      ,[DURATION_FROM_LA]
      ,[RECEIPT_ROWS_DM]
      ,[FLAGS]
  FROM [DB1].[mee].[v_ZBO_RCP_HEADERS]
But using SELECT I have error:
The server principal "computer name" is not able to access the database "Receipts_2016" under the current security context.
What I can't understand is that this Receipts_2016 is another database where I do not have SELECT permissions I know but what has that got to do with the ZBO_RCP_HEADERS one?
Under this view I can't find a single line connected to that reciepts database.
What can I do to change it so this database view wouldn't need to connect to the other database since 2016 is outdated anyway?
 
    