All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
21 views

Modify TNSNAMES.ORA file to connect to an Oracle Database

I would like to modify TNSNAMES.ORA file to connect to an ORACLE Database and I noticed that on my PC there are 3 different files with name TNSNAMES.ORA files. Which of these three should I modify in ...
5
votes
1answer
300 views

PostgreSQL - How does multicolumn B-Tree index work with order by on 1st column and IN lookup for 2nd?

I created such table (similar to example from http://use-the-index-luke.com/sql/example-schema/postgresql/performance-testing-scalability ) CREATE TABLE scale_data ( section NUMERIC NOT NULL, ...
1
vote
1answer
146 views

Opening Symmetric Keys

I am trying to open a symmetric key I created in a database, but it doesn't seem to be working. I am executing the query as dbo and it even says that it is completed successfully. However, the value ...
-1
votes
1answer
10 views

Postgresql Error

I found below errors in logs , Transaction stop logging in my database 2019-11-19 15:48:25 UTCERROR: could not open file "base/16384/16464.3" (target block 858400): No such file or directory 2019-...
0
votes
0answers
19 views

SQL Server 2017 Machine Learning repair fails

CU17 update failed on an Enterprise 2017 box, both R and Python (we use both). I removed them both. Trying to Add Feature, and R still fails - Python is good. Removed R again, after stopping ...
-1
votes
0answers
28 views

How to set up a custom table for self calculated statistics [on hold]

I want to to do some analytics on my database and collect the results in a custom table or report so I can export the collected values afterwards using my c# tool to generate a PowerPoint presentation....
-1
votes
1answer
37 views

Monitoring of Oracle Databases

Can I monitor all databases on different hosts with single cloud control? Do I need to install agent on each server? Do I need any license ?
0
votes
1answer
16 views

How to change results cell padding in Azure Data Studio

In Azure Data Studio, I am trying to change the padding on the cells in the results grid. According to the settings page, this is editable in the settings.json: However, when I navigate to that file ...
1
vote
0answers
59 views

Comparisons between average and raw weather data

I have a problem calculating some averages against raw data. My data comes from a weather monitoring system. My test set is 19.2 million rows, but for now I am attaching a db<>fiddle with around ...
0
votes
2answers
100 views

Set who can restart/stop/start DB services

Currently we have 3 AD users that can log into a Windows Server: MRT\administrator MRT\adminJohn MRT\adminAlice They all logged into the Windows Server 2012 and then does the following: MRT\...
0
votes
1answer
9 views

Can I pass in a frozen time as a setting into postgresql and not have clock drift?

I would like to freeze time on a connection level across multiple transactions. Is there a conventional way of achieving this similar to SET search_path = 'foo'; Rather than me passing in the time ...
1
vote
9answers
38k views

Why does “GRANT SELECT … TO Role;” not allow members of Role to SELECT?

Please consider the following scenario on a Oracle 11g Database. The user ADMIN performs the following: CREATE USER Alice IDENTIFIED BY pwdalice; GRANT CREATE SESSION TO Alice; CREATE ROLE Viewer ...
0
votes
1answer
9 views

Trigger function error: Record “old” not yet assigned

I'm new to trigger functions and trying to work this out. I have looked for solutions in the documentation and applied those, but still something is wrong here. My aim is to show error an message when ...
0
votes
3answers
59 views

Nullable smallint column usage in a CASE Statement nested in a STUFF function

I'm having issues writing a Stored Procedure that uses a CASE statement inside of a STUFF function. I thought my issue may have to do with Restricted being a nullable smallint. I tried converting it (...
0
votes
0answers
25 views

Performance issues on a MySQL database with 150 million rows

Current setup: A managed vps server InnoDB storage for big tables 10.0.36-MariaDB 18gb ram 8 x 2.40 GHz CPU. I have a pretty big MariaDB database table which is used for Business intelligence ...
-1
votes
0answers
7 views

Error sending response to client: SocketException: Broken pipe. Ending connection from 127.0.0.1

Getting error in mongod.log file. Please advise. 2019-11-04T23:42:07.847-0500 I COMMAND [conn60790] getmore mongo_dev1_cp2.cp_scan_list command: { getMore: 116085397519, collection: "cp_scan_list", ...
0
votes
5answers
98 views

Restore DB Backup with limited amount of disk space

I want to restore a SQL Server database using a backup (.bak) of about 60GB. Is it possible to do this on a machine with only 100GB of free disk space? Or do I need at least the 60GB for the .bak ...
3
votes
1answer
222 views

PostgreSQL most efficient way to reference multiple tables

I am looking for the most efficient way to reference multiple tables in one table, when there is only one reference possible at a time. Which means tables A and B are referenced by table C, but both A ...
0
votes
1answer
18 views

MySQL Connection Error for TDV

I am trying to connect to a MySQL database using Tibco Data Virtualization Studio (TDV). I was able to connect to the database using MySQLWorkbench. I checked my.cnf and skip-networking is not ...
7
votes
3answers
49k views

How to do While Loops?

How can we use while loops in MySQL? My test script: BEGIN SELECT 0 INTO @n; WHILE @n < 10 DO SELECT @n; SET @n := @n +1; END WHILE; END; But it has syntax errors. I'm running ...
3
votes
2answers
963 views

Track my own custom metadata on Postgres tables and columns

Is there any way to add my own metadata to tables and columns in Postgres, such as key-value pairs of short text? I am migrating tables, columns, and data from another database system. That other ...
0
votes
2answers
112 views

msdb.dbo.sp_send_dbmail temp table does not exist

I have created a temp table and would like to email the results I am getting the following error. Query execution failed: Msg 208, Level 16, State 1, Server PRODYCHDBX3\X3V7, Line 1 Invalid ...
-2
votes
1answer
31 views

Why is it considered that a set unnormalizes a database absolutely?

In order for a relationship to be on 1NF it needs to have all values as atomic, if there's a set it's not even in that first normal form: But intuitively I think that a table with that set would be ...
0
votes
0answers
19 views

What is Accepted NTLM SPNs

In SQL Server Configuration Manager on the Advanced tab in TCP/IP Protocol properties box there is an option Accepted NTLM SPNs. What is the use of that option and how it can be used?
-1
votes
2answers
34 views

Removing multiple values using if else statements?

I have a program that downloads raw data from a sensor. Due to to some specifications made in the SQL code, there are values that are duplicated which needs to be deleted to maintain data integrity. ...
1
vote
1answer
721 views

Inventory Database Design? Get historical data from DB for reporting & accounting

Following is the design of my db: Product: ID Name Quantity in Hand (as on date - total across all format) Reorder_point Remarks Warehouse: ID Name Address Remarks is_default Inventory: ID ...
0
votes
1answer
27 views

Unable to alter table - reason code is 10

I'm trying to run this: ALTER TABLE AMMLIBT.SAGRPPF ADD UNIQUE (ID) ADD CHECK ( IS_BUDGETABLE IN ( 0 , 1 )) ; Which gives me this: SQL State: 55019 Vendor Code: -7008 Message: [SQL7008] ...
1
vote
1answer
201 views

Count of range on datetime in MySql

I want to group table entries for each userId only if they are consecutive entries in the table. I have a table like this. id userId transactionTime 1 1 2016-04-13 22:15:44 2 1 ...
3
votes
1answer
172 views

After upgrading to SQL Server 2019, function throws “insufficient memory” error

I have moved an SQL Server 2012 Database (8GB in size) to a newly setup SQL Server 2019 virtual machine with the same memory and CPU configuration and changed the compatibility level to SQL Server ...
0
votes
1answer
21 views

Generating an expiry date based on fields in different tables

I want a field that gives the date a certificate expires. I think i would create a query and add a field using something like this.. dateadd("d", [DaysToExpire], [DateCompleted]) My trouble is, [...
0
votes
2answers
15 views

Count values in column on join then group by

Forgive me if this is super easy. I am doing some data analysis on the Stack Overflow database model. I need to count the number of badges a user has. They can have multiple of the same badge name. ...
5
votes
2answers
157 views

Database design for ~ 2.7B rows per year / 26.000 data points every five minutes

The current situation We're currently looking into a new product that will send device data back to us to interpret. These are the numbers we're looking at: Devices will most likely send data every ...
2
votes
1answer
83 views

Snapshot Folder Location for Replication with Clustered Instance

I am assigned to create a transactional replication with a SQL Server clustered instance for reporting purposes. I'm planning to use the Distributor and the Subscriber on the same box. Regarding the ...
8
votes
4answers
1k views

Foreign Key with a Constant

Let's say I have a table A, that has two columns: one is an ID for ThingA, and one is an ID for ThingB. The primary key is (ThingA, ThingB). Next, I have a second table, but this time it's restricted ...
7
votes
2answers
3k views

Accidently Named all tables in my database starting with a number

I've accidently named all my tables (100+) in my sql database with the prefix 2019_ Wasn't aware this was not a good idea until just now (just returned to SQL after 2 years) Is there any way to bulk ...
1
vote
1answer
25 views

Adding condition (Similarity) causes sequence scan

Struggling with this one a little bit, as I would have expected the performance to be better combining the queries that separated. The queries are produced using Django ORM 1.11. With the ...
0
votes
1answer
27 views

Like '%' search for value withing longblob column in MySql is slow

MySQL version is 5.7.25 I have table like CREATE TABLE `applications` ( `id` varchar(25) NOT NULL, `application` longblob NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; '...
0
votes
2answers
209 views

Mongodb shard balancing failed

Data balancing fails on Mongo cluster with 1 mongos and 3 mongod instances. All the data for the collection fs.chunks stays in the same shard with the following error. Env: Ubuntu- AWS m3.large, ...
0
votes
1answer
141 views

Query in PostgreSQL became slow and then got better on its own - why?

I want to better understand how to debug and fix performance issues in PostgreSQL. I have a query that usually costs 1 second to run. However, for some reason, it started taking 30 seconds to run for ...
1
vote
3answers
3k views

Finding missing records from two tables

I am trying to compare total number of records for a particular table in two databases. They are from the same database, but both the database are running in two different servers. Table structure is ...
0
votes
0answers
9 views

Alter on huge table consumes all disk space

I'm running MySQL 8 on Ubuntu 19. I have a table that is 543G and I have to add a new column and index. I've started with the new column: alter table hugeTable add column newCol tinyint(1) after ...
-1
votes
0answers
7 views

Database Design Practice for Open Banking Platform with API GET Calls [on hold]

We are writing solution design to support open banking regulations, the idea is for our existing data platform to support GET API requests coming from financial aggregator intiated by customer via APP....
0
votes
0answers
33 views

Question about data type to hold large number

I have a line of data that store on Microsft SQL Server 13.0.4 in numeric(32,16). It looks like this 9642327391274.0000000000000000 I try to migrate that database table to another on Azure SQL ...
1
vote
1answer
177 views

Wordpress database connection error & Database was not shutdown normally [on hold]

I need some solution for my wordpress site database error. I have face this DB error last one month. I don't know what is the reason for this Database connection error. Please review my error.log ...
0
votes
1answer
17 views

Daily SQL Server Alert: BackupVirtualDeviceFile::SendFileInfoBegin: failure on backup device

I'm running a ~100Gb database on Microsoft SQL Server 2016 (SP2-GDR) Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor) Every weekday night just after 7pm I ...
0
votes
1answer
275 views

When is dm_exec_procedure_stats updated?

I just created a new proc and ran it, but it is not showing up in my query: SELECT schema_name(schema_id) SchemaName, name ProcName, last_execution_time LastExecuted, last_elapsed_time ...
0
votes
0answers
9 views

Binary String: Should I use binary, blob, varchar, or int?

I am developing a web app in Laravel where I have to ask users a set of Yes/No questions and save the answers in the database. I thought that I should try and save all answers in binary rather than ...
0
votes
1answer
268 views

need to get data from Global Temp Table from db1 to db2 and show the data in Oracle form

I need to get data from Global Temp Table from oracle db1 to db2 and show the data in an Oracle form. In db1, a stored procedure is populating data in the GTT and showing it on Oracle forms as this ...
0
votes
0answers
5 views

MongodB cumulated conditionnal array:using map/reduce or aggregation

First, I aplogized because I have some problem to formalized my question so any idea on express it correctly will be appreciated and edited. Last try: How to get last of a cumulated conditionnal ...
1
vote
1answer
103 views

Get max url from PostgreSQL statement [on hold]

I have a very complex query which generates a view in PostgreSQL. Now the query returns duplicated rows, well almost duplicated: one field, the "url" column is different. Now we still want to group ...

15 30 50 per page