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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Getting UnauthorizedAccessException.

Author  Topic 

subhaoviya
Posting Yak Master

135 Posts

Posted - 2012-08-20 : 06:57:18
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
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-08-20 : 09:14:17
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

52326 Posts

Posted - 2012-08-20 : 11:15:56
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

135 Posts

Posted - 2012-08-21 : 10:51:58
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

52326 Posts

Posted - 2012-08-21 : 10:57:23
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

135 Posts

Posted - 2012-08-21 : 12:02:13
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

52326 Posts

Posted - 2012-08-21 : 12:30:20
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

135 Posts

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

thanks for all replies friends.
Go to Top of Page
   

- Advertisement -