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.
| Author |
Topic |
|
newbie404
Starting Member
3 Posts |
Posted - 2004-07-13 : 06:28:34
|
Hi,I have set up my first sql server for use in an intranet. I am connecting to it through asp. I created the dB through the SQL enterprise manager. I have added a user and set rights on the database (right clikcing it and selecting permissions). However, when I try to conect from the asp I get a message that the user does not have these rights as the owner is'dbo'. In the admin dbo is listed as the owner. Is there a way to change the owner, or to find out the password for dbo, or... basicly anything that will let me access the db!thanks, and sorry for what is probably the most basic and stupid question.Andy |
|
|
JasonGoff
Posting Yak Master
158 Posts |
Posted - 2004-07-13 : 07:04:52
|
| Post your ASP connection code, including the connection string - it might shed some light... |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-13 : 07:33:13
|
| Also, post your error message so we can see exactly what it says. The dbo is not a user with a password. It's a role that a user can be assigned to. That user then has a password possibly.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
newbie404
Starting Member
3 Posts |
Posted - 2004-07-13 : 07:54:56
|
| ASP Connection:<%Dim connSet conn = Server.CreateObject("ADODB.Connection")conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = metrics002; User Id = andrewm; Password=madone"%>----------------------------------------------------Error message:HTTP 500.100 - Internal Server Error - ASP errorInternet Information ServicesTechnical Information (for support personnel)Error Type:Microsoft OLE DB Provider for SQL Server (0x80040E09)SELECT permission denied on object 'mPATHS', database 'metrics002', owner 'dbo'./metrics/addpath.asp, line 43Browser Type:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Page:GET /metrics/addpath.asp ----------------------------------------------------NOTE: line 42/43 are:SQLstmt = "SELECT * FROM mPATHS WHERE path_team=1"Set rs = conn.Execute(SQLstmt)----------------------------------------------------ThanksAndyPS> I managed to connect using just sa, but I thought it is better not to use this??? |
 |
|
|
JasonGoff
Posting Yak Master
158 Posts |
Posted - 2004-07-13 : 07:59:10
|
| You need to add user andrewm to your database and give them select permission on the mPATHS table (and anywhere else for that matter). |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-13 : 08:04:25
|
| And don't use SELECT *. :) You need to list the column names.SELECT path_team, column2, column3 FROM mPATHS WEHRE path_team = 1MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2004-07-13 : 08:31:49
|
quote: Is there a way to change the owner, or to find out the password for dbo, or... basicly anything that will let me access the db!
dbo is a role. You can see the database owner from enterprise manager by clicking on the database properties. In your security/logins section of Enterprise manager, you can assign "dbo" for a particular user to a particular database by clicking on the user, then going to the database access page and clicking on the relevant database and permission. (Look up the roles in the documentation if you are unsure.)Also, any system administrators gain effective dbo access.Lastly, you should now change your password.-------Moo. :) |
 |
|
|
newbie404
Starting Member
3 Posts |
Posted - 2004-07-13 : 09:40:01
|
| Thanks for all the feedback. I'll try to get it working. I think my first task is to start rewading the documentation in more detail! |
 |
|
|
|
|
|
|
|