Can I update my edmx w/o deleting and adding it again? - edmx

Is there any alternative ways in updating an EDMX?. So far as I notice if I got more than a 100 tables in my edmx and I update one of them in the way of Delete and Adding it again it causes lag (not responding) to my VS. If is there any other way how if not its okay.

Yes you can right click in your EDMX and click "update model from database"
then select the "refresh tab" .
Voila !

Related

Pentaho Kettle insert Error Handling of step

I am new to GeoKettle (Spoon) of Pentaho and I am currently rows from an Excel-file into my database. Now I want to avoid duplicates in my databasetable. That is why I want to insert only those rows into my database table which aren't there yet (to have only unique records in my database table).
And as far as I know, there are two ways to realize that. The first way I tried was with the Insert/Update step (I have disabled the Update functionality) and defined all the columns which have to be equal in order to insert the record or not. But it does not work. All records are still inserted into the database.
That is why I am trying to do the (according to pentaho) much faster option which is a "Table Output" with an "Update" error handling step as shown in the picture.
As shown in the picture, the arrow which is pointing from "table output" to "update" is black. But I need a red dotted one for error handling of step . But I do not know how to create this. In tutorials I often see that there pops up a little window with 2 options like in the picture:
But I do not get that popup. If I want to create a hop, I will have to mark both steps and do a right-click on one of them.
So in which possible ways can I create such a red dotted arrow? In the end, it has to look like this:
Thank you so much in advance!!
You have a problem with your setup. Or with your version of the PDI. The functionality of an error step was introduced in V4 but fully implemented for all steps around V6.
Download a fresh PDI from SourceForge. V7.1 is really a robust and stable edition. Unzip and test.
By the way, what you want to achieve is know as the CRUD pattern. CRUD for Create, Read, Update, Delete. The step doing this the Merge Rows (diff) (in the Joins family). You tell the steps which columns to check, and it produce a new column with the value identical, changed, new, or deleted. You can them redirect the flow in a Switch / Case to do the appropriate action. Further information here (V4).

How to view queries executed internally from dbeaver

When trying to DELETE, INSERT or UPDATE one more table rows inside Table editor (or by using the add, duplicate and delete buttons), i know that dbeaver executes some queries.
Is there a way to view these queries?
I tried the "query manager" button but it doesn't show them.
My question might be a duplicate because it was fairly simple to find it.
For anyone that doesn't know how to do it (although there are explicit directions how to do it in the documentation under the topic "Query Manager")
(Yup i didn't knew):
Go to "Window" in options bar
Click "Preferences"
Go to "Database"->"Query Manager"
Finally under "Query Types" check the option "Utility functions" and press "Apply"
To use the Utility function in DBeaver after 21.3.4 onwards you can find it here as below.

Database table columns missing in MySqlWorkBench

I am working with mysql workbench 5.2.47 on Mac. I have created new database, table and some columns in the table. Sometimes, when I open this database (connection is fine) in mysql workbench, it is not showing any columns that I created under the table. But, if i close and open mysql workbench multiple times, and then its displaying the columns under that table. It is not happening always, but sometimes only it is not showing any columns that I created under the table.
I couldn't any find solution or workaround what to do this to get the actual columns displayed under the table.
Screenshot for reference:
Solved! Seems like a lot of people are stuck in this odd situation.
There is an easy solution to this.
Hover abbove the "Object Info" and "Session" and your cursor will change to split arrows. Then all you have to do is drag it downward and it will reveal the hidden sidebar with Management, Schemas etc.
Enjoy!
I, personally, faced this problem only when I was disconnected from the server. So, when you try to execute an SQL query you receive an error like:
"Error Code: 2006. MySQL server has gone away."
Go to the option "Query" and then "Reconnect to Server," or simply close the connection and open it again. If yours happens to be the same case as that of mine, you should be able to get the columns displayed again.
Click the little "Refresh" icon (to the right of Schemas). Also, upgrade to Workbench 6.1.x as the 5.2 branch is no longer maintained.

MySQL for Excel Add-In, failing to append

I am using the MySQL for Excel add-in. I have been using this for months to highlight a set of data and load it into my database.
I added a new table last week, and was successfully loading data into it using the same method. It stopped working. When I attempt to Append data, I get an error dialogue box that says "Cannot Find Column 30"...which happens to be the number (and therefore) last column in my table.
Some more information:
- If I highlight this same set of data and try to write it to another table, it will allow me to (even though I don't confirm and do it). I get past the error dialogue box to the Mapping dialogue box.
- I tried writing data from the previous table to this new problem table. I got the same error dialogue box.
This tells me that the problem is not with the data set. It is with the table.
I then deleted the table, all the connections and redid it from scratch. Still the same problem.
Where is this failing? Thank you.
ya even i had the same problem, even i tried the same way u did, like deleted the table recreated everything, it did not work, finally i tried to append some random table and went to "Advanced Options" at the bottom of the append pop up
in this u will see some "Stored Column mappings" and some mappings in it, now delete all of them and hit "Accept" now u can append the table
it will work
I know this is super old but I have a solution because it just happened to me.
Try append on different table. When box pops up click 'Advanced Options'
Then under column mapping uncheck both:
(Automatically store the column mapping for the given table) AND
(Reload stored column mapping for the select table automatically)
Then goto the Stored mappings tab and delete all the stored mappings
Click Accept and then rejoice you are free of that error for life.
best -J
If Excel does not show you the "Stored Column mappings" then connect to a MySQL table not used before in Excel, then retry the Append, the mapping will be shown. Then you can follow the answer provided by user3611272.
Problem will be resolved by doing below steps:
Select any table from Table other than your target table.
Click on Append Data
Press "Advanced Options"
Select tab "Stored Mappings"
Delete your target table mapping and Accept.
it will solve the issue.

Is there a way to view past mysql queries with phpmyadmin?

I'm trying to track down a bug that's deleting rows in a mysql table.
For the life of me I can't track it down in my PHP code, so I'd like to work backwards by finding the actual mysql query that's removing the rows.
I logged in to phpmyadmin, but can't find a way to view the history of past sql operations.
Is there a way to view them in phpmyadmin?
Ok, so I actually stumbled across the answer.
phpMyAdmin does offer a brief history. If you click on the 'sql' icon just underneath the 'phpMyAdmin' logo, it'll open a new window. In the new window, just click on the 'history' tab.
That will give you the last twenty or so SQL operations.
There is a Console tab at the bottom of the SQL (query) screen. By default it is not expanded, but once clicked on it should expose tabs for Options, History and Clear. Click on history.
The Query history length is set from within Page Related Settings which found by clicking on the gear wheel at the top right of screen.
This is correct for PHP version 4.5.1-1
You just need to click on console at the bottom of the screen in phpMyAdmin and you will get the Executed history:
To view the past queries simply run this query in phpMyAdmin.
SELECT * FROM `mysql`.`general_log`
if it is not enabled, run the following two queries before running it.
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
I don't think phpMyAdmin lets you do that, but I'd like to hear I'm wrong.
On the other hand you can enable query logging in MySQL: The General Query Log
Yes, you can log queries to a special phpMyAdmin DB table.
See SQL_history.
I am using phpMyAdmin Server version: 5.1.41.
It offers possibility for view sql history through phpmyadmin.pma_history table.
You can search your query in this table.
pma_history table has below structure:
You have to click on query window just below the phpMyAdmin logo, a new window will open.
Just click on SQL History tab. There you can see history of SQL Queries.
OK so I know I'm a little late and some of the above answers are great stuff.
As little extra though, while in any PHPMyAdmin page:
Click SQL tab
Click 'Get auto saved query'
this will then show your last entered query.
I may be wrong, but I believe I've seen a list of previous SQL queries in the session file for phpmyadmin sessions
Here is a trick that some may find useful:
For Select queries (only), you can create Views, especially where you find yourself running the same select queries over and over e.g. in production support scenarios.
The main advantages of creating Views are:
they are resident within the database and therefore permanent
they can be shared across sessions and users
they provide all the usual benefits of working with tables
they can be queried further, just like tables e.g. to filter down the results further
as they are stored as queries under the hood, they do not add any overheads.
You can create a view easily by simply clicking the "Create view" link at the bottom of the results table display.
you can run your past mysql with run /PATH_PAST_MYSQL/bin/mysqld.exe
it run your last mysql and you can see it in phpmyadmin and other section of your system.
notice: stop your current mysql version.
S F My English.
why dont you use export, then click 'Custom - display all possible options' radio button, then choose your database, then go to Output and choose 'View output as text' just scroll down and Go. Voila!
There is a tool called Adminer which is capable of doing all phpmyadmin job packed in single tiny php file.
http://www.techinfobit.com/how-to-import-export-database-without-any-extra-installation/