473,804 Members | 3,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New login cannot retrieve data from db

Hello all. I created the "student2" user account and set the password to
"student2". I then
went to Enterprise Manager and in the class_mgr database and in its
customers table, I gave this student2 user account access to the database
and set all permissions to the table. But when I log in to SQL Server using
this new userlogin, I can access the SQL Server Query Analyzer OK but when I
run the select * from customers; query I get
http://www.jimwrichard s.com/images/student2_1.gif"

.. What have I done wrong or overlooked doing right? Thanks in advance for
any help, Jim.
Jul 23 '05 #1
5 1676


Jim Richards wrote:
Hello all. I created the "student2" user account and set the password to
"student2". I then
went to Enterprise Manager and in the class_mgr database and in its
customers table, I gave this student2 user account access to the database
and set all permissions to the table. But when I log in to SQL Server using
this new userlogin, I can access the SQL Server Query Analyzer OK but when I
run the select * from customers; query I get
http://www.jimwrichard s.com/images/student2_1.gif"

. What have I done wrong or overlooked doing right? Thanks in advance for
any help, Jim.
What is the default database context for the new user? If it is not
the class_mgr database, then maybe your query is trying to access a
different table of the same name, but which isn't allowed to your user?
Joe Weinstein at BEA


Jul 23 '05 #2

"Jim Richards" <JW********@sat x.rr.com> wrote in message
news:6A******** ******@fe1.texa s.rr.com...
Hello all. I created the "student2" user account and set the password to
"student2". I then
went to Enterprise Manager and in the class_mgr database and in its
customers table, I gave this student2 user account access to the database
and set all permissions to the table. But when I log in to SQL Server
using
this new userlogin, I can access the SQL Server Query Analyzer OK but when
I
run the select * from customers; query I get
http://www.jimwrichard s.com/images/student2_1.gif"

. What have I done wrong or overlooked doing right? Thanks in advance for
any help, Jim.


No idea, but what are the current permissions on the table? You can use
sp_helprotect to find out (see Books Online for more details):

exec sp_helprotect 'dbo.customers'

Also, did you DENY permissions on that table to student2 or a role which
student2 is in; a DENY takes precedence over a GRANT.

Simon
Jul 23 '05 #3
Thanks Joe. I set the default database to "class_mgr" which contains the
table "customers" which contains just two rows (customers). As soon as I
access the SQL Query Analyzer using this student2 login the current database
is automatically set to "class_mgr" instead of the usual "master" database.

"Joe Weinstein" <jo*******@bea. com> wrote in message
news:41******** ******@bea.com. ..


Jim Richards wrote:
Hello all. I created the "student2" user account and set the password to
"student2". I then
went to Enterprise Manager and in the class_mgr database and in its
customers table, I gave this student2 user account access to the database
and set all permissions to the table. But when I log in to SQL Server
using
this new userlogin, I can access the SQL Server Query Analyzer OK but
when I
run the select * from customers; query I get
http://www.jimwrichard s.com/images/student2_1.gif"

. What have I done wrong or overlooked doing right? Thanks in advance for
any help, Jim.


What is the default database context for the new user? If it is not
the class_mgr database, then maybe your query is trying to access a
different table of the same name, but which isn't allowed to your user?
Joe Weinstein at BEA

Jul 23 '05 #4
Thanks Simon. I have a snapshot of the current permissions:
http://www.jimwrichards.com/images/student2_2.gif.

I did NOT deny any permissions, see snapshot:
http://www.jimwrichards.com/images/student2_3.gif.

What now, Sir? Jim.

"Simon Hayes" <sq*@hayes.ch > wrote in message
news:41******** **@news.bluewin .ch...

"Jim Richards" <JW********@sat x.rr.com> wrote in message
news:6A******** ******@fe1.texa s.rr.com...
Hello all. I created the "student2" user account and set the password to
"student2". I then
went to Enterprise Manager and in the class_mgr database and in its
customers table, I gave this student2 user account access to the database
and set all permissions to the table. But when I log in to SQL Server
using
this new userlogin, I can access the SQL Server Query Analyzer OK but
when I
run the select * from customers; query I get
http://www.jimwrichard s.com/images/student2_1.gif"

. What have I done wrong or overlooked doing right? Thanks in advance for
any help, Jim.


No idea, but what are the current permissions on the table? You can use
sp_helprotect to find out (see Books Online for more details):

exec sp_helprotect 'dbo.customers'

Also, did you DENY permissions on that table to student2 or a role which
student2 is in; a DENY takes precedence over a GRANT.

Simon

Jul 23 '05 #5

"Jim Richards" <JW********@sat x.rr.com> wrote in message
news:QE******** ******@fe1.texa s.rr.com...
Thanks Simon. I have a snapshot of the current permissions:
http://www.jimwrichards.com/images/student2_2.gif.

I did NOT deny any permissions, see snapshot:
http://www.jimwrichards.com/images/student2_3.gif.

What now, Sir? Jim.


Good question - everything seems to be correct, unless I've missed something
somewhere. Is student2 in any roles?

exec sp_helpuser 'student2'

If student2 is in the db_denydataread er role for some reason, then that
would explain what you're seeing. If not, then I'd try dropping and
recreating the user again (and running DBCC CHECKDB wouldn't hurt either,
just in case there is some database corruption).

Simon
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
998
by: John Cosmas | last post by:
I've successfully created my reports locally using .NET 2003. Then I deploy the report to my destination. Locally using Preview mode, I'm able to retrieve the data and render the report against the same data source. But once I've sent the page up to the destination server and pass in the same login information (data source is configured to prompt user for login; the Shared Data Source dialog is set to "Prompt for credentials"), the...
2
2786
by: Beginner | last post by:
I know this is an old question, but searching all over the internet plus several MS security conferences, still haven't got a straight anwser. Basically, the login.aspx is on one dedicated server in the domain using AD. ASP.NET applications run on other servers (not neccessary in domain) and trying to use authentication server. How could this be done? - Most response says you need to set MachineKey the same, but that alone doesn't...
0
2135
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr" connectionString="Server=KLEO\SQLEXPRESS;Integrated Security=True;Database=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wizou.mdf" providerName="System.Data.SqlClient" />
2
10652
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr" connectionString="Server=KLEO\SQLEXPRESS;Integrated Security=True;Database=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wizou.mdf" providerName="System.Data.SqlClient" />
6
4698
by: BizWorld | last post by:
Hi, I have a scenario where i need to configure only Login.aspx page to use SSL. All other application will run on HTTP protocol. If someone can guide me how to accomplish this. One of my idea is to keep login.aspx page in a seperate Virtual director and apply SSL only on that directory but i dont know if it will have an impact on session (may be it will create two sessions due to two different virtual directories). If some one can...
1
4998
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database - An easy way to classify different pages as either Admin, Member or Public, where login is necessary for Admin and Member but not for Public. My idea was to put the pages in different directories to easily keep my order. - An easy menu system that...
6
3364
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in the past in other places, and while the help was much appreciated, it seemed everyone just wanted to 'theoretically' explain how to do it, but when I tried to do it myself, I couldn't login. I want to simply pass the email address and password to...
1
4064
by: Tim | last post by:
Folks, I have 3 loosely linked problems which I am would appreciate feedback on. 1). T-Sql and Active directory roles. We want to be able to control access to data within a table based on a role within Active directory. For example, Region1 has 4 sites, Region 2 has 3 sites and so forth. All the sites are held in a single database table.
1
1950
by: punk86 | last post by:
Hi, i can register and login without fail. However i notice that my inputs are not record into the database. I do not know the reason. Can someone guide me into login and register. Actually im quite confuse with the codings login.php <?php session_start ();
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.