Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 When run .sql file (table) got permission problem

Author  Topic 

Delinda
Constraint Violating Yak Guru

315 Posts

Posted - 2008-07-20 : 21:27:55
I'm trying to run script as follow,
CREATE TABLE [CrpUser].[mUser](
[UsrID] [varchar](9) NOT NULL,
[UsrPwd] [varchar](9) NOT NULL,
[UsrNme] [varchar](50) NOT NULL,
[UsrPD] [varchar](3) NOT NULL,
[UsrType] [varchar](30) NOT NULL,
CONSTRAINT [PK_mUser] PRIMARY KEY CLUSTERED
(
[UsrID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

but got error message as follow,
The specified schema name "CrpUser" either does not exist or you do not have permission to use it.

Let's say, i've have Crp_Test database
how to add CrpUser into Crp_Test, as a result i can run my .sql above.

I already got CrpUser user in my SQL Server 2005. So many times had try on it but still got a problem

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-20 : 22:01:17
Do you have permissions to create tables? Does the CrpUser schema exist?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-07-21 : 06:26:20
transfer the object to your schema.....

Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-21 : 11:32:01
First of all, Create that schema [CrpUser] and if you don't want to put [CrpUser] in objects , then make that your default schema.
Go to Top of Page
   

- Advertisement -