alter authorization on schema::[db_datareader] to [dbo]
alter authorization on schema::[db_datareader] to [db_datareader]
alter authorization on schema::[db_datawriter] to [dbo]
alter authorization on schema::[db_datawriter] to [db_datawriter]
Let's start by making a new user called "chaminda" within the MySQL shell:
CREATE USER 'chaminda'@'%' IDENTIFIED BY 'password';
The first thing to do is to provide the user with necessary permission and here I have given all permission to the particular user.
GRANT ALL PRIVILEGES ON * . * TO 'chaminda'@'%';
Reload all the privileges.
Best answer on Stackoverflow suggesting to use RENAME USER which copy the user privileges.
Using Data Control Language (statements as GRANT, REVOKE, RENAME and so on) does not require FLUSH PRIVILEGES; and is required in architecture like Galera or Group Replication in MySQL versions having MyISAM tables in mysql database because MyISAM tables are not ...
I just had to do this recently. What Amazon recommended was using the Percona Toolkit. I downloaded it and was able to run something like:
./pt-online-schema-change h=databasenameHostName,D=databasename,t=tablename --recursion-method=none --execute --user username --password password --alter "MODIFY someColumn newDataType"
and it works great. It tells you ...
This is kind of opinion-ish, but I would put the SQL Server binaries on the slow disk. It's quite common to put the binaries on the OS disk (although some people hate that), or on a slower disk.
You definitely want to remember to put your system databases, especially tempdb, on the faster disk, however. In fact, it's also common to put tempdb by itself. ...
Replace auto with manual in /etc/postgresql/9.1/main/start.conf
Each PostgreSQL cluster in Debian/Ubuntu has a start.conf file that controls what /etc/init.d/postgresql should do.
This is documented with pg_createcluster:
The start.conf file in the cluster configuration directory controls the
I'm attempting to grep through some Mongo logs in an attempt to find slow operations that I need to optimize. Slow query logging is at the default and is logging operations over 100ms.
Rather than grepping through MongoDB logs, I would highly recommend using the scripts from the open source mtools project. NOTE: I'm not the original mtools author, but I am ...
For scheduled and ad hoc database synchronization you can use ApexSQL Diff (for object schema synchronization) and ApexSQL Data Diff (for record synchronization)
They cannot be used for real time synchronization. IMO, it's best to use database mirroring for real-time
I'd like to follow up on the pretty good answer Katherine Villyard already put up.
It somewhat depends on the intended usage of your database.
If you're expecting a lot of write operations, go ahead and put your .mdf and .ndf files on the faster disk.
If however your database is either one that is generally quite static (serving web content for example). ...
Maybe I'm wrong but the correct form is like this:
mongo --port 27017 -u manager -p 12345678 --authenticationDatabase admin
You can read about this in mongo documentation:
mysqlcheck runs a number of actions: check, repair, analyze and optimize. You're currently jumping to "repair" (-r) but should really start with "check" just to see what's going on and to see if there's any response:
mysqlcheck --check --quick user_motiva wp_options
Add "-p" if a password is needed (eg, not in a config file).
If that passes, try it ...
I would attach the files to a new database, script the table and re-create it in your active database.
First up, move the *.mdf and *.ldf files to the default database file locations. This way, they'll inherit the appropriate file level permissions.
Now, create a new database from the existing files, but using a new name:
CREATE DATABASE ...
You can use AlwaysOn.
AlwaysOn is the 'new' way to do this, and the reason DB mirroring is becoming obsolete in SQL Server.
It basically works like this:
You need to create a Windows Cluster for the Networking-aspect. Shared storage is not needed, but you will need a file-share for the instances to sync the logs (only DB's in FULL recovery can be used) ...
I found a way to do this, but I'm not sure if it's the proper/recommended way. My steps are below:
1. Save the existing configuration
Run sudo vim /var/lib/pgsql9/data/postgresql.conf and sudo vim /var/lib/pgsql9/data/pg_hba.conf and copy all uncommented settings somewhere. You'll later have to manually set them in the new PostgreSQL version.
2. Install ...
Looks like one or more InnoDB log files got corrupted.
In that case MySQL doesn't load the engine even if you don't specify skip-innodb in your my.cnf file.
A solution is to stop mysqld and delete those log files BUT be careful as you can loose your data:
Even if InnoDB were used, you could delete the ib_arch_log* files. InnoDB redo log archiving was ...
What version of MSSQL are you looking at this for?
SQL 2012 HA options include AlwaysOn solutions which leverages Microsoft's failover clustering but adds functionality on top of it. Or you can setup log shipping to create a standby database. Technically, I think you can still do database mirroring in MSSQL 2012 but that is going to be deprecated in some ...
In my experience, detach/attach is the fastest method. The bottleneck would probably be how quickly you could copy the files across the network.
Assuming the two databases have identical Windows accounts (if you're using SQL accounts you may have to update SIDs), you could probably use something like this script that I have laying around from before I ...
To reliably copy database tables, the database has to be stopped (not just flushed). If it is not, a consistent copy is not guaranteed, but is it impossible to say if and what data might be lost.
That said, if the database was not active and some time passed since the last write operation before you started the copy, it's likely the cache has been committed ...
You have things backwards. I know it's counter-intuitive, but you want the backups (especially including transaction log backups) on the fast disk, and the mdf/ldf files (with the notable exception of tempdb) on the slow disk.
You can think of it as if Sql Server keeps two representations of your data. The MDF+LDF files represent the current state of the ...
SQL Server Mirroring is part of the core engine. When you setup mirroring, SQL Server enables a TCP endpoint to support the flow of log records from the primary server to the secondary server, and to optionally connect the witness server.
Mirroring actually consists of sending log data from the primary to the secondary. Since Mirroring can be configured ...
You can set up DML triggers, use the database transaction log to read transaction (DELETE) information, use native SQL Server features:
SQL Server Change Tracking
SQL Server Change Data Capture
SQL Server Auditing
or use 3rd party tools
ApexSQL has two auditing tools - ApexSQL Log and ApexSQL Audit. There are certain advantages to using one over the other,...
I stumbled across this one, too, and the proposed solution didn't work, since the database specific privileges wouldn't be moved as well. what I did:
UPDATE mysql.user SET Host='%' WHERE Host='localhost' AND User='username';
UPDATE mysql.db SET Host='%' WHERE Host='localhost' AND User='username';
Windows has their built-in Task Scheduler which, while somewhat limited in functionality, might work for you. If you need something with a bit more configurability, I've had good luck with Visual Cron. That said, in your situation, I'd want as little unknown/un-tested/third-party software on the box as possible, so if you can make the native Task Scheduler ...
When a service dies immediately after launching with no warning, you'll have to refer to the service logs to see what's going on. Generally it's a fairly egregious crash.
Check the Postgres server logs to see what, if anything, the service is logging before it dies.
It's right where it should be, above the line starting with 'Pages read ahead'. If there is no activity hitting the buffer pool before a subsequent SHOW ENGINE INNODB STATUS\G, you have 'No buffer pool page gets'.
Run a query on an innodb table and you should see it again.
mysql> SHOW ENGINE INNODB STATUS\G SELECT COUNT(id) FROM table;SHOW ENGINE INNODB ...
There's no way to answer such an general question.
It depends on so many things, no one can anticipate. Just test it and see if you have enough performance. If you don't - you can revise your indexes, clean up some data or add RAM to the server.
Like it was suggested in the comments why not use some SQL.
sqlite> CREATE TABLE "a" (
...> "name" TEXT,
...> "address" TEXT
sqlite> INSERT INTO "a" ("name","address") VALUES ("john","paris");
sqlite> INSERT INTO "a" ("name","address") VALUES ("peter","london");
sqlite> CREATE TABLE "b" (