Script task Issue - sql-server

I have a script task that picks up an excel file and references Microsoft.office.interop.excel which is all fine. It runs fine on my workstation but when I deploy this to server it errors.
Script Task:Error: Retrieving the COM class factory for component with
CLSID {00024500-0000-0000-C000-000000000046} failed due to the
following error: 80040154 Class not registered (Exception from
HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I have checked that the proxy account has access to the excel location. I have also made sure the package is running in 32Bit mode on the server and in my debug environment, which, as I say works fine in debug but as soon as I deploy to server it fails. I have also checked to make sure that Microsoft.office.interop.excel exists in the GAC and is the same version.
I am at a loss as to what the problem here is.... Anyone got any ideas?
Thanks

Related

Fix this Entity Framework migration, 00000000000000_CreateIdentitySchema, in Visual Studio?

I'm starting with the default Blazor app in Visual Studio 16.3.7 with authentication:
I go to the registration page, enter the email and password, and click the Register button and up comes the following error:
Next I go to Package Manager Console in Visual Studio, and run Update-Database, getting the following error:
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Users\Halaspnet-BlazorAuthentication-0X0X0X0X0X0-X0X0-X0X0-X0X0-0X0X0X0X0X0.mdf'.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
The message points to the culprit, a backslash is missing from the file specification. It should be C:\Users\Hal\aspnet... , not C:\Users\Halaspnet...
So, how do I fix this? I can't find the string "CREATE DATABASE" anywhere in my solution.
Also, how do I get this to Microsoft as a bug report?
Problem solved!
I created the database that the 00000000000000_CreateIdentitySchema.cs wanted using Visual Studio's SQL Server Object Explorer. Then I ran Update-Database in the Package Manager Console, and it completed successfully.
The problem seems to be that I was using the Express edition of SQL Server.
This link got me to the fix for this problem:
Creating A Step-By-Step End-To-End Database Server-Side Blazor Application

SQL Server 2017 Installation Fails on Windows 10

I am attempting to install SQL Server 2017 Developer Edition on Windows 10 but I am getting an error "Exception has been throw by the target of the invocation." That is less than helpful.
If I run the System Configuration Checker, the setup administrator rule fails. I am at a loss to explain the failure since this I have one account on my computer and I am in the Administrator group. This computer is not part of a Windows domain. I tried running setup as an administrator by right-clicking run as administrator and got the same results.
Unsure if this is causing the setup failure but I figured it is where I should start. It is not even starting the setup so I don't think a log file is created that I can look at. I tried running the setup as administrator and I get the same results. Ideas on how I can troubleshoot this?
UPDATE
Found out the setup log file is located in the folder C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log. So I checked the error log and the error message was
Unable to load DLL 'sqlmu.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Sure enough that file was missing. So I re-downloaded the ISO and extracted it and now setup runs fine. Must have been a corrupted download. Hope that helps somebody.
Have a look at the SQL Server installation fails if the Setup account doesn't have certain user rights article, and following the steps included. Does that work?

Package that runs perfect on SSIS, but fails on SQL - server job activity

I wonder if you can help me, I am having a problem which I can't figure out for the last few days... I get these errors when I run a package, that runs perfect on SSIS, on SQL - server job activity:
Error: There were errors during task validation
Error: .. failed validation and returned error code 0xC0208449
Error: One or more component failed validation
ADO NET source has failed to acquire the connection {...} with the following error message "exception from HRESULT: 0x80131937
Some additional info:
I am using project deployment mode
my Sql server version is 2014
My protection level in SSIS is DontSaveSensitives both in project and packages, but I think that it doesn't matter when I deploy anyway.
The package I get this error about run on SSIS but not on SQL-server job activity
When runnin within Sql Agent Job, your package is failing to acquire connections. First review your package/job connections, and make sure they have deployed properly.
Then rule out access permissions issues by testing the package using a Sql Server user/password account. If it works this way then most likely you need to use a Sql Server Proxy account.
If you are still unable to access then check connectivity between the machine you are running the job and the one(s) where your data is located (addresses, ports and instances,..). Also make sure that all involved machines can use the same transport (named pipe, tcp,...) in Sql Server Configuration Manager.

Outlook COMException

Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Could any body please help me out by finding the error. I have created a windows application using OUtlook COM with Office 2010. I have a timer which after a specific interval takes the data from sql server database and then add up into the sql server database. But my applicatio is giving this exception when i am creating the object of Outlook.Application class.
This might be due to privileges of the process. I usually run Visual studio as administrator, but if outlook is not previously started as also admin, the COM call will fail.
Simple solution. Run both as administrator or run both as normal privilege level.

asp.net 4 mvc 2 error

when I run the app on server I get:
Could not load file or assembly 'Microsoft.SqlServer.Replication.DLL' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.Replication.DLL' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
Some points:
On machines with sql server 2005 installed (from which that dll is copied) the app works. But the server does not have it, so I need to get it to work without sql server.
The file is in wwwroot/bin folder: Microsoft.SqlServer.Replication.dll
Do I need to include the file in References folder in VS? Set it to CopyLocal?
Any advice or solutions would be greatly appreciated
--MB
The Microsoft.SqlServer.Replication.DLL is part of the Replication Management Objects which in turn are part of the SMO pack. The only supported redistribution path for SMO is to use the installer that comes with the SQL Server feature pack download, see Distributing an Application That Uses SQL Server Management Objects. You must install the SMO redistributable packet on the server.

Resources