migrate sdf file to sql server - asp.net-mvc-3

I created code first approach application mvc and it created sdf file db. Now I want to migrate that sdf file to sql server.
When I double click on sdf, It says message like This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine.
I want to migrate,sync data to sql server of any better approach for future, how can I migrate db?

A possible reason for the error message is that you do not have the correct version of SQL Server Compact installed on your development machine.
The current version is 4.0, but your application might still be using 3.5. Find out which version it is and check the folder C:\Program Files\Microsoft SQL Server Compact Edition to see if there's a directory with that version name. If there isn't, download and install it (3.5, 4.0).
If you are using SqlCE 4.0 and Visual Studio 2010 Pro or higher, you can migrate the sdf's structure and data using ErikEJ's SQL Server Compact Toolbox 3.3.0.4 which is available through Visual Studio's Extension Manager.
After you have installed the Toolbox, the migration steps are as follows:
Using the Toolbox, connect to your sdf file within Visual Studio.
From the context menu, choose Script Database > Script Database Schema and Data (do not choose Script Database Schema and Data with BLOBS). This will save one or more '.sqlce' script files, depending on how large your sdf is.
In your SQL Server instance, create an empty target database.
Locate the SQLCMD.exe of your Sql Server installation. For SQL Server 2008 it typically is at C:\Program Files\Microsoft SQL Server\100\Tools\Binn. Open a regular cmd.exe with administrator rights and navigate to the directory containing SQLCMD.exe.
From there, execute:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename].sqlce
If you have multiple sqlce files, you can reference them in the same command like this:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename_0].sqlce -i [full path][filename_1].sqlce -i
[full path][filename_2].sqlce
The server option -S needs to be a capital. Good luck.

Related

SSIS Visual Studios 2019 . Oracle Connection . Manual package execution via DTExec

Problem: Hi SO community. Trying to execute a VS_2019 package that I can execute while in BIDS. Ran though all the specs including converting the package to
1) Package deployment mode
2) Converted the package to run in 32-bit mode
3) Finally, creating a config file to store the Oracle server credentials in
using this url: https://www.sqlservercentral.com/articles/how-to-execute-an-ssis-package-from-the-command-line-or-a-batch-file
4) Build the project no issues ; i.e. zero erros.
What I have tried:
"C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\DTExec.exe" /file "C:\Users\name\Desktop\SSIS_Local\JDA_Test\bin\Development\OrderAccuracy.dtsx" /config "C:\Users\name\Desktop\SSIS_Local\JDA_Test\JDA_PackageDeployment_Config.dtsConfig"
AND
"C:\Program Files\Microsoft SQL Server\150\DTS\Binn\DTExec.exe" /file "C:\Users\name\Desktop\SSIS_Local\JDA_Test\bin\Development\OrderAccuracy.dtsx" /config "C:\Users\name\Desktop\SSIS_Local\JDA_Test\JDA_PackageDeployment_Config.dtsConfig"
and both give me the error: The SSIS runtime version 15.0.2000.5 is too low for this Oracle connector. Please install a newer version of SSIS (later than SQL Server 2019 RTM).
End Error
Finally: internals of config file are:
SERVER=0.0.025.183:1521/DB;USERNAME=PB;WINAUTH=0;data source=0.0.225.183:1521/db;user id=pb;password=kuttp8x2bRRE;
So any help or direction would be great. Please feel free to ask any further questions.
I'm NOT even connecting to a SQL Server 2019. My source is Oracle. And my destination is going to be a flat file. This data will go into Snowflake database. But ETL tool used to connect to Oracle is SSIS.
Solution was to install the latest SQL Server 2019 update located here:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F4548597%2Fcumulative-update-4-for-sql-server-2019&data=02%7C01%7Cv-sagkal%40microsoft.com%7C69a0e5d79ceb4ae3e20608d7daec4509%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637218580624686059&sdata=4avejidj69V2tJoQ5CWAaqIX9SCaHohWD%2F4we5hEGsg%3D&reserved=0
Package now runs with both 32-bit and 64-bit DTSExec versions. Password for source is stored in a config file and solution is on 'package deployment mode' .
Solution for anyone who runs into this issue in future.

Oracle ODAC 18.3 for Windows Server 2019 Installation Errors

I am trying to install Oracle ODAC 18.3 on a Windows Server 2019 Standard so that I can create a data source connection to an Oracle database from a SQL Server 2019 instance, either by using Polybase or a Linked Server connection. The only components that I need installed are the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP. During the Perform Prerequisite Checks stage of the install, there are errors.
The errors are as follows:
PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ on nodes ""
Please select a different work area for the framework
[hostname] : PRKN-1014 : Failed to execute remote command "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\\exectask.exe" on node "[hostname]". Failed during connecting to service
[hostname] : Failed during connecting to service
Notes regarding error message above. [username] refers to my username that I am logging in with to Windows. It is an Active Directory account. [hostname] refers to the computer name that I am trying to install ODAC on. Also, I have tried installing this a few different times, all with the same error messages. On the second and third time installing I verified that during the installation the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory is getting created, so this should not be a permissions issue.
In the PRKN-1014 error message, I did notice that there is an extra backslash in the path, CVU_18.0.0.0.0_\[username]\\exectask.exe, so my suspicion is that there is an issue with the installer not being able to identify the correct path to find the exectask.exe. If I traverse to the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory I indeed find the exectask.exe file.
I have found a few different solutions online for others that worked for them, but none have worked for me. One solution was to add in the System Environment Variables the _JAVA_OPTIONS variable with a value of -Xmx512M. A second solution was to change the Environment Variables user variables TEMP and TMP to C:\TEMP. Neither of these worked and resulted in the exact same errors. I did in fact confirm that the Oracle Universal Installer extracted the files to the C:\TEMP directory.
Any and all suggestions would be very much appreciated!
I wasn't able to get the Oracle "Universal" Installer to work, like you. However, I was able to install the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP (same as you were trying to get) using the ODAC Xcopy installer.
I downloaded the ODAC Xcopy installer from here:
https://www.oracle.com/database/technologies/dotnet-odacdeploy-downloads.html
After downloading the installer, I ran the install batch file to install those two components. An extra undocumented step is that you must update the PATH environment variable on your system to include your install location and bin folder. In my case, "C:\Oracle" and "C:\Oracle\Bin".

SQL Server 2014 and DTS packages: The specified package could not be loaded from SQL server database

I'm pretty young in BI and I'm stuck in here with some DTS packages, I have SQL server 2014 installed on 2 servers. In fact I have to execute a batch file from server1 which uses DTS packages to move data from a SQL server DB located in server2 to an Oracle db located in server1. I configured my packages locally and tried to run it with my BIDS when modifying the packages and it worked. What I really need is to just execute a batch file (with all parameters in it) to make the transfer.
The bat file is configured like this:
call myVariable.bat
"D:\...\120\DTS\Binn\dtexec" /ser SERVERNAME /U SQLUSER /P PSW /Conf "D:...\Config.dtsConfig" /sq "myDTSfile"
call resetMyVariable.bat
The error I get is:
The specified package could not be loaded from SQL server database. How can I add them to the db?
In SSMS 2014, I can't find anywhere an option to install or add dts packages to the db. Is there a way to do it with SQL Server 2014 or another solution to solve my problem?
Migrate your package to SSIS. Visit http://sqlmag.com/sql-server/coordinating-dts-ssis-migration
Or http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=169050

Installer installing on two machines

I need to create one installer which will install components on two different machines.Windows services and web services on "APP Server" and database part on "DB Server". SQL Server 2005/2008 will be already present on DB SERVER. But it may use different port than default port for sql server.
What things I will require in order to implement this ?
Thanks in advance.
It is simply a matter of bundling a SQL script with the installer and executing the script by calling sqlcmd with ExecWait.
We can run a script using a trusted connection via:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -i _SCRIPT_FILE_
Or with a SQL Login:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -U _USERNAME_ -P _PASSWORD_ -i _SCRIPT_FILE_
For performing actions on remote SQL Server engine native driver is required.In SQL Server 2005 or later the command line client is called sqlcmd.
I suggest to create 2 radio buttons:
(o) Install - App Server
( ) Install - DB Server
User select one item and appropriate components will be installed. (like .dlls, .exes, ... on app server and data files or sql scripts [also scripts can be executed] on db server).
Everything packed into single installer.
Also there should be some custom page(s) (created using nsDialogs) where user can set parameters(port, server name, name of db, path to db, ...)

Configure Oracle Sqlldr on Windows 7

I'm having a hard time configuring Sqlldr with Windows 7.
The Oracle client was previously installed by our support team.
There were no registry settings, but Sqlplus, Toad, and Plsql Developer all worked.
I copied Sqlldr from another server and put it in the bin directory of my localhost.
In my environmental variables, I defined Oracle_Home, LD_LIBARY_PATH, and ORACLE_SID.
Now, whether I call the program by the command line or ETL tool, I get:
ERROR>Message 2100 not found;
No message file for product=RDBMS, facility=ULMessage 2100 not found;
No message file for product=RDBMS, facility=UL
What gives?
P.s. It's not a path issue because I can run sqlldr on the command line (with the error)
Did you copy all the sqldr dependent files? You can't just copy over the binary only. The oracle sqlldr has dependencies to msg files it needs. i would suggest getting the client installer for the oracle client that is installed on your win7 box and have it install the sqlldr component that way you have all the dependent files and libraries it needs. Manually copying the sqlldr from aonther machine is not really supported and not advised.

Resources