SQL Server CE to SQL Server - sql-server

I have a standalone C# application using a SQL Server CE database. Another online program running on ASP.NET with a SQL Server database. Now I want to upload the standalone generated .sdf file to my ASP.Net program via browser and migrate the data into SQL Server. The code works fine in local server. But when I upload in Godaddy server and test I get this error
Could not load file or assembly 'System.Data.SqlServerCe,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
I have uploaded all the dll files.
Sometimes this error occurs
Upload status: The file could not be uploaded. The following error
occured: The application has failed to start because its side-by-side
configuration is incorrect. Please see the application event log for
more detail. (Exception from HRESULT: 0x800736B1)
Is there a work around?
Or how to migrate the sdf file data to xml via code and upload the xml file online to be parsed and enter the data in SQL Server?

I am replying to my own question so that it can be useful to others.
Tried various options. Uploading mdb file needs Access drivers to be installed in godaddy server which needs upgrading my web hosting plan.
Hence best option was to upload required dlls for sdf file. Upgrading VS2010 to VS2010SP1 gave an option of deployable dependencies which enabled automatic uploading of dlls needed for sdf files.
This the best option as there are numerous dlls needed for proper uploading and functioning of sdf file in hosted environment.
Got the answer after upgrading VS2010SP1.

Related

Migrating Plastic SCM from SQLite to MSSQL Server backend

There is Plastic SCM Server 6.0.16.1765 installed on the development server (MS Windows) with SQLite backend. It needs to migrate the existing repositories to MSSQL Server backend, but something goes wrong.
I followed the instruction step-by-step and it ends up with the error message(at step 7):
The migration progress has failed: The database repositories can't be created. Check the server log (plastic.server.log). Error: Directory lookup for the file "c:\program files\plasticscm5\server\repositories.plastic" failed with the operating system error 3(The system cannot find the path specified.). CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
I checked as suggested (the server log) and it has the same message as above.
There's no c:\program files\plasticscm5\server\repositories.plastic file or catalog at server - it's true. SQLite data files are located on different place. Why does the plastic migrator check this path?
The repository storage connection is configured using integrated security:
Data Source=MSSQL_SERVER\INSTANCE;Integrated Security=SSPI;DATABASE={0};
Note: the SQLite data files have the extension .sqlite, so it will never find the repositories.plastic file.
After spending some hours, it was found that the problem is in optional parameter Database path. Actually, the parameter must be mandaroty in case of MSSQL Server backend. Neither migration wizard nor the error message gave anything can help. The migration log is missing.

Application display error after windows upgrade

Hi I have recently upgraded from windows 7 to windows 8.And have installed both Visual studio 2010 and 2012 on my PC.I had two personal application that worked fine under windows 7 but after trying to run them on windows 8 I get the following error.
The first application displays the following error:
The database 'E:\PROJECTS IDE\VISUAL STUDIO\2010\WEBAPPLICATIONS\FORUM\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'E:\PROJECTS IDE\VISUAL STUDIO\2010\WEBAPPLICATIONS\FORUM\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file E:\Projects IDE\Visual Studio\2010\WebApplications\Forum\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
This seems to be linked to the ASPNETB.MDF db on both applications.
The second applications runs fine at first but I thing only because I have created with two database and in order to run the app acces to ASPNETDB.MDF is not required.But after I try to login into the application I get this error:
An attempt to attach an auto-named database for file D:\Projects IDE\Visual Studio\MyWork\Websites\e-commerce\e-commerce\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
The reason I am posting both the application problems is because I thing it is the same problem that is preventing my applications from running.
What can I do to solve this problem?

SSIS 2008 Flat File Source Deployment

I'm having a rather frustrating issue with using an SSIS Flat File source. I am developing an SSIS package on my local machine via VS 2008 and I'm using a flat file source that is stored locally. However, I need to deploy this package to a remote server that hosts our SQLServer and then run it as a scheduled job from that host. However, when I deploy the package, it obviously can't read the flat file source from my machine and fails the job. I have tried putting the file directly on the remote host in the exact same file location (ie. C:\Source.txt) but to no avail. Any ideas on how I can get my deployed SSIS package to read a flat file source?
Hopefully I'm just missing something extremely simple and will ultimately have a "DUH" moment, but if anyone can help I will greatly appreciate it.
If the account under which the SSIS package (for instance the SQL Server Agent service account) is running doesn't have rights to open the file, you will also have problems. So not only does the file need to be on a path that is valid relative to the server running the package, it must also have rights.
Nice answer by Cade.
Remember that you create a SQL Server Job, by default it runs under the credentials of the Service Account assigned to the SQL Server Agent.
If some steps on a Job need some permissions not owned by the Service account you can define a SQL Server Agent Proxy.
That way you can keep the principle of least privileges.
More info on how to create a Proxy here.

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.

SQL Reporting Services cannot configure virtual directories

I have an issue where we tried to upgrade our TFS 2005 server to 2008. During the install we encountered the error that it could not configure SQL Reporting Services. The log files showed that during the creation/configuration of the virtual directories for SQL Reporting Services (the Reports directory to be exact) a FileNotFoundException was thrown. The directory was actually created. SQL Reporting services were running just fine before the install. I tried to go in and reconfigure manually with the report server configuration tool but while it will create both directories, it still fails with a FileNotFoundException. I manually configure the .config files to point to the current server and I am able to get the sql report services web site running. We tried several things: messing with permissions, application pools, reinstalling the .NET framework, aspnet_regiis, etc. but nothing has changed the error.
Any ideas?
I recently encountered a similar problem. After installing a new RS instance and applying SQL Server sp2 and the KB954606 hotfix, I attempted to configure the RS instance, but creating the virtual directory failed. As in your case, the virtual directory was created, but the RS configuration tool threw an error.
In my case, deleting the newly-created virtual directory using IIS manager and then rebooting the server fixed everything. I was able to successfully create the virtual directories using RS Configuration Tool following the reboot.

Resources