1
vote
0answers
35 views

What exactly is MySQL Spin rounds per wait in SEMAPHORES section?

I am facing slowness issue on MySQL Slave. I am suspecting this due to OS I/O as i compared Spin rounds per wait values with PROD. Slave have higher values. Also slave has less resources compared to ...
1
vote
3answers
50 views

get datetime difference of a specific time and value of date time column

I have a datetime column in my mysql table. I need to get the difference between a definite time everyday say 12.00 pm and the value of that column.
1
vote
0answers
15 views

Progress of mongodump operation jams at a random point

We are executing remote mongodumps to backup collections. For some time now sporadically one of these dumps stops to progress any further and remains to log out the same amount of documents processed ...
1
vote
1answer
32 views

Expanding AlwaysOn Availability Groups with Replication Subscribers

I have query regarding "AlwaysOn Availability Groups with Replication Subscribers"... Can I add multiple publishers to a subscriber(which is part of availability group as a primary server)? In which ...
0
votes
1answer
30 views

Repopulating PostgreSQL Database with Data Directory from Another DataBase Instance

I have had to delete PostgreSQL for an issue and reinstall it, however before uninstalling I did not execute the command pg_dump. I still have the data directory from this instance. After reinstalling ...
3
votes
2answers
59 views

Group by multiple columns with different members of the same hierarchy?

I have customer data in a table structure like this: customerID | productLine1 | productLine2 | productLine3 1 | 1 | null | null 2 | 2 | 1 | ...
6
votes
3answers
942 views

What is the effect of having an opened transaction in MSSQL for too long?

I'm just wondering what happens if you begin a transaction in a DB and forgot to commit or rollback it. Will the server be down? Lets say you left it for 3 days. There are also users who are using it ...
-3
votes
0answers
13 views

Collect statistics for whole SQL

I am quite new to SQL Server. I would like to collect some SQL statistics for the SQL Server, including Compilation/sec, Recompilations/sec and Batch Requests/sec. However, I have no idea how to ...
0
votes
0answers
11 views

Mongodb mmap private failed with out of memory

I am getting following error while tying to do write (from java) operation in mongodb 2016-06-26T18:11:46.426-0700 E CONTROL [conn2] mmap private failed with out of memory. (64 bit build) 2016-06-...
1
vote
2answers
37 views

Why does my statement result in a syntax error?

I tried to run this SQL statement in MySQL 5.5 and 5.7.1 but always got error. DELIMITER // CREATE PROCEDURE one_off_update_user_info_view_type() BEGIN DECLARE @batchsize BIGINT DEFAULT 1; ...
1
vote
1answer
17 views

Data Replication in Oracle

I have a table on master site which only allow insert operation. I want to replicate the rows which are inserted recently so, need something which can track the last record replicated into the local ...
1
vote
1answer
53 views

Contradiction in book related to variable scope in Stored Procedures

I was reading the 70-461 TSQL training book and the part about stored procedures said this: Variables declared in Proc1 and Proc1's parameters are not visible to any of the procedures called by ...
1
vote
0answers
25 views

get max item in sub query join mysql

i have a table it contain buy of each user , other table contain a star ranking According to buys all user, my scenario very sample i create it and show in sqlfiddle . example if in table buy have ...
1
vote
0answers
25 views

Master-master replication, is it viable? [on hold]

I'm trying to think of an architecture for my game server. Here is how it would work for two regions: A server instance runs on one machine For each machine there is a slave database to speed up SQL ...
0
votes
2answers
26 views

Use of Non clustered Indexes

I know the differences between clustered and non-clustered indexes. Can someone tell me the various scenarios where we actually prefer non clustered index over a clustered index ?
1
vote
1answer
49 views

Subtract TotalExpense from BudgetAmount In Budget Table for a specific date

I have a Budget table which has the following columns: BudgetId, BudgetDate, BudgetAmount and a table Expense which has the following columns: ExpenseID, Date, ExDescrip, Category_fk, ExAMount ...
3
votes
1answer
15 views

System Database Migration and Security - Log Shipping or DB Mirroring

I've setup log shipping between two servers (they used to be mirrored). What is the simplest or most efficient way to mirror the system databases between the primary and secondary? Is it just a ...
1
vote
0answers
37 views

Open source & cheap 'data at rest' encryption solutions

So I am exploring some options about database encryption. The best options are commercial (TDE). I am looking for an open-source implementation. Recent releases of MySQL and MariaDB have data-at-rest ...
0
votes
0answers
36 views

Is there a way to prevent an key from ever being changed or dropped?

I worked with a dev once that loved to do this. Every so often he would de-fragment the primary key so that there was no gaps, I think he was a little too OCD. I need to map Microsoft SQL rows to ...
1
vote
1answer
48 views

Remove result set doesnt meet criteria

this is part of a query result : I'm going to add a constrain to my query to remove the orders that doesnt have an invoice_type = final ,so first three rows should be removed and the second three ...
0
votes
0answers
10 views

Sharing Front-End Access Database

I have an Access back-end database with tables, queries, reports...and I have an Access front-end database with a data-entry form that will be used by 3 users. Both back- and front-ends are in same ...
2
votes
4answers
206 views
+50

Database design for an exam

I am designing database for an exam, and I am stuck. I do not know how to do it. Here is the relevant information: Student answers 10 questions. Each question has 3 options (answers) and student ...
1
vote
1answer
21 views

SQL Server could not find a login matching the name provided

I have SQL Serer 2012 up and running. I created a new login (SQL Server authentication with password expiration, requires change, etc. turned off). I can start SQL Server Management Studio as the ...
1
vote
1answer
18 views

Group by multiple column acquired from join

this is part of a query result : all three columns are user_ids acquired from multiple tables join . as you see each row has only one user_id and two other user_ids are necessarily null . I'm ...
1
vote
1answer
32 views

Simple Database Design - Many to many? - First database (newbie)

This is my first database I am designing. However I am getting confused on the many to many relationships. I have a products table, each product can have inventories in many different warehouses. So ...
1
vote
1answer
15 views

What PUBLIC access means on tables in Oracle?

I recieved a communication from my DBA that they want to revoke PUBLIC access and they shared attached screenshot. What does this mean by PUBLIC access on these tables? And what happen if they "Revoke"...
2
votes
1answer
55 views

How to UPDATE by COUNT from JOINed tables

I have a schema as CREATE TABLE companies ( company_id int(11) NOT NULL AUTO_INCREMENT, company varchar(255), projects int(11), PRIMARY KEY(company_id) ) ENGINE=InnoDB CREATE TABLE employees ( ...
1
vote
0answers
12 views

Mysql multisource replication : on slave map masters dbname to something like mastername-originaldbname

I need to implement a mysql multisource replication using mysql >=5.7.11, there are already a certain number of mysql servers running which will become masters for the single slave which is going to ...
1
vote
0answers
32 views

Sql - sort according to other PK column

I Have this table : table : [SheetGroupRank] ------------------------- | Sheet_ID | int | | Group_ID | int | | Rank | int | ------------------------- Sheet_ID and Group_ID ...
3
votes
3answers
166 views

Database architecture

I am in the early stages of designing a database, and I have little (none) database design/planning experience. The database is part of a job tracking engine.. As jobs are created, they are assigned ...
1
vote
0answers
14 views

What are all the catalogs that RDBMS have to implement to be ANSI compliant?

My goal is to be able to go into any environment, and immediately get a general idea of what is going on in a database server. I know most RDBMS implement INFORMATION_SCHEMA, which has a lot of useful ...
0
votes
0answers
22 views

Stored procedure generating dynamic SQL is slow for some paramaeters

I'm having issue with a stored procedure that generates dynamic SQL, it performs ok for some parameters but very slow for some parameters. This has been an issue everyday and we are making some ...
3
votes
2answers
56 views

Efficient schema to handle time interval queries on a huge table?

We have huge table (+10 millions rows) where we aggregate the values by a using a time interval search on a Datetime column. And right now, to build single page on our app, we are querying this table ...
1
vote
2answers
47 views

Enabling SSL in MariaDB running on Synology NAS

I am having problems with enabling SSL in MariaDB running on Synology NAS (DSM version 6.0) using self signed certificates. I have modified the my.cnf file to point to certificate files and the DB ...
1
vote
1answer
30 views

Referring alias name in subselect returns “Unknown column in 'where clause'”

I have following table: + ---------- + --------- + --------- + -------- + ------------ + ---------- + | Field | Type | Null | Key | Default | Extra | + ---------- + -----...
1
vote
2answers
25 views

MySQL to use all cores 20 cores I have

I am currently setting up a website that uses a MySQL database having more than 40 million rows of data. I am using one server for files and separate mysql server. Two servers are having 20 core, 64G ...
0
votes
1answer
35 views

MySQL database has way too many connections

I have a MySQL version 5.7.12 database that has 4 applications running against them. Two of these applications are single webservers running Rails apps. The other two applications are also Rails ...
1
vote
1answer
15 views

Sybase ASE: How to know if a device has free space to extend a database on it

I am new to sybase ASE. I would like to know what are all the databases that have been using a device in sybase instance. sp_helpdevice or sp_helpdb are just giving not enough information. Is there ...
1
vote
1answer
50 views

Some tables don't have primary key, how can I fix this issue?

I have the following message when running myqsltunner.pl in past this was not present. How can I solve this issues? -------- Galera Metrics ------------------------------------------------------ [...
1
vote
1answer
19 views

Setting sql_slave_skip_counter is not working on Percona 5.6.24

I am currently running a master - slave replication where on my slave there is an sql error due to which my replication was stopped. when I tried to run the following good old solution SHOW SLAVE ...
1
vote
0answers
39 views

Slow MariaDB performance my.cnf

I migrated my eCommerce website database (Magento) from MySQL to MariaDB (10.0.25-MariaDB) and my site isn't performing as well as it did with MySQL. I've gone through my.cnf several times but to be ...
1
vote
0answers
12 views

renaming a table with locks ,tried sp_rename but no luck [on hold]

I am trying to rename a table but it has many locks in it.Is there a way other than sp_rename ?
1
vote
0answers
29 views

MySql - Update the defualt table schema on production server

The story starts with a MySql table called table on the production server: As you can see, I f***ed up when specifying defaults - 0000-00-00 00:00:00 is not a valid MySql datetime. I need to ...
2
votes
2answers
69 views

In MySQL, how exactly does data flows from query to disk?

I would like to have clarity on how exactly data flows from the the time of firing a query till it goes to disk. (I have rough idea it will go to buffers, then to redo logs then disk files) but then ...
0
votes
0answers
15 views

MySQL - Move data between partitions aka re-partition

I have a mysql table whose partitions look as below p2015h1 - Contains data where date < 2015-07-01 (Has data from 2016-06-01. Hence only month worth of data) p2015h2 - Contains data where date &...
1
vote
1answer
32 views

How to restore MySQL databases from database files?

Our MySQL on Ubuntu 15.04 stopped working after we moved the computer to a new location and kept giving the missing socket file error. We couldn't really fix it after trying sudo apt-get install -f ...
0
votes
1answer
83 views

Update single table with mutually exclusive threads

I have 2 threads (for example 2 different sql sessions) reading rows of the same table in parallel. They will do some processing and update a column to inform the row has been processed. Thread id:...
1
vote
0answers
40 views

MySQL lost connection during query after specific record

I started getting the usual Error Code 2013 Lost connection to MYSQL server during query at a random moment when working on a PHP script. Some stuffs in the software still works, but the specific ...
0
votes
1answer
33 views

Using SQL MERGE to UPDATE a CTE

I have the following SQL... DECLARE @FromDate DATETIME ,@toDate DATETIME IF @toDate IS NULL SET @toDate = GETDATE() IF @FromDate IS NULL SET @FromDate = DATEADD(MONTH, -13, @toDate) SET @...
2
votes
1answer
18 views

Remove Data From Memory when Using SSAS Tabular In-Memory Mode

I use SSAS Tabular in In-Memory mode. I also use partitions to divide my data. So I will have one partition per month. AFAIK, when using In-Memory mode, server keeps processed data in memory forever....

15 30 50 per page