All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Ensure integrity of other columns from foreign record

I have 3 tables: Race - id PK Racer - id PK - rank Winner - id PK - race_id FK(Race.id) - racer_id FK(Racer.id) - rank - prize UNIQUE CONSTRAINT (race_id, rank) Racer.rank is a non-unique ...
-1
votes
0answers
20 views

Database ER diagram review. Is this a good database design?

I have a task to design an ER diagram and task is given as points below is the description of the problem: A telecommunications company employs thousands of consultants. Each consultant is assigned ...
6
votes
6answers
23k views

MongoDB — Failed global initialization: Failed to open “/var/log/mongodb/mongod-config.log”

I'm trying to setup the config servers for mongodb sharding. I created a specific config file that is set to log to /var/log/mongodb/mongod-config.log. When I run mongod --config <path-to-config-...
1
vote
2answers
439 views

Dimension for Product Properties based on Product Type - Sparse Dimension?

I am creating dimension of product properties for sales facts. Property of product depend of product type. For example: - Type = smartphone. Properties = model, OS, size - Type = book. Properties = ...
0
votes
1answer
6 views

Methods for tracking processing time for long running ADD INDEX call in MySQL

I've set off index creation on a very large table in MySQL and while I expected it to take a long time, I'm 5 days in and wondering if there's any way to debug potential issues or simply let it run. ...
0
votes
1answer
5 views

WMI error: 0x800700a4 - The @wmi_query could not be executed in the @wmi_namespace provided

When trying to create a WMI alert in SQL Server, I received this error on 7 of the ~50 instances I was applying the change to: SQLServerAgent Error: WMI error: 0x800700a4. Msg 14511, Level 16, State ...
3
votes
2answers
327 views

Sql Server 2016 Counter Reporting Zero

I utilize the resource governor on my 2016 Sql Server. In prior 2016 sql server versions, this query: select * from master.sys.dm_os_performance_counters opc where opc.object_name = 'SQLServer:...
0
votes
1answer
35 views

Is it good practice to only delete through a trigger to enforce 'deleted by' auditing?

We've decided to design our database such that we actually delete rows when we want to delete some data, rather than just marking them as deleted, because the latter approach means that you always ...
0
votes
1answer
85 views

Designing an (almost) Read only database

I want to create a database with 3 main entities each of which will be subtyped further(by subtype I mean generalization-specialization). This database will support a website where the users can ONLY ...
1
vote
1answer
84 views

How to count between two users unread messages in SQL

I am creating between two users unread message count script in SQL. My script problem not counting between two users unread messages. My script problem all users unread messages display as a same ...
0
votes
0answers
3 views

SSAS Database Missing After Rebooting the Server

We noticed that the SSAS Database is always gone missing after we reboot the SQL server. Why is this so? How can we rectify this issue?
0
votes
2answers
162 views

Using NULL values for foreign key with normalization

I am creating a table as follows: Building (PK: buildingID) Area (PK: areaID, FK: buildingID) Room (PK: roomID, FK: buildingID, FK: areaID) All rooms are in a building. Some rooms can be in an area ...
0
votes
1answer
15 views

Is there anything wrong with splitting a complicated view into many small ones?

I have a view where each row is associated with a customer, and the columns are various computed values such as life_time_value and purchases_per_week, as well as more complicated statistical values ...
-1
votes
1answer
14 views

how to display item wise count report using SQL query

I Want to write a query for a particular result I have created a table with three columns Category(items value-Water pump,cutting motor,driller) purchased Date(value-date) Working properly(value-(...
1
vote
1answer
28 views

SQL Server infrastructure planning

Is there any general official Microsoft guide for planning SQL Server hardware? For instance, if you plan to have 500 concurrent сonnections you should have minimum 4 cores, 256GB of RAM, 15K HDD. ...
-1
votes
4answers
45 views

COUNT for IN statement (count from scope, not from a table)

My question is pretty simple: I want to select user_id, count(user_id) from a scope (not from a table). Is this even possible? Example: SELECT user_id FROM users WHERE user_id IN (1, 2, 2, 3, 3, 3, ...
1
vote
0answers
12 views

Compatibility mode change does not reflect on secondaries

I was of belief that changing compatibility mode on primary database in database mirroring would make the change for mirror database. But it proved to be wrong. I queried using sys.databases on ...
0
votes
3answers
43 views

Why does this mysql query take so long?

I have a MySQL server (ver 5.6) that is well equipped with hardware (Linux, in AWS, 32GB RAM, 56 CPUs), and according to top and iotop, it isn't even feeling warm; yet this query takes something like ...
5
votes
3answers
15k views

Is possible to backup database online using rsync?

Some people tell me that the backup database on-the-fly using rsync is possible. I think it is possible but not safe because some log, buffer... is not flushed. Database is being recovered from the ...
0
votes
1answer
477 views

MongoDB convert standalone mongod to sharded replica set cluster

I have a single replica set having 3 mongod instance, collection in this instance has data already. I want to convert this instance to sharded cluster. I followed Convert a Replica Set to a Sharded ...
0
votes
1answer
160 views

MySQL least privileges to get database/tables size

I'm using centreon_plugins to monitor some mysql databases. As a best practice I create a dedicated user for monitoring and I give it the least possible privileges. For simple monitoring I usually ...
0
votes
2answers
45 views

Maximum size transaction log and impact

I was doing some research on what the recommended maximum size for the transaction log, but I cannot find any substantiate or documented answer. I learned that a log size of about 25 - 50 percent of ...
1
vote
1answer
935 views

Oracle convert multiple rows to column using pivot

I have a table that contains the values +-------------+--------------+---------------------+-------------+-------------+--------------+-------+---------+-----------+---------------+--------------+ |...
-1
votes
2answers
16 views

Query record when N values of a column are present

I have a table similar to the one shown in snip. I want to Query all the Facility_name and Product_Id for which all 'Week' exist i.e. 1,2,3 Desired output would be only 'A' Faility_Name and ...
0
votes
1answer
348 views

SSIS - Update Specific Cell in CSV

I have a pre-defined csv template. The header row begins on row 5. Prior to this I have a date value in cell B2. How do I update this cell value in SSIS?
2
votes
3answers
1k views

Why SQL server does not have column-level locking?

As far as i know, the lowest level locking is row-level However i don't see the reason why it can not have column level locking Assume that 2 queries simultaneously updates 2 different columns. So ...
0
votes
1answer
481 views

MySQL service will not start [ERROR] mysqld got exception 0xc0000005

Server was running just fine with MariaDB 10.3.13. Stopped the service, installed MariaDB 10.3.16 and restarted the server just fine. Stopped the service again and installed MariaDB 10.4.6 and the ...
0
votes
0answers
6 views

Storing Analytic Data for Multi-Tenet SaaS with AWS Aurora

I have an app that a user can upload an excel sheet of analytics data to S3. I am wanting to trigger a Lambda function on upload to do some data processing and then write the analytics to a client's ...
3
votes
1answer
541 views

Domain User lockout after SQL Cluster Failover

We have this one user who uses SSMS to connect to a 3 node 2 instance fail over cluster. He also uses SSIS, Excel, SharePoint, SSAS etc.. to connect to this database instance I'll call TEST. There are ...
-1
votes
0answers
41 views

Uninstall SQL Server 2016

I have SQL Server 2012 and SQL Server 2016 standard named instance on same server and we would like UnInstall Sql 2016 t and Install Sql 2014, what is the best way to uninstalling process as sometimes ...
0
votes
1answer
17 views

What value to set for MAX and MIN memory of SQL Server hosted on Bare Metal

Within AWS, Many of our Database servers are being migrated from EC2 Instance to Bare Metal. (Correct me, If I am wrong) In Bare metal, there are two memory limits available for the VM hosted on Bare ...
0
votes
0answers
19 views

TSQL Materiaized/Indexed View Cluster index with subquery

I have two tables: Listings and Media and Media is a child of Listings. I am trying to create a indexed view that will include the first record from Media. I would also like to index my view so that ...
0
votes
0answers
9 views

Display Top X results for each unique value

I am trying to figure out how I can output any machine that has had the latest 3 backups be larger than 10GB. My SQL Table looks similar to the below table: ComputerID | BackupImageName | ...
0
votes
1answer
350 views

Create trigger to ignore user input for Identity Columns

Using the this table definition CREATE TABLE testtable ( id NUMBER GENERATED AS IDENTITY, desc VARCHAR2(30) ); I would like to create a trigger before inserts and updates to ...
0
votes
1answer
16 views

Question response time on StackOverflow

I thought that this was fun to share. I was wondering when should I give up all hope that my question would ever be answered and begin to start crying. So, I wrote a query for the StackOverflow DB ...
0
votes
2answers
43 views

Why is it important for every table to have a primary key?

So I have some tables in Sql Server that are essentially a list of sales, things like: ProductID SalesOrderID ProductFamilyID ProductCost ProductSource and so on. In this case, none of the ...
0
votes
2answers
32 views

Aggregate Query in SQL Developer

Below is my query. i get an error msg. it works when i remove the fields without the sum. I have added a screen shot of the data. Thanks! SELECT S.PRODUCT_ID, SUM(DISTINCT S.AWARD_AMT),...
0
votes
1answer
16 views

MySQL: change column type using expression

In a MySQL database, I need to convert some UUID columns (BINARY(16)) into VARCHAR. I want to convert them in the canonical form, not as bytes. For clarity, in lowercase and with hyphens, and not in ...
0
votes
1answer
913 views

MongoDB, Getting Started and Connecting with Compass

I'm trying to connect to my mongoDB running as a service on my rPi3B+, using openSuse Tumbleweed 64bit, mongo version 3.6.2, from my laptop sharing the same LAN/Wifi (pi on LAN & laptop on Wifi). ...
0
votes
0answers
18 views

Need help with JOIN I should be using as values are in columns are changing to find difference in tables

how can i compare text info using joins here as parentid & id of node will be the identifying factor for difference and also the text ? columns are RID ConfigFileID ID(xml child node) ...
2
votes
2answers
128 views

Performance of Query where time captured from SP statement completed differs by large from RPC completed

I am unable to understand the performance of below query when collected data from XE events: Query DECLARE @Importdate DATETIME = ISNULL (( SELECT ImportDatetime FROM Customertable where CustomerID ...
0
votes
1answer
445 views

Why we can FLASHBACK DROP table where it is DDL command and hence autocommited?

DROP and TRUNCATE both are DDL commands and both are autocommited.Then why we can recover DROP table by using FLASHBACK(unless it is purge) and why we can not recover TRUNCATED data(don't consider ...
0
votes
0answers
11 views

How to “catchup” data after a backup

I need to transfer a database to another server with hopefully 0 downtime. I have Percona Mysql 8 on the destination and Mariadb on the source. I have successfully used Percona XtraBackup to create ...
0
votes
0answers
15 views

DBCC CHECKTABLE - 2570 error

Running DBCC Checktable on one of my tables causes several errors: Msg 2570, Level 16, State 3, Line 1 errors, Page (1:442), slot 1 in object ID 565577053, index ID 0, partition ID ...
0
votes
0answers
4 views

Restore mongodb database from blockstore snapshot backup

I have a situation where I need to restore the mongodb database from the blockstore snapshot backup taken from the ops manager which is used to manage 3 node replica set. I need to restore this backup ...
3
votes
1answer
3k views

How to fix issue uuid_generate_v1() does not exist in postgresql , actually i have the function under public schema

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from da.test_get(cast(? as integer),cast(? as text),cast(? as text),cast(? as text),cast(? as text)...
0
votes
2answers
29 views

How to update data with a trigger function and a join

I have two relations : CREATE TABLE relation_a (id_a int PRIMARY KEY, field_1 int); CREATE TABLE relation_b (id_b int PRIMARY KEY,fk_a int REFERENCES relation_a(id_a), field_1 int); INSERT INTO ...
0
votes
0answers
24 views

Logon Trigger IP Address Issue

I have this logon trigger to restrict IP addresses. It is the same trigger I have seen everywhere. However, it is not working as expected, and I was hoping someone could give some direction. I am ...
0
votes
1answer
18 views

Querying an enormous table (~150 million rows) with multiple joins - SQL Server

First off, I don't have SHOWPLAN permission on this server or permission to add indexes, etc. I am not a database administrator by trade; I'm just trying to query a database. There is already indexes ...
0
votes
1answer
12 views

Inheritence and Primary Key Constraints

I am currently trying to see how the object oriented features come in play in Postgres. During a few tests I noticed that when you insert in or delete from inheriting tables that those changes also ...

15 30 50 per page
1
2 3 4 5
1671