| |

VerySource

 Forgot password?
 Register
Search
View: 962|Reply: 6

The problem of calling the dts package~~

[Copy link]

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-4 09:00:02
| Show all posts |Read mode
I have no problem with the console program written in c#, but it cannot be ported to the web.
The phenomenon is that the program does not go down in the package.LoadFromSQLServer sentence, the web page has been waiting until it times out
My procedure is as follows:
string packageName = "test";
object pVarPersistStgOfHost = null;
DTS.PackageClass package = new DTS.PackageClass();
try
{
package.LoadFromSQLServer(".","sa","", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null, null, null, packageName, ref pVarPersistStgOfHost);
Console.WriteLine("DTS Package Executing..");
package.Execute();
Console.WriteLine("DTS Package Completed");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
package.UnInitialize();
package = null;
}
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-11-4 23:00:01
| Show all posts
Top down
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-11-4 23:15:01
| Show all posts
Is the same database
It may be that the asp.net running account has insufficient permissions to access the database. The console defaults to the current login user permissions
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-11-4 23:30:02
| Show all posts
"Maybe the asp.net running account has insufficient permissions to access the database"
Access to sql database or data warehouse database?

I did a few more tests, and the problem became clear: The dts package I executed can be executed if the task about "Analysis Services Processing Task" is removed. Once it is added, the LoadFromSQLServer part will not survive.
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-11-4 23:45:01
| Show all posts
I thought the database permissions were overturned by lz...Look again
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

 Author| Post time: 2020-11-5 00:00:01
| Show all posts
There is no problem in the console, but there is a problem in the web,
Ascrabherosaid, the console defaults to the current login user authority, while the web is the aspnet user.
(Building the dts package in sqlserver, "Analysis Services processing task" does not need to fill in the login user and password, so you must use the windows authentication method to log in)
So I think the problem may lie in the login user.

Unfortunately, I can't find a solution.

Hope friends enlighten me!
Reply

Use magic Report

0

Threads

11

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-11-5 01:00:02
| Show all posts
Youqing Bangding
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list