I'm getting this error message when I'm trying to set up a view in SQL Management Studio.
Msg 262, Level 14, State 18, Procedure TC_TE, Line 5 [Batch Start Line 13]
CREATE VIEW permission denied in database 'master'.
The weird thing I was able to set up a view earlier today and I'm trying to create view in a database I set up called "EAIS", not the master. I think I have the proper permissions because I'm able to create and delete databases and was able to create the first view.
Below is the code for the view I wasn't able to set up. Any help would be appreciated.
/****** Object: View [dbo].[BUG_TE] Script Date: 08/15/2016 05:58:30 ******/
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[BUG_TE]'))
DROP VIEW [dbo].[BUG_TE]
GO
/****** Object: View [dbo].[BUG_TE] Script Date: 08/15/2016 05:58:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create View [dbo].[BUG_TE]
AS
select [BUG].[Project] as BUG_Project
,[BUG].[Key] as BUG_Key
,[BUG].[Summary] as BUG_Summary
,[BUG].[Status] as BUG_Status
,[BUG].[Priority] as BUG_Priority
,[BUG].[Assignee] as BUG_Assignee
,[BUG].[Created] as BUG_Created
,[BUG].[Updated] as BUG_Updated
,[BUG].[Linked Issues] as BUG_LinkedIssues
,[BUG].[Environment] as BUG_Environment
,[BUG].[Severity] as BUG_Severity
,[BUG].[Use Case] as BUG_UseCase
,[BUG].[Release] as BUG_Release
,[TE].[Project] as TE_Project
,[TE].[Key] as TE_Key
,[TE].[Summary] as TE_Summary
,[TE].[Status] as TE_Status
,[TE].[Created] as TE_Created
,[TE].[Updated] as TE_Updated
,[TE].[Linked Issues] as TE_LinkedIssues
,[TE].[Environment] as TE_Environment
,[TE].[Use Case] as TE_UseCase
from EAIS.dbo.BUG
INNER join EAIS.dbo.TE on ( BUG.[Linked Issues] LIKE '%' + TE.[Key] + '%' OR BUG.[Linked Issues] like '#############%')
and TE.[Linked Issues] LIKE '%' + BUG.[Key] + '%'
GO