Hello,
I have developped a C# wpf application using sql devloper and oracle 11g release 2 which uses a local database (my pc as server) and does not connect somewhere on the internet to connect to the database.
Everything is running fine on my development pc, so I wanted to check if I can run my app on a target pc.
Let me specify that I use a config file in order to make my app read the connection string which is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="MyConnectionString" connectionString="Data Source=My-PC;User Id=system;Password=system;"/>
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
If someone is not familiar with config files, let me explain that it's the same as if I were to do this:
string oradb = "Data Source=My-PC;User Id=system;Password=system;"
conn = new OracleConnection(oradb);
So, what I did was:
-Open sql developer, pressed tools>databae export and exported everything, including data
-On my target pc I installed oracle 11g r2 so the target pc can run as server (same as my development pc)
-I copied the .exe and Oracle.DataAccess.dll which I use on my development pc to the target pc on a folder(.dlls and exe are on the same project of course)
-Through code I run the exported .sql script which was generated from sql developer.
So after this on my target pc, I edited the config file and replaced "DataSource=My-PC" with "DataSource=Target-PC" and I tried to open my application, but I received the error ora 12514 as soon as the app tried to run the config file. Even the .sql script could not be run if my connection string is Target-PC and not My-PC.
The weird thing is that if I let my DataSource to DataSource=My-PC because those 2 pc's are connected via lan, I can see the database alright and the .sql script can be executed too from the target pc, but if I change it even to XE I get this error.
What I really want to do is to be able to distribute my application along with my database structure I have formed on my developing pc and install it to other machines which will use my database structure,sequences,tables,etc to run the application alright localy on their pc(so I guess their pc will be the server). I am not interested in connecting to a database hosted on the internet and let all computers connect to the database. I want every pc to be a server which will use the exact same database I have formed and plays along with my application.
Thanks in advance!