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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 error when running statement

Author  Topic 

chedderslam
Posting Yak Master

223 Posts

Posted - 2008-12-02 : 20:00:28
I am getting this error when running a long sql script:

Msg 2760, Level 16, State 1, Line 3
The specified schema name "matthews" either does not exist or you do not have permission to use it.
Msg 1088, Level 16, State 11, Line 1
Cannot find the object "matthews.juryduty_resourceguideprograms" because it does not exist or you do not have permissions.
Processed 100 total records
Msg 208, Level 16, State 1, Line 2
Invalid object name 'matthews.juryduty_resourceguideprograms'.

I have created the account matthews on the server and given it the sysadmin role. I am also logged in under that account when running the script. I am not great with permissions and roles as I am by no means a dba. What do I need to do to get around that error. Thanks for any help!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-02 : 20:02:48
You need to run under correct database and correct schema

Like :

Use Dbname
select...... from [schema].tablename.....
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-02 : 20:03:23
quote:

I have created the account matthews on the server and given it the sysadmin role.



Bad idea.

Could you post the script so that the errors are in context?

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

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-02 : 23:54:00
quote:
Originally posted by chedderslam

I am getting this error when running a long sql script:

Msg 2760, Level 16, State 1, Line 3
The specified schema name "matthews" either does not exist or you do not have permission to use it.
Msg 1088, Level 16, State 11, Line 1
Cannot find the object "matthews.juryduty_resourceguideprograms" because it does not exist or you do not have permissions.
Processed 100 total records
Msg 208, Level 16, State 1, Line 2
Invalid object name 'matthews.juryduty_resourceguideprograms'.

I have created the account matthews on the server and given it the sysadmin role. I am also logged in under that account when running the script. I am not great with permissions and roles as I am by no means a dba. What do I need to do to get around that error. Thanks for any help!


does schema with name matthews exist?
Go to Top of Page
   

- Advertisement -