I'm supposed to connect a .NET web service I created to a remote Hadoop database installed on a Linux machine. However, given that the Web service is on Windows, and I'm very new at this, never connected to a remote database, much less one that was located on a machine with another OS, is it possible to do this. I've heard of an ODBC driver called Microsoft HiveODBC, it seems to me like that is my best bet. I know connecting to a server on another OS shouldn't be an issue since the driver, or web service will act as intermediary.
However, is this possible, I assume someone must have done it, all I need are some specifics on how it works, if Microsoft HiveODBC works for this and if not, what else I could use. I'm also going to have to do the opposite later, but instead I'm going to have to connect from linux to an SQL Server Database.
If anyone knows anything, any guide or any sort of specifics, then I'd appreciate if they could help me. Also switching C#, or SQL Server for something else is not possible, otherwise I'd have just gone with Linux alone.
Related
I am fairly new with MS Azure and developing remote apps.
Have read and viewed some learning stuff.
I use c# as my developing language, and as I have understood, its fairly simple to develop a windows application to run on an Azure server as remote app, which users anywhere on earth can run from their pc as if it was installed locally on their pc's. But in reality, it is more like, an RDP hiding behind the app.
The problem is that a database will be running on every users pc instead on the azure server. It is suppose to be like that by design, don't ask me why.
We tend to use "ms access" for the local DB, since everyone already have MS Office.
Anyway, back to the problem. What I am wondering is, how can I make my remote application on azure server communicate with the database installed locally on user(s) PC?
I have drawn a simple figure to explain what I mean.
http://snag.gy/ybyed.jpg
Back in the days when people used Modems to connect their PC's to the tubes, this would be theoretically possible (although maybe not a good idea). Nowadays, very very few PC's are connected directly to Internet.
In an Office, a PC will be connected via the company intranet to an external gateway and the PC will not be visible to anyone outside that gateway. The same is true at home, where the gateway is the router.
It would be possible with a lot of work to allow external access (from Azure) to the individual PC, but it would not be easy to set up. Further, you would need to write a piece of software to run on the PC which will listen on the correct Port for calls from Azure, will then run the appropriate SQL queries, and return the data to Azure. You might as well install SQL Server full edition on each PC.
Even if you do that, no security professional is going to let you actually open up the ports and firewalls to the internet; it's a lot of work doing that and you might as well just install random viruses on the PC - you'll get to the same point but faster and with less wasted time.
TL;DR: Not easy without a significant investment, and your PC will probably get trashed if you do.
This is actually possible by the magic of RDP protocol :)
Azure RemoteApp supports redirection for Windows machines as documented here: https://azure.microsoft.com/en-us/documentation/articles/remoteapp-redirection/
So, once you create an Azure RemoteApp collection, you can download the PowerShell cmdlets, enter your subscription ID and then you can enable drive redirection. This results in the local disk being mapped on the remote machine. You can try it out and see if performance is good enough.
The other alternative is that the database lives in an Azure storage account, as documented here: https://azure.microsoft.com/en-us/documentation/articles/remoteapp-anyapp/ .
You should NEVER store data on the Azure RemoteApp local machine.
/cd
I'm working on a project that involves linking my C# application to a MySQL server. The server is running cPanel and the company does not allow all IPs to connect to it (although you can add host IPs to the remote list). The application will be running on Windows 8 Tablets on a 3G connection, so obviously I will not know the IPs if the devices to be able to add them to the list.
A collogue of mine has told me of a system, API or something like that that will allow me to interface with the Database via HTTP effectively bypassing this restriction.
I can provide more information if needed.
Does anyone know of anything similar to this or any way around this?
If you are using MySql 5.7 or higher, there is an experimental "lab" for allowing direct access to MySQL via a REST over HTTP interface, eliminating the need for a middle-tier server or database specific drivers.
You can download the plugin at the MySql Labs site. From the dropdown, select "MySQL HTTP Plugin" and you should be good.
Keep in mind that its part of the "MySql Labs" project, which means its experimental, probably buggy and should be used at your own risk. Think twice before using them on any kind of production server.
I have finished developing the first release of my application which uses MySQL (locally under one license and hosted under another).
Connecting the application to the hosted database works fine, i edit the connection details within my application to the hosted server details and it works fine.
However, when I try and use it locally (server:localhost etc..) i get an error stating it can not access the server. In my application, i have included the mysql DLL files, but I would prefer the user not to have to install MySQL server which is about a 100MB download (i know its quite small these days but want the install to be as pain free as possible).
I know it would be an easy fix just to add this install as a prerequisite, but i am sure there is a way to do it without this, or maybe not. Is there a script i can run which will run through and setup the server with users etc?
Any help is appreciated.
Thanks
Shaun
Connecting to a local mysql database implies there's a mysql database service running and was previously installed.
If you want a database you can distribute with your program without having to install a fully fledged database there are quite a few around such as MSSQLCE.
But otherwise, your user is going to have to install mysql on his own machine and keep it running.
Or you could use SQLLite, which is what i have had the best experience with so far.
It should be easy to refactor your Program to use this, and it takes no user setup to use it.
Hope this helps :)
I created a C# application that uses .mdf database and it works perfectly on my PC.
Now i wanted to install that application on network PCs that can connect to a single database and use that data.
I tried changing the connection string in application with only changing file path, but it doesn't work. How can i use one PC as server and use program as client application that can connect over network. How do i set up SQL server on that PC, and should i do that? How is this done? I couldn't find any tutorial so far...
Could someone help me a bit.
I don't think you should be doing this, this is something that I once looked into myself. I once used a standard base unit for this same purpose and although it worked fine your not really supposed to do it.
You have to ask yourself how important the application is to the business. If its critical then this would be a real bad move for a couple of reasons :-
1) What happens if base unit hosting SQL Server dies? or is switched
off. Your unstuck.
2) You will only be able to schedule backups of the
SQL Server Database on the local hard disk . If the Disk dies then you
will lose everything.
When all is said and done, for the scenario that you are presenting, a MS Access database is probably a cleaner way to go. Access databases, albeit dated, can be hosted on a shared network space and can be accessed by multiple users. ADO.NET is nt too bad and you can still use LINQ with Data Tables etc.
What your looking into doing in your description wont really be fruitful unless your hosting the SQL Server on an Actual Server, as its designed for.
Some people suggest using using SQL Compact, but that itself is designed only to run from a local machine.
Hope this Helps.
#Milan: Go to the SQL Server configuration manager and enable TCP/IP service for SQL Server. As sql server uses TCP/IP for communication.
This link will help you.
http://kristofmattei.be/2010/06/21/enabling-sql-server-2008-r2-access-over-network/
I'm hoping someone can help me. I recently started the development of a windows form application connecting to a remote sql server database. I was happy enough developing it until a potential client queried if they would be able to buy the whole application but they do not want the application connecting to the db via the internet.
I predominantly develop websites using php/mysql but migrated to c# for this particular project. I'm familiar with sql but not sure what database I should be using if the client wishes to have the whole application on their own computer. I've considered providing the database install as a pre-requisite when publishing the app (although I'm currently not sure how to do that) but I'm having reservations whether that is suitable or could lead to more problems. I want to create an application that can install to a single computer and has little to no need for administration. Could someone advise the best way to approach the data storage in this instance.
Because you have already a SqlServer database operating on your remote site, the best path should be to use the LocalDB version of SqlServer Express 2012. See this link about deployment.
If you don't use stored procedures, views and triggers then also the SQL CE could be an option, but you will not have file binary compatibility and you should work on importing your schema and data.
SQL CE is a compact light weight way of going..
http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx