How to connect to oracle 9i database from excel? - excel

I am working on oracle database.
I am using toad for that.
DB is in remote location say in IP 198.0.0.0
with user name as 'aaa' pwd as 'xxx'
I want to connect my DB to excel.
So that I can run query and get the results directly in excel.
Can I do that in excel 2003.?
If I can do, how to do connection.
I tried with Data - > Import external data - >New database query
It is not working
Thanks for your help,
I did googling.I didn't get help

You need to have an ODBC data source set up already and use that as your data source in Excel. The ODBC connection in turn points to your database. Of course this all assumes a properly installed Oracle client which is sounds like you have if you are able to use Toad, login and issue queries and see results.

Related

Connecting an Access Database to Excel using an OLEDB Connection

I am wondering if anyone can help me? I have no real clue on how to do what I am attempting and I am just guessing based off the bits of information I have.
We use Microsoft Access to pull information out of our Trading program, we set this up via a DSN using an ODBC Connection.
We then pull the information out of Access into Excel. We have always gotten data from the Access databases as a Connection rather than a query if that makes sense? This way we can keep amending the Connection String and The command text to suit where as if you get the data via a query the options are greyed out in the connection properties in excel (I hope that sentence makes sense)
I need to add a second connection to an excel workbook, to get queries from two different databases, however I am struggling to create a connection from scratch, where for the last 12 years we have just been amending an existing connection and saving the spreadsheet under a new name no one here knows how to create a new connection.
I have tried the following > Get Data > From Database > From Microsoft Access Database
This imports but I am unable to change the SQL command text so its no good.
I am trying to add a connection via OLEDB using the following Connection String
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Database\Dormant Accounts.mdb;Driver={Microsoft Access Driver (.mdb)};*
But I am getting the error Details: "OLE DB: Could not find installable ISAM."
Microsoft Access Database Engine 2010 is installed, I have been googling all morning trying to find answers to this question but I am having no joy, Does anyone have any ideas how I can get this to work?
If it helps, the connection string we always copy and amend from is the following
DBQ=C:\Database\Revenue Report.mdb;DefaultDir=C:\Database;Driver={Microsoft Access Driver (.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;*
The only changing variable would be the file name, this works but I have no idea what the provider is or if this was even set up as an OLEDB connection.
Any help would be greatly appreciated, please let me know if you would need any more info

How to create a live excel connection to Redshift

I want to be able to connect excel with redshift.
So when I refresh this live connection in excel, it will refresh the query I write in redshift and return the newest result in excel.
I used to do it in a SQL Server using a stored procedure, and connect SQL Server with Excel using legacy wizard (under the get data option in data tab) - in the connection I specify the stored procedure, so every time I refresh Excel, it will fetch the updated result from SQL Server.
But now the company is using db visualizer to connect to redshift. I am not sure how to use the wizard to connect to Excel; do I need to use VBA? Any tips are welcome!
dbvisualiser is just an IDE that can point to redshift. it has no bearing on what you are trying to achieve.
you need to set up a link from excel through ODBC to Redshift. for that you need you redshift
host name
port
user name
password
You would also need these things to connect through dbvisualiser
to get connected - you could follow the instructions here
https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html

how to use different database with same table structure in typed dataset xsd

I'm confused how to explain myself well here is my scenario.
I have a database named "database1" and i have used typed dataset in visual studio and have added more than 200 stored procedures in the table adapters.
it is a desktop based application. now i want to deployee the same software in other school same database but i have changed the database name
when i generate new database from query and write all the stored procedures in the database and change the database name in the connection string it doesn't work.
I'd recommend you don't change the database name, or if it's something specific to the first client (like ParisTechnicalCollegeDatabase), change it now to something generic (SchoolManager) so you never have to change it again. There's no specific problem I can think of regards reusing a typed dataSet on a different database: I do it daily on database that aren't clones of each other. Ensure your second server is set up with a user and default schema that is specified in the connection string. The problem will eithe per be faulty connection string or incorrect database setup, not the fault of the dataSet
For more targeted help, post up the error messages that appear when you try to run your app on the new database

Change PivotTable data source without validating the connection

I've developing a solution for a client that includes an Excel template with a PivotTable. The PivotTable's data source is a query against a SQL Server. Before I send the template to my client, I'd like to change the connection string to reference my client's SQL Server instead of my local server. The problem is, that connection string doesn't work on my computer, so Excel throws an error when I try to edit the connection and won't save the new connection string.
What's really frustrating about this is that I somehow did this successfully about a week ago, but can't remember how. I have a version of the spreadsheet that I successfully created with the external connection string. Unfortunately, I had to make a change to the query, and trying to make that change to the existing spreadsheet results in the same problem -- Excel tries to connect to the data source to validate the query, and fails to do so.
How can I change the connection string without Excel trying to refresh the data? I know it can be done, because I've done it, but I have no idea what I did!
You will be able to suppress the auto-refresh by setting the .EnableRefresh = False property of your PivotCache.
However, you will need to somehow reset the property to True upon start of your spreadsheet or delivery to the client, else the pivot table won't be able to refresh at all.

Accessing MySQL DB into Excel 2010 powerpivot

I have a MySQL DB on hostmonster.com and I am trying import data in excel powerpivot, but having hard time connecting to it.
Does anyone know if Excel powerpivot can even connect to MySQL?
Error I am seeing
Unable to retrieve list of databases. Reason: Failed to connect to the server. Reason: Login timeout expired
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
Named Pipes Provider: Could not open a connection to SQL Server [53].
I was looking for a way to feed data into MySQL (I know, there are better ways...) when I found this. So I was able to connect via odbc to Excel and using PowerPivot 2010 I was able to create a connection from MySQL to PP just fine. Here are the steps I took:
Select "Get External Data from Other Sources." (It's the db symbol to the right of "From Azure DataMarket.")
In the Connect to a Data Source table import wizard that comes up, select "Others (OLEDB/ODBC)"
Now it wants your connection string to your MySQL box, click on "Build." This brings up the "Data Link Properties" dialog, select the "Provider" tab, then the "Microsoft OLE DB Provider for ODBC Drivers." Select "Next." Now on the "Connection" tab, select "Specify the source of data: - use data source name: MySQL. (if you don't have this, you did not install the MySQL ODBC drivers.)
Click on "Test" and this should succeed if you have your user and password to MySQL correct. Now the "Connection String field is populated: "Provider=MSDASQL;Persist Security Info=False;User ID=root;DSN=MySQL" is what mine was.
The next step was a big one for me. The dialog says "Choose how to import the data" but when I selected "Select from a list of tables and views to choose the data to import" it could not find them for some reason, I selected "Write a query that will specify the data to import."
This brought up a query window and I added "select * from MySQL db.table_Sample
LIMIT 0, 1000"
It validated my SQL statements and imported the data. Very cool.
Try testing the connection trough windows "ODBC Data Source Administrator" first. I'm also having problems with PowerPivot specifically, but using normal Data Connection in Excel -does- work. You could also try that.
EDIT: Just found out that most PowerPivot connection issues get solved by falling back to an older MySQL ODBC driver. Version 3.51.30 does the trick. http://dev.mysql.com/downloads/mirror.php?id=406107
Credit where credit is due: http://www.joyofdata.de/blog/how-to-set-up-powerpivot-and-make-it-talk-to-mysql
I'm not familiar with powerpivot, but here is a link to the ODBC drivers for MySQL DB. Once installed I know you can connect to a MySQL database from Excel. I'm guessing powerpivot is the same. http://dev.mysql.com/downloads/connector/odbc/5.1.html
I've tried the same approach without success. Specifically:
i set up an ODBC connection to MySQL
PowerPivot seems to be able to see it when i use the Build wizard, and
connection test succeeds
when i go to import (via "Select from a list of table"), it fails with
an error in the SQL syntax (which of
course i didn't write).
So something's wrong somewhere under the hood.
Depending on what version of Windows you have, did you also go into Control Panel, administrative tools, data sources (odbc) to add the new MySQL driver you installed?

Resources