Permission to save database [duplicate] - sql-server-2008

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Saving changes after table edit in SQL Server Management Studio
I need to make changes in a already made database, but SQL is refusing my request. Something about preventing changes that require the table to be re-created??
What to do?

This is an option in sql server management studio. It is not a permission issue.
To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

Sounds like you've run into the following error when trying to alter a table structure via SSMS...
This is just a safety precaution in SSMS...read this article to learn how to disable it. Or better yet, manually script out the DDL changes in TSQL and add in some error-handling and reverse-changes logic.

Related

Run bash script after update table in mariadb [duplicate]

I'm currently writing my Main Assignment on my last semester at my study (IT-Engineering with Networking) and currently working with MySQL.
My question is: Is it possible to execute a Shell script/Command from within a MySQL Trigger/Procedure? Or can it be done from a CASE statement?
I've been searching around the internet and read that it's inadvisable to do it.
But I need a script to check a table in a database for alerts and then warn people if there is any.
If there is anyway else this could be done, then I'm open for ideas.
Any input will be appreciated :)
You can read this blog for triggering a shell script from MySQL:
https://patternbuffer.wordpress.com/2012/09/14/triggering-shell-script-from-mysql/. To summarize, two options are presented:
Polling. To improve performance, a trigger could record the change in another table which you poll instead.
MySQL UDF. Write your own plugin, and beware of security implications!
I think for your requirement just write a python/php/perl script which will connect your MySQL DB and query the alert table for any alert and accordingly show warning message on the screen or send email/sms warning.

Datagrip local database is stuck in read only

We're 2 people working with Mysql in Datagrip and both of us have the problem that when trying to apply changes to our local database after a simple SELECT statement it's read only: "This view is read-only".
It hasn't been a problem until 2 weeks ago.
In same tab we are able to apply changes to our test and production database.
We've tried everything that's been mentioned in this question:
datagrip Cannot apply changes This table is read only. Cell editor changes cannot be applied
We've also tried to reinstall mysql and datagrip. If we double click any table in the local database we can make changes that way, or through update statements.
Does anyone have any suggestions to what might be the problem? It's getting really painful.

Way to create an event to save database in mysql [duplicate]

This question already has answers here:
Automated or regular backup of mysql data
(2 answers)
Closed 6 years ago.
Is there any way to create an event in phpMyAdmin which will allow me to save database into the folder each week?
No, this isn't possible. First, phpMyAdmin is designed to be an interactive GUI, not a scripting interface with an API for you to access. Secondly, there's no way to specifically call phpMyAdmin on any kind of schedule.
If you have command-line and task scheduler (cron, systemd, etc) access, you can script something pretty easily with mysqldump. If not, there are plenty of stand-alone utilities (including some suggestions linked in e4c5's post) which you can call in various ways (MySQL scheduled task, a scheduled task running on your local machine which hits a webpage triggering the dump, and more).

Error creating a subscription and/or schedule - EXECUTE permission was denied on the object

Trying to create a subscription and/or schedule in reporting services. I keep getting this error when I click ok. What's wrong?
I actually asked this question so I could answer it since it was such a pain.
In my case, we had migrated the reporting databases to a new server several years ago. Everything worked and we never needed to create a subscription so we never realized these features weren't actually working.
I found the answer here:
How to: Create the RSExecRole
When we migrated, we created the RSExecRole on master, so most features worked, but apparently we had neglected to create the role in msdb (which is what is used for the job scheduling etc.).
I followed the instructions and everything worked, with one caveat. That link is missing one critical piece of information, which is that after you add the RSExecRole to master and msdb, you need to add them as Roles to the NETWORK SERVICE, or whatever account you have running your reporting server.

SQL Server migration to mySQL, tips & potential issues? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm looking into whether a move from SQL Server is a viable option. To help me with this decision, I have some questions:
Is it possible to use asp.net membership on a MySQL server ?
Are there many/any useful tools to migrate tables/databases/etc and which ones are the best?
What are the Main disadvantages in moving to MySQL from SQL Server?
As it stands I have a large enough project but it doesn't avail of many MS features so if it's possible I'd like to move.
My company did this a couple years ago with a pretty big project. On thing that made it easier for us is that we mostly used very plain standards compliant SQL. No Linq, no Entity Framework, only a little T-SQL, and only a few stored procedures.
As far as getting your data into MySQL, We ended up creating our own tool for doing this. None of the existing stuff including "MySQL Migration Assistant" can anywhere close to being fully functional. Once you can recreate the schema on MySQL, Getting the data back in, is a matter of exporting to CSV and importing with LOAD DATA INFILE. Tranferring the schema was actually the hardest part. With so many tables, we couldn't just do it by hand. We wrote some code in .Net by starting off using this VBScript that we found, and upgraded it to use the tools in "Microsoft.SqlServer.Management" Namespace available for .Net.
For functions that exist in SQL Server but don't exist in MySQL, such as GetDate, it's easy enough to write your own functions in MySQL that map to these functions, instead of trying to find all the instances of this stuff in the code. There are quite a few syntax differences between MySQL and SQL Server, even with just using basic SQL. For instance MSSQL allows DELETE TABLENAME WHERE ...., but MySQL insists you use DELETE FROM TABLENAME WHERE..... That's just one, there are many other differences.
Anyway, it was quite an adventure, but it worked out well for us. It is do-able, but you have to be committed, and not be afraid to write your own migration tools.
Couple of things off the top of my head.
MySQL doesn't support CHECK constraints. Usually, if your dbms does support CHECK constraints, your tables use them.
Depending on the constraint, you might be able to rewrite it in one of these ways.
As a foreign key to a new table
As a trigger
As a daily (or hourly, whatever) exception report
As a module in application code (which could be part of an exception report)
Something else I haven't thought of.
MySQL's timestamps have a resolution of one second.
Microsoft has a SQL Server Migration Assistant but, naturally, it is designed to help users move in the other direction.
You may want to check out this whitepaper from the MySQL site (you'll need to register - I did not, so I don't know how valuable the paper will be compared to the knowledge you already possess):
http://www.mysql.com/why-mysql/white-papers/mysql_wp_mssql2mysql.php
There are also some products and guides that can be found with a fairly simple search, e.g.
http://www.spectralcore.com/fullconvert/tutorials/convert-mssql-sql-server-to-mysql.php
http://www.haidongji.com/2009/02/23/moving-data-from-sql-server-to-mysql/
I don't know that the ASP.NET Membership can be ported directly to MySQL but I am confident you could replicate its functionality (it is more a question of how much effort it will take, not whether or not it is possible).