My course requires me to connect to an Oracle database server at the university for my project. I am provided with a url (like oracle.xyz.edu) and username and password. How can I connect to the database from Visual Studio. I have only dealt with SQL Server 2008. I don't know how to go ahead with setting up the database. I tried to install Oracle Instant Client, but could not find a setup exe to install. The instant client download zip consists of a set of files. Where can I find the steps to connect to Oracle database from VS.
Do you need to use the Oracle Instant Client? Or would it be acceptable to you to download and install the full version of the Oracle client?
The full version of the Oracle client is generally what ought to be installed on a developer machine. The Instant Client is a very slimmed down version of the client that is designed for developers to distribute along with their Windows applications on machines that do not have or need any way to access the database other than via the application. As a developer, I'd strongly recommend the full version of the Oracle client if only because it includes various additional utilities like SQL*Plus and SQL*Loader.
The full Oracle client is available for download from OTN on the same page that the database is available. For example, the Oracle 11.2 client for 64-bit Windows is a 615 MB download on the OTN site.
Don't use ODBC. Use ODP.NET (Oracle's Instant Client) Oracle Data Provider for .NET. (Read technical notes in provided link.)
Related
I have been tasked with building an application for a Windows laptop that engineers can take out into the field where there is no internet access. Then, they will add data through a form and once they get back and have internet access, they can then hit a "Sync" button and send the data they collected to an external SQL Server database.
The database is SQL Server 2016 and the application is going to be a C# .NET desktop application. My question is what options are available for the database when there is no internet access? I don't really want to do Excel or Access. I really like SQL Server Compact but it seems dated. Is SQL Server Compact still relevant with the latest .NET Framework or is there something newer that everyone uses?
You could try creating a ssis package that syncs data between the offline database and live database.
The ssis package can be executed either as a sql server job that runs at intervals
or
from a stored procedure . Please find the below link on how to execute a package from stored procedure.
https://msdn.microsoft.com/en-us/library/jj820152.aspx
The stored procedure can then be called from inside the application.
I've got an internal ASP.Net application which I would like to send to someone. The problem I have is that the app is using local SQL Server database. Is it possible to have a copy of the database to the file and just replace the access to the db for the file? If yes how?
Personally, I would sign up for a free Microsoft Azure account, use the free Azure Migration tool to copy your database to Azure, then just change your web.config to point at the Azure database.
This saves having to buy any SQL Server licenses, and requires the fewest amount of changes to your app.
No, they'll need SQL Server as well. They can install a free Express edition if they're eligible for the license.
If you set up your application properly, it should be easy to replace the data layer with a portable database like SQLite, so they don't have to install anything.
I've never coded in ASP.NET, but I've been a web (PHP) developer for almost 3years now,
Problem is I've never coded in anything .NET after I completed my studies and I've never worked with IIS and MS Servers either.
I need to create a connection from an ASP.NET (VB) script to an Informix database.
google took me to this; IBM Informix connection example but I haven't a clue how to add these drivers to IIS, the IBM Informix Client SDK is installed on the server, but when I open the dialogs in IIS to add them as Handlers, I'm prompted for things I don't know the meaning of, I haven't found anything that says tutorial that is of any help and nor have I found anything on stack overflow.
I feel like an African stuck in China, what the hell do I do first and where do I go?
I have used ODBC in the past to connect to Informix, like this. If you have an Informix DBA, he will provide the values for host, server, and service. host is the name of the host machine where the database server resides. service is the service name in the services file but it actually maps to the port Informix listens. Server is the actual server.
string connectionString = "Driver={INFORMIX};host=myhost;server=myserver;service=23300;protocol=onsoctcp;database=dbase;uid=user;pwd=pass;client_locale=en_US.CP1252;db_locale=en_US.8859-1;"
OdbcConnection conn = new OdbcConnection(connectionString);
conn.Open();
For more connection string samples, see here.
To test, you can create an ODBC data source and test the connection without writing any code.
Okay, so as it turns out, I didn't find anything solid, so I went to find help in a clients office from an experienced .NET developer.
I was told to create a DSN on the server machine using ODBC, in the steps explained here
after that I referred to the DSN connection in the connection string, like this;
DSN=myDsn;Uid=myUsername;Pwd=p%W$d;
And I had to add impersonation to my asp.net scripts, as is done here using the same user I was logged in as when creating the DSN connections in ODBC
I had similar issues when trying to connect to an Informix DB from ASP.NET Console Application, but eventually found a way to connect! Here is the connection string i used that did the trick:
Database=db_cra;Host=192.168.160.207;Server=sipccx1_uccx;Service=1504;Protocol=onsoctcp;UID=MyUserId;Password=MyPassWord;DB_LOCALE=EN_US.UTF8;CLIENT_LOCALE=EN_US.UTF8;
Notes: The DB_LOCALE and CLIENT_LOCALE were the missing puzzle pieces for me. Also, "Service" means "Port" and "Server" is Informix instance name - defined in the database configuration (see: Finding Informix DB Server )
I downloaded and installed the Informix Client SDK provided by IBM and found that it comes with sample code (for both C# and VB). The path to the samples are C:\Program Files\IBM Informix Client SDK\demo\dotnetdemo\quickstart\cs
Add your connection string to the conninfo.xml file and run the file named helloworldconnect.cs as a console app to test connection. Your results will spit out into a file named "log.txt" (found in the bin/Debug folder).
BTW - I downloaded the 64 bit version of the "IBM Informix Client SDK". Trying to run it gave me "BadImageFormatException" so i had to switch my Platform Target to x64.
The SDK readme docs say it is IBM Informix .NET Provider Version 4.10.FC5 released on March 26, 2015. This link should give you a list of Windows 64 bit drivers (you will need to create an IBM account to download). On this page you can change the filter settings (top of page) to get other operating systems.
Whew.. now onto pulling data!
One more thing.. this book "IBM Informix Developer's Handbook" (https://play.google.com/books/reader?id=eprEAgAAQBAJ ) is a great resource and its free!
I Have an asp.net web service that uses an oracle database. It works when I run it locally but when I upload to the server it gives me ORA-1017. The project on the server is an identical copy of what I have on my local computer, so the password is the same. I tried to install Oracle client 11g r2 because I have been told that the other (don't know which one) oracle client converts the password to uppercase. I don't have much experience with oracle and don't know what is wrong. Any help is appreciated.
The server is Windows Server 2003 32bit, the oracle version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production . The oracle server is on another machine.
Update1:
It works now. I reinstalled the oracle client from here. I selected Administrator at the beginning, it seems it matters. There were also 2 clients installed on the server so probably that created problems also, I'm not sure. One client should be enough, it can connect to all oracle versions. This should also work with ODAC as suggested by Andy Arismendi. There is also an (confusing, at least for me) answer here about connecting to oracle that suggests oracle instant client (I think).
So the 3 packages are:
Oracle Client (3rd download link from the top)
ODAC
Oracle Instant Client
You should install only one of these. I don't know the difference between them. It seems they contain similar components.
This doesn't directly address your question but have you looked at ODAC Oracle Data Access Components? This is a .NET library you can use to access the database.
This is a good walkthrough for how to use it. http://www.oracle.com/technetwork/articles/dotnet/vs2010-oracle-dev-410461.html
Passwords in versions prior to Oracle 11g were case-insensitive - 11g upwords supports case sensitive passwords. If the server was upgraded from 10g to 11g - the passwords remain case-insensitive till they are changed.
So I'd say try changing the password.
It works now. I reinstalled the oracle client from here. I selected Administrator at the beginning, it seems it matters. There were also 2 clients installed on the server so probably that created problems also, I'm not sure. One client should be enough, it can connect to all oracle versions. This should also work with ODAC as suggested by Andy Arismendi. There is also an (confusing, at least for me) answer here about connecting to oracle that suggests oracle instant client (I think).
So the 3 packages are (ordered by size descending ):
Oracle Client (3rd download link from the top)
ODAC
Oracle Instant Client
You should install only one of these. I don't know the difference between them. It seems they contain similar components.
Anyone has any experience using application developed using Oracle PL / SQL Web toolkit and deploying it on WLS 10.3 ?
We have an old application created in Oracle PL / SQL Web toolkit which is currently hosted on OAS. The client wants us to migrate the application to Weblogic server (10.3). I wanted to know if anyone has heard of any plug-in or has any experience in doing this ?
Any pointers in this direction will be really helpful.
Thanks.
Vivek
Did some digging around this is what i found:
There are two ways of getting this migration done without re-writing the code:
Install OHS(with mod PL/SQL) using Oracle SOA Suite 10g(10.1.3.3) and use .
Upgrade HTML DB from its existing version to Apex 3.2 or higher.
Oracle Documentation says there are 2 ways of doing it: In order to run, Oracle Application Express must have access to either the “embedded PL/SQL gateway” or “Oracle HTTP Server and mod_plsql”.
With Oracle 11g documentation website confirms that Oracle HTTP server is still compatible:
“Oracle HTTP Server: Starting with Oracle Database 11g, Oracle HTTP Server is available on a separate media shipped with Oracle Database. In the previous releases, this product was available as a Companion CD component.
Note: To install Oracle HTTP Server, use the Oracle Fusion Middleware Web Tier Utilities 11g (11.1.1.2.0) media or download.”
http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/whatsnew.htm#sthref10
To set up OHS and mod_plsql this is the official guide (Downloading from OTN and Configuring Oracle HTTP Server)
http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/overview.htm#CHDCEJIE
[EDIT:] Let me add this, PL/SQL Web Toolkit & mod_plsql has NOTHING to do with Weblogic. The mod is designed to run on an Apache Instance. Oracle OHS is nothing but modified Apache 1.3. You can dare and try to install modplsql (Or its opensource version mod_owa) on vanilla Apache 2.2 instance but the risk is all yours...