I want to measure the database performance tool to identify which query is running long time, CPU utilisation and how many active connection being used.I am using MSSQL(SQL server 2008). Also I want to generate report from tool.
please help me.
You can use built in reports which helps ..
1.Right click on server -->reports-->standard reports..
2.If you want further customization,you can use Glenn Berry DMV's and generate reports out of them..
3.You also can check out SQLSentry products which we use in our company as well
4.One more option is to use stackoverflow Opserver which is open source
You can used activity monitor.
Right click on server
-->Activity Monitor.
Yo can check in Processess,Resource Waits,Data file I/O,Recent Expensive Queries.
Related
I am new to LabVIEW and trying to make a small project. In LabVIEW from one device, I am measuring some values and then need to store them in database. Initially, I used Excel to store data. But now I need to add MySQL functionality to store data and then later retrieve when need for analyzing.
I look for NI toolkit but it is expensive. I need some free and open source solution for my project.
I search over SO and google to find any examples where I can start and make it work, but I couldn't find any.
If someone suggest me some resources or having some example code that I can use to achieve my goal. thanks in advance.
Take a look at LabSQL. This works in LabVIEW 2017, allowing connection to a MySQL database without NI's LabVIEW Database Connectivity Toolkit.
I normally use the Database Connectivity Toolkit, but I did confirm I could get this to work in 2017 as well (though connecting to a MSSQL database instead of MySQL).
The only thing that tripped me up at first was not using the Create Connection before Open Connection (because I was used to the aforementioned toolkit). I didn't try anything complicated; I just ran a simple selection query. But it looks like everything should work pretty similarly to the toolkit. As adambro said, if you have a more specific question, maybe we can help with an answer.
I would suggest you could use SQLite. It is a fairly easy toolkit. You can download it via the VI package manager. By dr. James Powell. SQLite is excellent in storing data locally.
Use the SQLite browser from sqlitebrowser.org.
Also a nice way to learn SQL!
I am using MySQL DB for my android application. I have installed phpmyadmin on my Ubuntu LAMP server and using it to access my DB. Is there any possibilities to access the DB using MS access 2010, as I need to do perform modifications on a regular basis to my DB
If the aim is to change the data and not the structure, using MS access is a good solution, as you can edit anything in linked tables very efficiently with litlle setup efforts.
To achieve this, first you need to download and install the MySQL ODBC driver.
In order to avoid issues, I advise you to install the 32 bit driver, even if you're on a 64 bit system. The 32bit will work flawesly, which is not always the case of the 64 bit.
Once installed, open the ODBC control panel and add an entry pointing to your MySQL database
Then in Access you can add linked tables using this ODBC entry
Once the table are linked, they will behave as if they are MS access tables and you can open them and edit data, and much more.
You can use Microsoft Access as a front-end to your MySQL database.
Refer: MySQL Documentation
But for your case, directly accessing database is wrong. I suggest better you have a view page with php to update DB with proper required validations.
The answer by Thomas G does an excellent job of describing WHAT we need to do, and even provides some good links.
What we need now is a good, step-by-step description of HOW to accomplish all the steps Thomas G describes.
I've been looking for this for a long time, and still no luck. However, I'm possibly on the track of getting that answer, and if I find it, I'll come back here and post it.
Note that I'm not asking about how to send multiple SQL statements in one request to the DB server.
I've worked with SQL Server Management Studio for a while. And I liked how you can have a lot of SELECT statements in one .sql file. And if you pressed F5, it will run your SELECT statements independently and multiple result sets will be presented to you. Is there something like this for MySQL?
With all of the MySQL clients I've tried. One tab is limited to 1 SQL statement. You can write multiple statements, but you can only run only one of them at a time.
I tried SQuirel, HeidiSQL, MySQL Workbench CE, dbeaver. Right now I'm stuck with the free version of SQLYog. Each all have great features. But not one has this feature I was looking for.
Edit:
Thanks to Aishatter for suggesting Toad for MySQL. I made a screenshot of it showing the feature I was looking for:
imgur screenshot
It can even remember previous executions, this is the "Set 6" and "Set 7" as seen in the screenshot.
Edit2:
Toad was too slow for me. And so I ended up with SquirrelSQL which also has this feature I'm looking for, but note that I think this is only present in their latest snapshot build - 20150623_2101
Have you tried Toad for MySQL?
It is works a charm. Like a MySQL on a SQL Management Studio.
You can execute multiple queries at the same time. With a feature of query formatting.
Yes.
Here you go HEIDI MYSQL
http://www.heidisql.com/download.php
This is one of the finest tools I have been playing with since last 4 years.
do you have any tips for some GUI applications (free) that are capable of debugging MySQL stored procedures?
I tried devArt dbForge MySQL Studio which worked just fine, but it's not free.
Thanks for any tips.
Unfortunately, there don't appear to be any free alternatives.
There is Illatis Stepin - an Eclipse-based IDE for debugging stored procedures. Price is $40 per licence. There is also MySQL Debugger, $50 per head. However, MyDebugger are offering licences if you have a blog - you get a license in return for blogging about the product.
Is the debugger for use in an open source project? If so you might try contacting the publishers to see if they will grant you a license, perhaps in return for a mention on your project page.
If it's for commercial development, you might try getting approval for the $40-50 license fee. The debugger could potentially save you hours of time, and so will almost certainly pay for itself within the first year, if not quicker.
If neither of those are options, you might setup a small blog and try to get a free MyDebugger licence!
MySql Connector/NET starting v6.6 has support for debugging stored routines using visual studio debugger look & feel, it's also open source (dual license GPL/MySql).
To download it here: http://dev.mysql.com/downloads/connector/net/6.6.html
For documentation check here: http://dev.mysql.com/doc/refman/5.0/en/connector-net-visual-studio-debugger.html
SQLYog Community Edition might be able to do this sort of thing
http://www.webyog.com/en/downloads.php
I would recommend trying phpmyadmin.
Recent versions have a "delimiter" field separate from the SQL window that can be used to assist in generating stored procedures.
I am not certain that phpmyadmin has features specifically designed to help you sort out what is wrong with your stored procedure, but it does have a helpful "two window" mode for debugging sql generally (look for the "show this query in a new window" and then once youhave the new window be sure to click "do not overwrite this sql" checkbox. That will let you edit the query in one window and see the results in another.
HTH,
I'm late to the party, but brought more beer:
http://ocelot.ca/blog/blog/2015/03/02/the-ocelotgui-debugger/
and
https://github.com/ocelot-inc/ocelotgui
I tried, and it seems pretty stable, supporting Breakpoints and Variable inspection.
It's not a complete suite (just 4,1 Mb) but helped me a lot!
How it works:
It integrates with your mysql client (I'm using Ubuntu 14.04), and after you execute:
$install
$setup yourFunctionName
It installs a new database at your server, that control the debugging process. So:
$debug yourFunctionName('yourParameter')
will give you a chance to step by step walk your code, and "refreshing" your variables you can better view what is going on inside your code.
Important Tip: while debugging, maybe you will change (re-create the procedure). After a re-creation, execute: $exit and $setup before a new $debug
This is an alternative to "insert" and "log" methods.
Your code remains free of additional "debug" instructions.
Screenshot:
Definitely take a look at mySQL Debugging tool
I am a .NET developer with average SQL skills. I am working on a web app that is 'database heavy'. I have been using the profiler to debug queries and procs. Is there a way to use this tool to look at performance of a query / procedure.
How do I make the most of the SQL Profiler?
I am using SQL Server 2008.
There are no hard and fast rules per say as it depends on the type of database system your a working with.
As a general starting point with SQL Server performance tuning you will find the following reference to be very useful indeed. It contains a variety of considerations and instructions.
http://www.brentozar.com/sql-server-performance-tuning/
Also take a look at the following article, "Identifying Performance issues using SQL Server Profiler"
http://vyaskn.tripod.com/analyzing_profiler_output.htm
If you need additional assistance just drop me a line.
I am not familiar with sql serer 2008, but in sql server 2005 your best bet is the "Display Execution Plan" feature. I will let you know what parts of your query are taking up the most time. Typically adding indexes will help immensely and this tool will help you identify where they are most needed.
Its a wonderful and powerful tool. But be careful and don't do the following"
1) Don't Capture Everything. You can have so many events/objects that you won't be able to find anything. You can set filters by app/user/database.
2) Don't run profiler on the production machine.
3) Don't save the trace info on a production database. Save it to a file that is stored separately from production files.