How to import mysql sql file into microsoft visio 2007? - sql

Does anyone know how to import a mysql sql file into microsoft visio 2007, and then generate a database chart automatically?
Thanks a lot.

I have solved it.
I just create database in mysql with sql file, and then i use reverse engineering to build a visio chart.
the link will be useful for that. here
[EDIT]: Add The content of the post.
1.Download the latest MySQL ODBC connector from MySQL site. You may find it here http://dev.mysql.com/downloads/connector/odbc/5.1.html.
After downloading install the connector.
Now open Microsoft Visio and open Database Model Diagram template (you may find it under Software and Database group).
From Database menu click on Reverse Engineer. You will see the Reverse Engineer wizard.
Click on the New button.
Select System Data Source.
Click Next.
Select MySQL ODBC driver from the list.
Click Next and then Finish. MySQL Connector/ODBC Data Source Configuration window will open.
Give a name to the datasouce, database server host, user name, password and select the database you want to reverse engineer. Remember, the list of database will be shown if you have provided correct information.
Click on Ok. Now you will find the data source in Data Source list.
Select the newly created data source and click Next. The regular wizard for reverse engineering will start.
Thanks.

Related

Visio Reverse Engineer Won't Add Data Source

I have Visio 2010 Premium, and I'm trying to connect to a SQL database. I go to the Database tab, and choose Reverse Engineer. If I choose Microsoft SQL Server, there are no data sources. I choose New... and set up an ODBC connect to the server and database. It is a successful test connection. When I get back to the Reverse Engineer Wizard, it didn't add the new data source, and I can't go to Next. It says "No valid data source is specified for connection. Specify a valid data source to proceed." If I go to New... again and set it up again, it still won't add it. I tried an ODBC connection, and OLE connection, nothing works to add the Data Source.
Can anyone help?
Use the ODBC generic data source
Try using the ODBC generic data source in order to have it appear in the Data sources list:
On the first page, select Microsoft SQL Server from the drop-down list:
Click Setup, then select ODBC Driver 17 for SQL Server. Then, click OK:
Now select the New... button (right of Data sources) to create a new source.
Go through the Create New Data Source wizard (File/User/System doesn't really matter - it's just where the definition is stored), creating a new data source, making sure to select ODBC Driver 17 fo SQL Server again when prompted:
The data source will then appear in the Data sources list.
Note: System DSNs may not be modified within Visio unless running as administrator. When not running as administrator, this message will be received:
To work around this, type 'ODBC' at the start menu, and edit the System DSN from the ODBC Data Sources tool (Visio is a 32-bit image, so use the 32-bit ODBC tool):
It can also be accessed through: %windir%\syswow64\odbcad32.exe

Migrate Fox Pro DBF files to SQL Server 2012 x64

I have among 80 and 100 Fox Pro DBF database files that I want to migrate to MSSQL Server 2012 x64.
Because are too much DBF data bases I'm looking for an automatic/non Manual way of move all data contained in these DBF files to MSSQL Server Data base Tables. One separate table for each DBF File.
I have tried the following code:
SELECT *
FROM OPENROWSET('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver;
SourceDB=F:\SomeDBFPath;
SourceType=DBF',
'SELECT * FROM someDBFFile')
in order to see/explore the data of one DBF, but the following error messages appears:
OLE DB provider "MSDASQL" for linked server "(null)" returns an error.
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)"
I'm not interesed in use external software like a DBF converter or similar tools.
At this time I have installed the AccessDatabaseEngine_X64 file located at http://www.microsoft.com/en-us/download/details.aspx?id=13255 due to previous recommedations with no success.
Thanks in advance.
Do you have access to Visual FoxPro? If so, you can via the default menu of Tools -> Wizards -> Upsizing.
First, go into Control Panel, Administrative Tools. Under that is ODBC Data Sources (should be a 32-bit version). Go into that and then go to the tab for "System DSN" and click Add button to the right. You will then be prompted to "name" the connection. For grins, something like "UpsizeMyData". It will then prompt you through the connection information to the database you are trying to connect to, user / password for connection, etc. Go through and create the ODBC connection info and make sure the "Test Connection" at the end is successful.
Once this is done, get into VFP. From the menu steps above, it will bring up a dialog window for transferring a database. It will prompt you for the database you want to upsize... pick via a "Get File" dialog. After that, it will prompt you with connection information, the ODBC connection you just created above should be listed. Select that, then "Next". It will then prompt you for the SQL password to start the connection.
Once connected, it will look though your database and look at the tables. You will have a side-by-side picker dialog of all available tables and you can pick those you want to upsize... you can do one, many or all, then click "Next".
The next dialog will show you each of the tables you've chosen and allow you to confirm the data type from the VFP table to the corresponding column data type when pushed up to SQL. You can try by letting the defaults go and try. Click "Next".
Finally it will ask you which database you want to upsize to. You can pick an existing database, OR Add a new (may be your choice for first time to see how things go).

Visual Basic using SQL Database

So this is a homework question but I'm probably missing something really simple. I am working on a project where I was given a database. I'm not in the programming part of the assignment but I have to write the test case scenerios for the project before starting the project. Because I am working with an SQL Database that was provided. I am supposed to write the expected output from the database. If the user chooses shampoo from the products menu then the different brands of shampoo should then populate in my datagrid.
Because they gave us a sample database. How do I view it? I am I supposed to be able to write the expected output if I don't know what has been pre-programmed into the database?
Thanks in advance. I have already designed my layout and I guess I'm just stuck because I have been taught to plan your output before you program that way you know the program is working correctly. I don't want to write the assignment to find my output in case I did it wrong I guess, if that makes sense.
Here is how to do it in Visual Studio 2010
To create a data connection to the Northwind database—SQL Server
database file (.mdf)
On the View menu, click Server Explorer/Database Explorer.
In Server Explorer/Database Explorer, right-click Data Connections and
click Add Connection.
After you click Add Connection, either the Add Connection dialog box
or the Choose Data Source dialog box will appear.
If the Choose Data Source dialog box appears, select Microsoft SQL
Server Database File, and then click OK.
If the Add Connection dialog box appears, verify that the Data source
is set to Microsoft SQL Server Database File (SqlClient). If it is not
set to Microsoft SQL Server Database File (SqlClient), click Change to
open the Change Data Source dialog box, click Microsoft SQL Server
Database File, and then click OK.
Click Browse to locate the .mdf file that contains the Northwind
database.
Depending on the requirements of your version of the Northwind
database, either click Use Windows Authentication or click SQL Server
Authentication and type a user name and password to log on to the
computer running SQL Server. For more information, see Add/Modify
Connection (Microsoft SQL Server Database File).
Click OK.
A data connection to the Northwind database is added to Server
Explorer/Database Explorer.
Okay, so this should be pretty straight forward then:
Download and install SQL Management Studio Express.
Attach the database.
I wouldn't normally just list links in an answer, but this one really calls for it. These are very foundational URL's and won't be moving.

How to see Tableau Custom SQL on server without downloading workbook?

Oftentimes I need to troubleshoot a workbook that another person at my company has created and published to our server. To troubleshoot, I need to see their connection details, specifically their Custom SQL, to understand what data they are using in their extract.
Is there any way to view this connection info (specifically their SQL code) when viewing the published workbook on the server (web) version?
I am an admin and I am able to download their workbook to my desktop version of tableau, then open it, then reconnect to the data, then look through the data connections they created, to see their SQL. But it's a really cumbersome process.
All I'm looking to do is, when looking at a published workbook, see the data connection details so that I can see the Custom SQL, without going through the process of downloading I described above.
You can get some details on the SQL statement by creating a performance recording.
From the Tableau Server Admin Guide:
Enable Performance Recordings:
Choose the Admin button in Tableau Server.
Choose Site.
Select a site.
Choose Edit.
In the Edit Site dialog box, select Allow Performance Recording.
Choose OK.
You start performance recording for a specific view by adding ?:record_performance=yes to
the url. For example:
http://server.site.com/views/Variety/BaseballStatistics?:record_performance=yes
Now, notice a new link at the top of your view called "Show Performance Recording".
Click this to open the generated performance workbook dashboard. Click on the bar chart and observe the SQL appear at the bottom of the view. Note, the SQL text will truncate after about 250 characters.
The admin guide suggests viewing the "Tableau Log" to find the full SQL statement.. I have looked at all the server side logs in C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs but cannot locate the SQL. (please reply if you know where to find this?)
You can also run a database trace to see the SQL that the database sees. For example, for MS SQL Server, run the Profiler tool, setup a default trace, and filter on "Application Name" = "Tableau Protocol Server 8.0" or similar.
I have version 8.1 and this is how I got around this problem. Tableau shows a 'Custom SQL Warning' when you open a workbook that contains the custom SQL. You can copy all the text in this message by simply Ctrl + C as this is any other Windows warning message. And then paste it your editor of choice to analyze it.
I do not know if this works on earlier versions.
I thought you could do this easily, and originally answered that you could, but I didn't pay close attention to your question. You can change some things about data connections without editing the workbook, including the ip address or name of the database server, but there doesn't appear to be a simple way to access custom sql without downloading the workbook.
Go to the Administrator page and select Data Connections.
You can enter some search criteria to filter the list of data connections shown (or not).
Find the workbook in question by scanning the second column -- you can sort the column if that helps.
Then select the corresponding data connection in the 4th column to see the details of the connection.
If it makes sense for the connection, you can also modify the connection directly at the server. This is really useful if you, say, need to move your enterprise database to a new IP address or change a database password, without downloading, modifying and republishing alot of workbooks.
An even better practice is to start using shared data connections hosted on Tableau server instead of having each workbook have its own local copy of connection and related info.

connect SQL to SPSS

I have table in Microsoft SQL server; and I'm using SPSS 14.1.
Now I want to connect SQL table to SPSS, so I can use SQL table from SPSS directly.
In SPSS, SQL database -> Data source -> Add New database connection -> Then I have 3 data source options only: dBASE Files, Excel Files, and MS Access Database. Which one can connect to SQL server?
You should open the Microsoft ODBC Administrator from Start or the Control Panel. There you should activate the System SDN tab, click Add... and add a SQL Server data source.
A wizard will open, where you can enter the details. First the name of the connection, which will be used as a reference by SPSS. Then optionally a description, and the ip address or name of the server.
On the next page select the authentication method, and if needed, enter the user and password. From this point, the default settings will most likely be good. If you will have character coding problems or something like that, you may need to change these settings.
I also use ODBC connection to connect to the database from SPSS, and it works well.
I hope this will help.
You may need an ODBC driver from MS or use one from the Data Access Pack for SPSS, but you will need a driver specifically for SQL Server.