Re: Permission denied

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I wonder if network support is disabled in the DBMS. I know that MSDE (SQL
Server), for example, installs by default without network support, meaning
the service is not advertised over the network so remote clients can
connect. When installing MSDE from a command line, you specify
DISABLENETWORKPROTOCOLS=0 to allow remote connections. Other DBMS's may have
similar settings. If this is the case, the error will be raised when you
attempt to connect to the database. If you can connect and read from tables,
but not insert, then it must be permissions. Depends on your script - if the
first connection to the database is to insert, you can't tell if you have
read permission. I usually use separate statements to connect, read records,
and modify, but others combine steps in one statement.

When you run from the database server, you are probably local
admininstrator, which is most likely database owner (dbo in SQL Server).
When you run remote you may be domain administrator but not a local
administrator on the database machine. You would have permissions of the
public role in the database, which allows read but not write. In SQL Server
I can use Enterprise Manager to create roles with database permissions and
assign domain groups (or users) to the role, which gives all members of the
domain group needed permissions. Details depend on you DBMS.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"Rich" <rsbaier@xxxxxxxxx> wrote in message
news:1150811216.632881.17960@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Responses:

1. I receive the same permission denied error if I manually run the
script manually and not as a scheduled task.

2. We have a two server production environment: a web server and a
database server, both of which are on the same network unseparated by
firewalls or anything like that. I want the script to actually run
from the web server. If I run the script from my local development
machine I don't have any problems. If I run it from the web server I
receive the permission error.

When I attempt to run the script manually, it executes under the
account of the currently logged in user, correct? I'm logged in with
an admin account, so I wouldn't think that permissions would be an
issue in that scenario. I can't figure this thing out.

Thanks again for any advice.

Rich


Richard Mueller wrote:
Hi,

If the script runs fine for you, but not as a scheduled task, the problem
is
likely permissions, especially since the error is raised when it attempts
to
insert. Unless you are saying the database cannot be updated remotely. Is
the database on the machine you call the local machine? Can you run the
script as yourself on the server successfully? For most DBMS's it doesn't
matter which machine the script is run from as long as you have
permission
and connectivity (and are not blocked by something like a firewall).

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"Rich" <rsbaier@xxxxxxxxx> wrote in message
news:1150734311.734646.243880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a VBScript file that I am trying to execute on a scheduled basis
via a Scheduled Task. This script is a little different that others
I've written in that it inserts records into a database table. The
script works fine until it hits the code to execute the insert, at
which point I receive the following error:

800A0046
Permission Denied

This script runs fine if executed on my local machine. I only receive
the error above when I execute it on a server. I have the task running
under a user account which should have more than sufficient
permissions. I guess my questions are:

1. Any ideas what directions I might go to resolve this error?
2. Is there another/better way I should be doing such a task?

Thanks in advance for any assistance.




.



Relevant Pages

  • Re: Get custom database properties from an Access database
    ... It doesn't matter if the VBScript process drags, since it is an independent process and so will have no effect on the user's interaction with the database. ... The user can skip merrily along, doing whatever he needs while the script invisibly figures out the current situation in the background and decides what to do about it. ... It does, but I've run into issues other places on this same network, where users needed a drive letter to a server. ...
    (microsoft.public.scripting.vbscript)
  • Re: Get custom database properties from an Access database
    ... will write the script to look for an available letter, ... If you're concerned about another drive letter causing ... will have no effect on the user's interaction with the database. ... As for the server, yes, that would definitely be the way to go. ...
    (microsoft.public.scripting.vbscript)
  • Re: Get custom database properties from an Access database
    ... write the script to look for an available letter, ... If you're concerned about another drive letter causing ... will have no effect on the user's interaction with the database. ... As for the server, yes, that would definitely be the way to go. ...
    (microsoft.public.scripting.vbscript)
  • Re: db repair
    ... Server. ... VB Script looks amazingly like VBA, since they're both based upon the same ... See http://www.mvps.org/access/general/gen0041.htm for the VBA code to ... this won't compact the database ...
    (microsoft.public.access.setupconfig)
  • RE: copy permissions from one user to another?
    ... THIS STORED PROCEDURE GENERATES COMMANDS ... -- ADD USER TO SERVER ... -- CREATE TABLE TO HOLD LIST OF USERS IN CURRENT DATABASE ... -- SET COMMAND TO FIND USER PERMISSIONS HAS IN CURRENT DATABASE ...
    (microsoft.public.sqlserver.security)