Re: Permission denied
- From: "Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Jun 2006 10:28:52 -0500
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.
.
- References:
- Permission denied
- From: Rich
- Re: Permission denied
- From: Richard Mueller
- Re: Permission denied
- From: Rich
- Permission denied
- Prev by Date: Re: Permission denied
- Next by Date: Re: Copying a script and executing it on multiple remote machines.
- Previous by thread: Re: Permission denied
- Next by thread: Running an MSI file on a remote machine
- Index(es):
Relevant Pages
|