All Questions

1
vote
1answer
52 views

nvarchar(max) in Included Columns of NC index

Would adding nvarchar(max) to the included columns of an NC index that has one nchar(16) column key column cause rebuild issues with 20+ million rows? By "rebuild issues," I mean taking a very long ...
0
votes
1answer
225 views

Database is not reflecting in sh.status()

I have a 2 shard (s1 and s0 )servers with repl set. s1 has 2 dbs (db-A and db-B) and one of the db is sharded (db-B). When i do sh.status() from mongos only (db-B) is displayed. I am wondering what i ...
0
votes
0answers
3 views

InnoDB: does `redo log` contain initial value and final value? or just final value?

start transaction; update users set age = 34 where user_id = 3 // update age from 30 to 34 years old. .... .... when I am updating the age of this user, InnDB will write redo log. What's the ...
0
votes
1answer
7 views

The merge process could not connect to the Publisher ' '. Check to ensure that the server is running. (

I have 2 servers with 2 kinds of replications between them. One is Transactional and the other is merge. The Transactional replication is working fine but in the merge replication, I'm getting error ...
0
votes
3answers
1k views

How do I do a join and exclude certain records?

Table STUDENT has columns ID, LASTNAME, FIRSTNAME Table TEACHER has columns ID, TEACHER_ID, STUDENT_ID Students can have many teachers. Teachers can add students to their class. I want to be able ...
0
votes
1answer
246 views

Does Percona Xtrabackup support RedHat release 4

I downloaded Percona's Xtrabackup rpm file for RedHAT. I attempted to install but hit into an error. The error seems to point to missing dependencies and libraries. I have no issue with RedHat 6 OS. I ...
0
votes
0answers
5 views

MySQL: why undo log is required in the processes of database recovery?

Let's imagine that an incident happens when you updates. start transaction; update users set gender = 1 where id = 3; Undo log space is allocated. Previous values are copied to undo log Record of ...
1
vote
1answer
225 views

sync_binlog different for master and slave

Is it fine if sync_binlog is different for master and slave? For my system I can see master has sync_binlog=1 and slave has sync_binlog=0.
2
votes
1answer
44 views

Extreme performance loss due to moving from Mysql 5.7.23 to Mysql 8.0 (status, config included)

Been sitting on this for 12 hours straight (it's noon now, so I will read/respond when I woke up again). I have made the big fault of recommending a database upgrade of our productive environment to ...
0
votes
1answer
244 views

SHOW tables returns empty set, but MYI.Crypt files are there

Something really weird happened to my VPS last week. Suddenly, MySQL stopped working. My VPS has CentOS 6 and uses Parallels Plesk. After this, Parallels Plesk stopped working, and trying to start ...
0
votes
0answers
8 views

Very high (99%) insertion cost in estimated execution plan

I have four tables with 500,000 to 4,000,000 rows. The script joins them and insert into a temporary table with some where clause. It is taking long. The execution plan shows 99% cost only for the ...
1
vote
1answer
222 views

Chunks not splitting on MongoDB sharded clusters

I have created 2 shard servers named rs1 and rs2. Now in the database collection there are multiple records those should split on these 2 servers in chunks. The sharding key is TxnMonth. It is not ...
-1
votes
1answer
23 views

Postgresql - LEFT JOIN error

Apologies ahead of time for the novice question as I am working through building my first database. I've come to joining my tables (I have multiple), but have decided to test one first. I am trying to ...
1
vote
1answer
7 views

SQL Server 2016 Standard or Enterprise for SharePoint 2016

I know that for SharePoint 2016 version we can go for either SQL server 2016 standard or enterprise. But just wanted to know are there any disadvantages of going for SQL server standard edition ...
0
votes
0answers
11 views

Error Code: 1845. ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY/INPLACE

I upgraded to MySQL 8.0.13 and tried to add a new field using ALGORITHM=INSTANT but got the following error: Error Code: 1845. ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=...
1
vote
2answers
573 views

Export SSRS report to CSV

I would like to export an SSRS report to a CSV file. Sounds simple, but I do not know how to add double quotes to the column headers in the exported CSV file. For example: "UserName"|"UserAdd" "Mike"|...
3
votes
2answers
2k views

PostgreSQL use NEW in query for INSTEAD OF trigger

I'm having trouble getting an INSTEAD OF trigger to work correctly, and I think I've misunderstood how to use NEW. Consider the following simplified scenario: CREATE TABLE Product ( product_id ...
1
vote
0answers
17 views

Same query hash for totally different queries

Query_hash definition from sys.dm_exec_query_stats is: query_hash: Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to ...
2
votes
6answers
779 views

How do I identify all super users in SQL Server?

For a security audit,I need to identify all super users and log every activity performed. Best approach for this? By "super user" I mean sysadmin, serveradmin, securityadmin, processadmin, and ...
0
votes
1answer
256 views

When exactly does pg_stat_all_tables.last_autovacuum get updated?

I'm looking into issues with our autovacuum settings and trying to understand last_autoanalyze and last_autovacuum from the pg_stat_all_tables. I understand autovacuum to work in an incremental way, ...
0
votes
1answer
5 views

How do I export a multi table database with exceptions?

I am working out of phpmyadmin to export data using an sql. I have an 88 table database. I would like to export all data to a .csv from 85 of those tables where I am only keeping the rows in which my ...
10
votes
1answer
756 views

How to “self audit” all of the SQL Server licenses at an organization?

So I have started a new job with a nice non-profit organization, which has been around for a few decades. They have a wide variety of SQL Server editions and versions (ex: 2005 Express to 2016 SP2 ...
4
votes
1answer
707 views

pg_dump with ssl certificates

I would like to run the pg_dump command from a remote host off my database server that only allows fully verified certificate based connections. How should I go about doing this? The man pages for 9.1 ...
2
votes
2answers
42 views

Initial Database Size Too Big

I have a clustered SQL 2016 standard database. It is set up in a virtual environment with a total of 250 GB of storage. However, my developer set the initial size of the databases to be 100 GB. There ...
0
votes
1answer
23 views

Use NEW in FROM clause in Postgres trigger?

I am trying to write a Postgres trigger to unnest an array field before inserting or updating a new row. E.g. SELECT unnest(something) FROM NEW However, this seems to lead to an error: relation '...
1
vote
1answer
26 views

alternatives to passing temp table as a parameter to a stored procedure

some time ago I was developing a simple procedure to get the database sizes on a particular server. Here it is the procedure: USE MASTER GO ALTER PROCEDURE dbo.sp_getDBSpace @Radhe sysname=null, ...
0
votes
0answers
9 views

Suddently slow SELECT

I noticed that one of my Hibernate JPA SELECTs against my Heroku PG 10.4 instance is taking a loooog time to complete as this EXPLAIN (ANALYZE, BUFFERS) shows. The database is 591MB running in PG 10....
-1
votes
0answers
30 views

Linked server values cached

I have a small problem. I have a warehouse, and our Inventory table tracks Stock. The warehouse is fed by services on it and the other servers we have, largely tracked by Store_Id. Here are the ...
0
votes
1answer
223 views

Concatenate fields in access

How come my statement is getting marked wrong? The question is: Create a query based on the tblCustomer and tblPurchase tables that will concatenate the member’s first and last names (separated by a ...
0
votes
2answers
46 views
+50

How can I use mysql to determine the Sundays for the last year?

I have a table where I'm currently aggregating ~200 rows per day of stats. These stats include things like # of users, how many people using X feature, etc. What I'd like to do is query this table ...
-1
votes
0answers
5 views

#1005 - Can't create table `canteen_system`.`main` (errno: 150 “Foreign key constraint is incorrectly formed”)

CREATE TABLE Main ( Customer_Id INT(5), Customer_Name varchar(50), StallName INT(5), State INT(5), Worker_ID INT(5), Position INT(5), Feedback INT(5), PRIMARY KEY (Customer_Id), ...
0
votes
1answer
230 views

Can any one Explain me What is the Use of Cascading Replication in Postgresql?

What are the advantages of cascading replication in PostgreSQL. I have done Testing On this With three nodes. M1---->S1----->S2 What is the Use if My master(M1) goes Down(failover). Where the ...
1
vote
0answers
6 views

No shardIdentity document - MongoDB

Having a sharded cluster in production which has been running for a good year now without issues. Everything is on 4.0, classic 3-3-3(config) + 2 mongos. While revisiting our back-up strategy i ...
0
votes
1answer
17 views

Select rows with same Name and their posible ID (could be Null)

So I have this For every username there is at most one unique associated not null col2 value and potentially some null col2 values. +----------+-------+ | username | col2 | +----------+-------+ | a ...
-2
votes
0answers
17 views

Applying 3NF to a table with one primary key

If I'm not mistaken, in 3NF every column needs to directly depend on all primary keys. In my table I have one key so that doesn't cause too many problems. I have a few columns which are used in ...
0
votes
0answers
9 views

MySQL converting column of type TEXT to TINYTEXT truncates value at non-intuitive position, why?

I recently ran into a problem where a table had a column of type TEXT inadvertently converted to type TINYTEXT (MySQL version 5.6.24). We were able to restore any truncated data, but the confusing ...
1
vote
0answers
9 views

pgbench - 20-30% variation in benchmark results (non-repeatable benchmarks)

Problem I'm trying to use pgbench to help me tune Postgres for my hardware, but I'm seeing a very strange behaviour. I cannot seem to get a stable number for TPS in consecutive runs of pgbench. Since ...
-2
votes
1answer
20 views

Get Average of a column excluding the current month [on hold]

I would like the average to be average excluding the current month counts. I.e for November the average would calculated based on Jan-September values. How do I do this using SQL Server 2008?
9
votes
4answers
412 views

Problem getting zips in radius via MySQL

I have a table of zip codes which includes the center lat, lng for each zip code. I use it to get a list of zip codes within a given mile radius from any arbitrary point. It just occurred to me that, ...
0
votes
1answer
222 views

One oracle user two tablespace issue

I have an application which works with two separate firebird database, but each database has the same user, but in case of Firebird the connection could be driven to each by connection string. My ...
1
vote
1answer
47 views

Could anyone please help me understand MSSQL Compatibility Level?

I have a task to upgrade a database from SQL Server 2005 to SQL Server 2012. So I took backup of the old database and simply restored it onto SQL Server 2012 (SP3). Executed query on New database: ...
0
votes
1answer
26 views

Trigger to log Users Assigned to website

Is it possible to create a trigger so that works with the following scenarios: User types valid login info to the web application A trigger is activated and login name is inserted to the audit ...
1
vote
0answers
40 views

Database I/O issues on SQL Server and Extremely slow backups

We are running into a significant issue on our SQL server where the nightly backups (using Olla Hellengren's solution) has jumped from 2 hours to 10 hours. I have been unable to determine the root ...
5
votes
2answers
15k views

ORA-01017: invalid username/password;logon denied

There were other similar questions asked, but none that were able to tell me why I can't connect using a C# .NET web site I've stood up. While I know this forum is more for DBAs connecting to ...
1
vote
1answer
231 views

MySQL Load Balancing what do i need Replication or Cluster?

So My MySQL database server is reaching it's limits with the number of queries selects, updates, inserts etc it can concurrently take resulting in high CPU usage more than what a single machine can ...
0
votes
0answers
3 views

Postgresql streaming replication sticky read queries

I have setup 1 master node and 1 slave node with postgresql streaming replication, is it possible to configure certain read queries to be executed in slave node only instead of routing to both nodes?
-2
votes
1answer
16 views

Error in stored procedure on Phpmyadmin [on hold]

I have created this simple StoredProcedure in the Phpmyadmin SQL console but I keep getting syntax errors. I have looked at similar created StoredProcedures but can't seem to figure out what the error ...
0
votes
1answer
231 views

table is — is full mysql

MySQL 5.7 on windows'12 server, table which I am getting error crossed 2 GB in size, server memory is 4 Gb, MySQL used about 90% of memory.. Now any insertion into this table causing table full Once ...
2
votes
3answers
51 views

Setting a variable from a statement that starts with EXEC

I am trying to get the Server Name from a LinkedServer and assign it to a variable. From this question (Get @@SERVERNAME from linked server), I found that either of these return the Server Name. ...
0
votes
1answer
10 views

Error parsing DDL for schema.table in mysql workbench

I have production dbs using Mysql 5.5.31-0ubuntu0.12.04-1 (I know its old, will be upgraded soon). I used a too advanced version of mysql workbench which allowed me to add a comment to key. (Now ...

15 30 50 per page