SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Getting UnauthorizedAccessException.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/20/2012 :  06:57:18  Show Profile  Reply with Quote
Hi,

While i am running the SSIS package i am getting the following error. While i am trying to manually access the path i able to access, seems i am having permission to access the path manually but not through SSIS. what i need to do?

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path '\\filepath.txt' is denied.

Thanks
Subha


jackv
Flowing Fount of Yak Knowledge

United Kingdom
2079 Posts

Posted - 08/20/2012 :  09:14:17  Show Profile  Visit jackv's Homepage  Reply with Quote
Does the account running the SQL job (I'm making an assumption you're using SQL Agent - if not , let me know) have permissions to the file\directory?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 08/20/2012 :  11:15:56  Show Profile  Reply with Quote
is this happening when running through BIDS or through sql job?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/21/2012 :  10:51:58  Show Profile  Reply with Quote
Hi,
this package is not scheduled. i am having permission to open the file from my run prompt.
this error happening when running through BIDS.

thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 08/21/2012 :  10:57:23  Show Profile  Reply with Quote
quote:
Originally posted by subhaoviya

Hi,
this package is not scheduled. i am having permission to open the file from my run prompt.
this error happening when running through BIDS.

thanks




It may be that you're using an expression for generating path and its not generating value properly. In such case, put a breakpoint on script task in place where you retrieve value and check if path variable has expected value

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/21/2012 :  12:02:13  Show Profile  Reply with Quote
That generating path has vaid one. If I tried to run the same package from my college system it is running. I am newly joined to my company. got access recently to that path, it is external server path.

thats what i got confused, i dont know wht to do
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 08/21/2012 :  12:30:20  Show Profile  Reply with Quote
and are you sure you're using same credential to run the package and also runing it from same domain system?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/24/2012 :  12:03:52  Show Profile  Reply with Quote
the problem is with admin rights, now its solved.

thanks for all replies friends.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000