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 |
|
fastedge
Starting Member
8 Posts |
Posted - 2005-08-11 : 14:57:51
|
| I've created an ASP.NET app that works just fine using my testing DB, but throws an exception when I try to insert using the production DB. As far as I can tell the databases are exactly alike (the test DB is a copy of the production DB). I'm missing something, but I don't know what.P.S. - I know I mentioned ASP.NET, but it's not a .net question. All the code works and everything points where it should. Thanks everyone.Ed |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-08-11 : 15:06:56
|
| When you say the test DB is a copy, how exacting were you in your copy? Did you include all permissions and set yourself up identically? Are you connecting to your test DB as a sysadmin, but only a regular user on production? Perhaps your production DB has more restrictive permissions and does not allow you to directly INSERT into the table. That is how we often setup our production DBs. Users are only granted permissions to EXECUTE stored procedures and must use those to do inserts.---------------------------EmeraldCityDomains.com |
 |
|
|
fastedge
Starting Member
8 Posts |
Posted - 2005-08-11 : 15:11:31
|
| Yes, I checked the permisions. Actually I'm able to update records, but not insert. I could be wrong here, but I thought the same permisions that allow updates allow inserts. Any ideas? |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-08-11 : 15:25:15
|
| Well, INSERT, UPDATE, and DELETE can all be specified in the GRANT, so I wouldn't necessarily assume that to be true. You might try running sp_helprotect on the table and your user to see what you get between the two systems.---------------------------EmeraldCityDomains.com |
 |
|
|
fastedge
Starting Member
8 Posts |
Posted - 2005-08-11 : 15:40:58
|
| Aha, now that was interesting. The results are telling, but I'm not certain how to change them.I'm getting "Grant | Update |(All+New)", but "Grant | Insert | ."I'm guessing that "." means none. How do I change that? |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-08-11 : 16:58:00
|
| Issue a new GRANT statement? Assign a database or server role to the user?---------------------------EmeraldCityDomains.com |
 |
|
|
|
|
|
|
|