Microsoft says that DMV (ring buffers) doesn't work on SQL Server 2017, only 2019:
Sys.dm_os_ring_buffers DMV has been a key DMV used for monitoring SQL
Server by built-in tools as well as third party monitoring utilities.
When SQL Server 2017 was released on Linux, unfortunately this DMV did
not return correct CPU usage information by SQL Server ...
I tried to fix this by submitting a patch #234 (approved but not yet committed). You'll have to edit the file ~/.local/bin/mssql-cli and replace
python -m mssqlcli.main "$@"
With this line
( command -v python3 && python3 -m mssqlcli.main "$@" ) || python -m mssqlcli.main "$@"
If you are open to using Powershell...
Assume the following table definition:
DROP TABLE IF EXISTS BillingData;
CREATE TABLE BillingData
(BillingId int, Feature varchar(13), Usage int, Measurement varchar(9), Cost int)
INSERT INTO BillingData
(BillingId, Feature, Usage, Measurement, Cost)
(1, 'Walks', 25, 'walks', 200....
MSSQL expects OpenSSL v1.0 while Ubuntu 18+ uses OpenSSL 1.1, resulting in a OpenSSL version mismatch. The solution is to symlink ssl v1.0 as below:
Stop SQL Server
sudo systemctl stop mssql-server
Open the editor for the service configuration
sudo systemctl edit mssql-server
In the editor, add the following lines to the file and save it:
sqlservr.sfp and other .sfp files installed by SQL Server are file archive files (like a tar.qz or .zip) that contain the binaries and other files necessary for things like SQL Server to run inside of the SQL Platform Abstraction Layer (SQL PAL). When sqlservr starts up either by directly running sqlservr or by starting the mssql-server service, the sqlservr ...
In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.
For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.
For Systemd, use command sudo systemctl disable mysql;
For Upstart, use echo ...
This solution works on Fedora Linux, but should work on Ubuntu as well. The issue is, that in addition to replacing initd, systemd aims to take over security functions that were traditionally handled by things like /etc/security/limits.conf. (There are other areas where it interferes as well). When systemd starts PostgreSQL, it ignores /etc/security/...
Upgrading a database with either dump/restore or pg_upgrade will not copy the configuration files, so you are left with whatever pg_hba.conf was there right after initdb created the new cluster.
You have to edit and adapt postgresql.conf and pg_hba.conf and other configuration files you use manually on the new cluster. With pg_hba.conf copying the file over ...
For every write, it must scan the 80M for any references to the table being written to, and purge those entries. This is an example of where the Query cache hurts performance, and should be completely disabled for production servers.
cause a disk flush at every "transaction". If ...
I resolved this following Kumar's comment:
I fired up fresh Ubuntu 18.0.4 virtual box installed open jdk 8 and Oracle JDeveloper without any errors. From log files it looks like self extraction is failing something to do with parameter AuthParam and what exactly is that? What happens if you try without Authparam?
Just remove the AuthParam on that file. ...
So the features here I do not want in a CSV are quite obvious. The ---
lines and the output data at the bottom.
To remove the output at the bottom, omit the -p parameter.
sqlcmd -S databaseserver -U "sa" -d database -p -W -Q "set nocount on; SELECT x as data, count(*) as datacount FROM location WHERE x IS NOT NULL GROUP BY x" -s "," -o output.csv -r0
This was an issue with the microsoft odbc driver, which has been fixed with Microsoft ODBC Driver 17.4
With the new release, sqlcmd and sqlsrv driver for php are able to query UDP port 1434 to ask the MSSQL Server for the port number of the named instance
Okay, the reason was that new version of mysql refuses to accept certs with the same Common Name etc.
I reissued certs for server and client using different metadata this time, updated my.cnf on both master and slave servers and now it works again.
Do not forget to login into MySQL
mysql -u root -p
and update master host details if necessary (...
You would want to query the query column of pg_stat_activity with a query like
WHERE state = 'active';
This will show the first 1024 characters of the query.
If that is not enough, raise the track_activity_query_size parameter.
Basically, chain data-modifying CTEs in PostgreSQL for the purpose. Details very much depend on the undisclosed details of your setup and specific requirements. The meaning of "random" varies wildly.
CREATE TABLE fk_tbl(fk_id serial PRIMARY KEY, data int);
CREATE TABLE pk_tbl(pk_id serial PRIMARY KEY, fk_id int REFERENCES fk_tbl, data int);
Smells like "explode-implode". This happens when you do JOINs, then collapse back via GROUP BY.
The usual cure is to first devise the minimal query to find the ids (or whatever the PRIMARY KEY is, apparently id_product) for the main table (product_shop):
JOIN ... -- only if you need to filter on some other ...
/etc/postgresql-common/psqlrc does work with Ubuntu packages.
Working example with Ubuntu 18.04 and PostgreSQL 11 from apt.postgresql.org.
$ echo "\echo This is the common psql rc file" | sudo tee /etc/postgresql-common/psqlrc
\echo This is the common psql rc file
$ ls -l /etc/postgresql-common/psqlrc
-rw-r--r-- 1 root root 32 mai 23 11:36 /etc/...
How to change the expiration date of binlog files ?
To purge binary logs prior to a binary log file or prior to a particular date, use purge binary logs statement.
To set an expiration period for binary logs, use binlog_expire_logs_seconds. I would recommend to keep this more than 2 days, whether or not you have replication enabled.
I can not find the ...
[ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
[ERROR] mysql.db: 1 client is using or hasn't closed the table properly
are a symptom of a crash and some MyISAM table(s) was open at the time of the crash.
The standard cure is to run
More details: https://dev.mysql.com/doc/refman/5.7/en/...
I have seen this error many times when installing earlier versions of MySQL 5.7. I am stunned you are still getting this error.
Prior to MySQL 8.0, some of the tables in the mysql schema are MyISAM.
Unfortunately, MyISAMtables get corrupt very easily.
EXAMPLE: The header of the .MYD file holds the count of open file handles. If a MyISAM table is closed ...
Solution! Putting this here for anyone who has a similar problem. When I altered the ph_hba.conf and added in my IP address at the end I forgot to put it in the form host all all a.b.c.d/32 md5. I had put host all all a.b.c.d md5 leaving out the /32 at the end of the ip address. I had similarly left off the /128 on the IPv6 line.
I hope this is useful to ...
Looking at the Oracle provided fixup scripts, I got the answer. The main script is orarun.sh which runs on bash.
So the following command does the trick!
PS: Remember, you need to be login as root.
bash ./orarun.sh fixup.response fixup.enable .
My windows user was not allowed to run netstat -abn as suggested in geographika's answer, but I could work around it:
By using tasklist | find /i "Ssms.exe", getting following result:
Ssms.exe 14144 RDP-Tcp#15 3 233.384 K
14144 in the example above is the PID, and when tried netstat -oan | find /i "14144"