All Questions

-1
votes
0answers
18 views

script how to export tables from database to local drive [on hold]

can you please provide the script how to export tables from database to local drive. please do check and answer.I know how to handle it manually.
-1
votes
0answers
35 views

Sox auditors, unreasonable conclusions [on hold]

We are going through our annual SOX audit. We are a small company and our servers are hosted at our parent companies datacentre. Our parent company is public and since they have to be sox complaint ...
0
votes
0answers
22 views

How do I force a selection of items to a specific user/database row?

I have a database that allows a company to register, then the user of the company can register individual "user" accounts. The company administrator (who sets up the company account) can log in with ...
1
vote
1answer
30 views

SQL Server 2014 Failover cluster - Nodes on different patch levels

As part of trouble shooting a performance issue with a SQL Server cluster I found out that the nodes haven't been patched properly to the same level. It is a 2 node active / passive cluster. SQL ...
0
votes
0answers
22 views

I have a stored procedure running fine before 4PM every day. After that it runs like a dog [duplicate]

I have a stored procedure running fine before 4PM every day. After that it runs like a dog. I identified which query inside the sp caused the problem. In a good run, the logical IO is about 12 ...
2
votes
1answer
52 views

Microsoft Column Store Database?

Using Microsoft technologies/products is it possible to create a column store database with column family sets? That is each row being able to have a different number and type of columns. Colmun ...
0
votes
1answer
15 views

ERROR: invalid GeoJson representation

the GeoJSON Spec show, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [125.6, 10.1] }, "properties": { "name": "Dinagat Islands" } } But when I wrap that in ...
0
votes
1answer
18 views

Store Function Value into temporary table

Hi i'm currently trying to run a SQL query on a 15 000 + entry dataset. I'm using a custom Mysql function to determine the start of the current week and the end of it. Probleme is, I'm using those ...
0
votes
1answer
11 views

Getting aggregate sub-values in aggregate query

I have a query that need to show aggregated values in an already aggregated outer query. Consider a query that fetches total count of accounts being credited on a certain day. I would like to ...
0
votes
0answers
15 views

Combining 2 mysql instances into 1 without downtime

Can I use replication from one database server to another and then start using instance for production and then import other database server into new instance and then use replication to catch up and ...
0
votes
0answers
17 views

is there Better way to do this kind database schema design, mysql

P.S. Hopefully I am not posting in the wrong place. If I am, please let me know where to post. I am currently using laravel with query builder instead of eloquent for a small self project. I am ...
-2
votes
0answers
14 views

Odoo “openerp” migration from 10.0 to 11.0 [on hold]

dears i'm using migration for odoo 10.0 to 11.0 USING OPENUPGRADE from OCA while validating in last step it gives error copying database CMS to CMS_migrated... Traceback (most recent call last): ...
2
votes
0answers
49 views
+100

Mongo Db Update (upsert) taking several seconds

Machine Specs: 12 Cores 64GB Ram Mongo Setup: Mongo Version 4.0.5, XFS file system (Flash SAN backed), 1 replica set with 2 replicas, 10GB network all local (sub 1ms latency) Operation Being ...
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
vote
2answers
23 views

How a Transaction is atomic?

I am really confused as to how to digest the fact that a transaction is atomic. If a transaction is set of "queries" then how will it be atomic. I am relating the word "queries" to a general SQL query....
0
votes
0answers
9 views

Display Dynamic Pivot MySql Table to PHP

i need help on how to display this on html or php. i have this dynamic pivot table code. SET @sql_dynamic:= (SELECT GROUP_CONCAT(DISTINCT CONCAT('if(sum(if(attendance_date = "', ...
1
vote
1answer
30 views

How to get the size of an index created in a plpgsql block

I'm trying to benchmark something. I want to create an index and get it's size in a plpgsql block. This works: haki=# create index ix on t(n); CREATE INDEX haki=# select pg_relation_size('ix'); ...
0
votes
2answers
31 views

mysql simple update with 40 million and 128GB RAM taking too much time

We are having trouble with simple updates on a single table taking a long time. The table contains ~40 Million rows. and the job runs every day that truncates the table and inserts new data from ...
0
votes
1answer
35 views

what is more important on a query execution plan, cardinality or selectivity?

The paper "How good are query optimizers, really?" says that cardinality is the thing that most influence to find a better query execution plan in RDBMS. Summary of this paper can be found here. ...
0
votes
0answers
27 views

Run query dynamically in store procedure oracle

Problem Select all the tables of database where column match than pass table name to next query using loop. If column name and column values matches than return true and exist for loop CREATE OR ...
0
votes
1answer
13 views

cannot create a procedure with error [1064] [42000]

I am using mysql 5.7 and I have some code which works. But when I try to create procedure with the code, it reports error [1064] [42000]. I try to update the content of an old procedure with my ...
0
votes
2answers
20 views

How can one calculate percentage from previous week in aggregate query?

I have a challenge I set out to do that seemed initially trivial. Not so for my developper brain. Consider the following simple view, used to validate a cron I wrote that queries a subset of 200 000 ...
-1
votes
0answers
10 views

Pharmacy database [on hold]

I am developing course project web application that is purposed for Pharmacy, it's hard for me to analyze and design pharmacy db. so i need your help.
0
votes
0answers
18 views

Model multiple 1-m relationship to a single entity

I have an entity called Box. This box has a from property which could be from a variety of different entities. It could be from a user, office, import, storage and many more. So far I can think of ...
1
vote
1answer
40 views

Query to obtain weighted percentile

Trying generate SQL to compute a weighted continuous value at a given set of percentile values (the 25%,50%,and 75% levels used below, but solution should allow for an arbitrary parameter level). In ...
0
votes
0answers
7 views

How do I select this pivot query by specified Month

I need help with my mysql pivot code. Everytime I add WHERE MONTH(attendance_date) = 2 inside @sql_dynamic gets error. pls help I have a code: SET @sql_dynamic:= (SELECT GROUP_CONCAT(DISTINCT ...
1
vote
1answer
18 views

MSSQL database physical design: RAID or spreading filegroups across different physical drives?

I'm going to build a Microsoft SQL server database which could end up being more than 40 TB in size. There are some quite large tables in the DB with more about 1010 .. 11 records. Every table has ...
1
vote
1answer
18 views

Subset of Unordered Pairs of Distinct Primary Keys With Normalization

I am currently in the process of designing a database. I have one table as follows: CREATE TABLE Set ( id INT PRIMARY KEY AUTO_INCREMENT, -- other values ); Now I wish to create another ...
0
votes
1answer
27 views

Difference between logical and physical reads/writes

First off, I hope DBA StackExchange is the right place to ask this question. If not, kindly let me know where I should go. I checked the canonical answers under meta, and could not find anything. ...
1
vote
1answer
30 views

xp_delete_file - error message when no files for deleting

I have a job that deletes transaction log backups older than 3 days. if for some reason there are no files to delete, it comes out with the following error message: Msg 22049, Sev 16, State 1: ...
0
votes
1answer
15 views

Select the value of max(date) and id with mysql

I want the last dated record. But my query doesn't work. Where am I doing wrong? Example data: |-------------------------------------------------------------------| | id | messagges | ...
0
votes
2answers
40 views

A table with many null values VS many tables

Basically my level of DB knowledge enables me to create, select, delete and some simple things. When it comes to designing for performance, I have absolutely 0 knowledge. So my question here is let ...
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. ...
1
vote
0answers
26 views

Basic company and user registration database - Pulling my hair out

I have now created a partially working database, although I feel I have over complicated things, and also, not sure where to add the extra tables/relationships required. First off all, I have a ...
0
votes
1answer
13 views

SQL Server 2012 installation error on windows server 2012 cluster [on hold]

I have a 3 node Windows cluster. When I install SQL Server failover cluster, I'm facing an issue: SQL Server 2012 installation error failed to get full path for folder c:\document and settings \...
0
votes
2answers
29 views

Get value increment during an hour of a day

I query YouTube Data Api for a list of most popular videos on a channel and then get their statistics, 4 times per hour (each 15 minutes, by cron). The data is stored in Postgres, but dumping it and ...
1
vote
1answer
21 views

How to Add Check Constraint between Tables (or change DDL)?

Given the following PostgreSQL table definitions: postgres=# create table if not exists messages( postgres(# id serial primary key, postgres(# max_length smallint not null check (max_length &...
2
votes
2answers
72 views

Enlighten me about INCLUDE on indexes

Well, After reading Erik Darling's post Filtered Indexes: Just Add Includes I'm really curious and sad about how I use INCLUDES: He gives some examples and etc. about INCLUDE, but I'm confused about ...
0
votes
1answer
25 views

Can you update invisible columns

I'm trying to update the row_start column on a table with Versioning set. The row_start column is invisible. UPDATE pgwebp.t_prov a INNER JOIN pgwebp.t_prov b ON a.prov_id_a = b.prov_id SET a....
0
votes
1answer
19 views

Getting error on a particular query on a table in Postgres

I am getting the following error on one query in Postgres: select * from sampletable where sample_id = 1234; Error is : ERROR: could not access status of transaction <some-id> Detail: CLOG ...
0
votes
0answers
10 views

MariaDB 10.2 crash on innodb table corruption - trying to restore the database

I'm running MariaDB 10.2 on Windows and had some hard drive corruption on my server that messed up some innodb tables. Unfortunately this also affected backups, so I'm trying to dump the tables and ...
0
votes
1answer
48 views

How to identify columns order in a table, bis

So I'm asking a question similar to many but actually what I'm specifically asking hasn't been addressed. This one is the closest (How to identify columns order in a table) but not quite. I have a ...
2
votes
1answer
55 views

Attach ldf more current than mdf

Is it possible to create a database where the ldf is more current then the mdf? Or to attach the older (more mature) ldf to the younger mdf (less mature)? I am working on Steve Stedman's Week 3 ...
1
vote
1answer
59 views

SQL Server Backup failing for just 1 DB (“The system cannot find the path specified.”)

For the last few mornings, I have had a backup of our ReportServerTempDB fail. We are not using SSRS on this server yet, but will in the next month, so the DB is the default 8mb .mdf and 8mb .ldf (i.e....
1
vote
2answers
42 views

Load balancing Availability groups with SQL Server Standard

So I have the current scenario, and it looks to be working fantastically, but I just want to get some input on the configuration. Is it smart? Are there any issues I am not thinking of? We have SQL ...
2
votes
1answer
5 views

Does mysql configuration options accepts - instead of _?

Mysql 5.7 Documentation mentions that innodb_buffer_pool_instances can be set in /etc/mysql/mysqld.conf.d/mysqld.cnf as follows: [mysqld] innodb_buffer_pool_instances = 16 However, an existing ...
0
votes
0answers
40 views

Cannot set up replication between two servers

I am trying to subscribe a 2016 (sp2, cu1) server to another 2017 server. I am getting the following error message: For merge publications, the version of the Subscriber must not exceed the version ...
0
votes
0answers
30 views

Database Mail on SQL Server Express 2017 [duplicate]

I followed this article to create a database mail for SQL Server Express 2017. I got it working but before that I had tried to create accounts and different profiles. How I do I list all database ...
2
votes
2answers
34 views

When is the modify_date of an object updated?

As part of the daily checks I'm setting up, I'm restoring the nightly full backups to our test server and checking the modified date of objects. This is not for any kind of precise change tracking or ...
-2
votes
1answer
22 views

What are the default accounts in version 12 of oracle db [on hold]

What are the default accouints in version 12 of oracle db. (SYSTEM, etc.)

15 30 50 per page