?
Solved

SQL Job launching Access Database issue

Posted on 2005-04-25
9
Medium Priority
?
171 Views
Last Modified: 2010-03-19
I type in the Run window

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MyDB.mdb"

and the database opens fine.  I created a SQL job and selected Operating System Command and pasted that in and it does not work.  It hits my CD drive for some reason then never opens anything.  Any idea all?
0
Comment
Question by:sbornstein2
  • 4
  • 3
  • 2
9 Comments
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13862631
As far as I know, you cannot open another application from a SQL job.
0
 

Author Comment

by:sbornstein2
ID: 13862636
Oh you definatly can.  I did this at other jobs I just forget what is causing this issue.
0
 

Author Comment

by:sbornstein2
ID: 13862680
I SQL jobs that would run

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MYDB.mdb" /x "Autoexec1"


and it would fire off an autoexec call and close the DB.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 28

Expert Comment

by:rafrancisco
ID: 13862714
What I am trying to say is, you cannot open another application that will show a GUI screen from a SQL job.
0
 

Author Comment

by:sbornstein2
ID: 13862727
ok hat might be the case but I know I had this working from another SQL Server at my work once we used to run automated jobs.  If I pass in:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MYDB.mdb" /x "Autoexec1"

I would have a macro that would run and then run an SMTP job and then the last line would quit access and then the job would stop without issue.  I think this might be a security issue or something maybe.
0
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13862794
>> I think this might be a security issue or something maybe <<

This could very well be the reason.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 13862890
It might be more reliable to reproduce your SMTP code in VBScript, then just run an ActiveX job. Then you dont need Access installed on the server.
0
 

Author Comment

by:sbornstein2
ID: 13862968
I have things in the Access database like Subject, Body in tables to make automated reports pretty easy.   I know this works but I dont know why its hitting my A: Drive actually and not running the macro or opening the DB.  There are no forms etc that open in the DB its the exact database I used before at my job that worked with this call from SQL job.
0
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 75 total points
ID: 13863107
So when you open that database manually its all cool? have you logged in with the same account as SQL server and tried running it?

Is it possible that its doing its MS thing and trying to set up Office for the first time for the SQL User, thats why its hitting all the drives?

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question