All Questions

-1
votes
2answers
33 views

I need help with a SQL Query

I'm not so great with SQL Queries and would like to know if someone would know the correct Query to return the information below. I'm having a difficult time trying to figure this out. I'm using ...
1
vote
1answer
26 views

Insert- and Read-only table in Postgres

I want to create an "immutable" Postgres database, where users can insert/select (write/read) data only, but can not update/delete (change/delete). I came to know there is FOR UPDATE lock, but did ...
0
votes
1answer
59 views

Innodb cluster setup error

Reframed: Here are the steps I followed but is resulting into an error: I am connected to my primary node (10.0.0.4) and I checked the config of all the nodes using below: MySQL localhost JS > ...
0
votes
0answers
26 views

Help with Connecting to SQL Server using Oracle SQL Developer

I am trying to connect to SQL Server using Oracle SQL Developer. I was able to get the SQL Server JDBC installed on SQL Developer and am able to see the SQL server Tab on the Connections page. I have ...
1
vote
0answers
39 views

How do I parse Address into Street Number, Street Name, Type, Unit Number?

How do I parse Address into Street Number, Name, Type, Unit Number? Is there a function which will conduct this? 2280 MEYERS AVE ALDERGROVE AVE & S ...
0
votes
0answers
14 views

Azure SQL Data Warehouse will always return zero (0)

I am studying Query Store, and while reading sys.query_store_runtime_stats I found these Average CPU time for the query plan within the aggregation interval (reported in microseconds). Note: ...
0
votes
1answer
16 views

Postgres - 2 database mirror

I have 1 DB called - DB_A. I would like to create read only database DB_B from DB_A which updates itself every 10 mins. Is their any easy way to do it in postgres? I am using Postgres 11. Also any ...
0
votes
0answers
14 views

Where and how to set the variables for Percona MySQL Audit Variables

I am trying to set the variable values for Percona MySQL Audit Plugin in my.cnf file before installing the audit plugin on MySQL Server like 'audit_log_rotate_on_size','audit_log_rotations' and '...
-4
votes
1answer
47 views

PRODUCTION DATABASE RUNNING OUT OF SPACE [on hold]

My database has 9556.97MB of space left. I do have about 2TB free disk space. The database is in full recovery mode and doing full backup everyday, also TLOG backup every 24 minutes. I used to just ...
0
votes
1answer
23 views

Booking Syntax error SQL

I did a trigger but it's giving me an error message, it must be a syntax issue. Does anyone see any problem with this. DELIMITER // CREATE TRIGGER Carperperson BEFORE INSERT ON bookings FOR EACH ROW ...
3
votes
1answer
51 views

Parameterized Plan Flushed

I cannot find documentation anywhere on what would trigger this recompilation reason. We are investigating a sudden query performance drop and the only thing that I can think of is that the plan got ...
0
votes
0answers
9 views

Database for Orders/Inquiries with “custom” Product Data

At the moment i practice with SQL Databases and created a simple Python tool to manage Order and Inquiry with a simple GUI for testing. Now I have a question i didn't found a good solution for: ...
0
votes
1answer
18 views

InnoDB cluster error: ReferenceError: cluster is not defined

I was setting up the MySQL InnoDB cluster, when I got this error. I created the cluster from the primary node, the cluster.status() was giving output as 'ONLINE' at this point with only one node part ...
0
votes
1answer
43 views

Getting data grouped by weekday and hour

I have a table: CREATE TABLE BolusData ( [BolusKey] [numeric](18, 0) IDENTITY(1,1) NOT NULL, [BolusDate] [datetime2](7) NOT NULL, [BolusSource] [nvarchar](50) NULL, [BolusVolDelivered]...
0
votes
0answers
10 views

ZERO granted memory to all queries with AlwaysOn replication

we came across the following issue that is best described by the image below. To sum up, all (yes, ALL) of the queries this SQL Server was receiving were stuck at RESOURCE_SEMAPHORE and had 0 (NULL) ...
0
votes
0answers
17 views

MariaDB: *.mad file causes full disc space [on hold]

I am using MariaDB 10.1 My hard disk has 200GB space but after a couple of minutes a file xxx.MAD causes full disc space. I don't know how these files were created. How can I solve this? Why causes ...
1
vote
1answer
21 views

Copy/move data from one cassandra server to another

I'm in the midst of replacing a kubernetes stack (to more specific: moving it from a locally hosted cluster to an AKS cluster in Azure), and as a result have to re-create all of my services, including ...
0
votes
0answers
9 views

Recover file MySQL .IBD [duplicate]

had a problem with a database on a machine that needed to be formatted, and I backed up the MySQL Server folder yesterday containing the .IDB and .FRM data regarding the DB structure and data. When ...
6
votes
1answer
208 views

TDE Master Key Rotation

Does changing the TDE Master Key (DB Master Key and/or the DB encryption key) always require decryption and re-encryption? If not, at what version did SQL Server begin to allow you to change the ...
0
votes
3answers
42 views

Simple way to use SP_EXECUTESQL for loop through all databases

I have a BIG problem running queries on all databases. I have a lot of scripts that works, but I would like to understand better how to use SP_EXECUTESQL instead of SP_MSFOREACHDB. Normally when I'm ...
1
vote
1answer
25 views

Proper way to map IDs: By adding additonal columns for each external column or by inserting new rows

I am working on a new database structure in which we get external IDS from a few different sources and map them against our internal ID in one table. Method 1 In the first version the table ...
0
votes
0answers
39 views

Mariadb docker container SQLSTATE[HY000] [2002] No such file or directory error

I have developed an web application that consists of a app, a website and a mariadb database. I put them together in a docker-compose file and tested it on my local computer and it works fine. I tried ...
0
votes
0answers
38 views
+50

What is the common symbol of an arbitrary query?

For a theoretical database paper i tried to figure out if there is a is general symbol for an arbitrary Query that is used in literature. Can anyone tell me if there is any symbol?
0
votes
0answers
38 views

How do I add a directory, or bulk, of users to Microsoft SQL Server permissions

I have a front end program in visual basic that is using SQL as a back end. The only way I can get permission for login to use the SQL server is by adding each name or computer individually and this ...
-3
votes
0answers
13 views

JOINING SCHEDULER TABLES IN OBIEE [on hold]

Hi these are the four tables I want to join all the four tables such that it is grouped by job id and the relative order is grouped into single line by job_id.
0
votes
0answers
18 views

How to find the MySQL query that got rolled back

I want to know if a certain transaction got rolled back. If we analyze SHOW ENGINE INNODB STATUS\G; we get the list rolled back transactions with transactionid , but how to get the actual query ...
0
votes
0answers
25 views

Postgres TRIGGERS to create csv file after insert on Foreign Table

I have a foreign table called vw_asset_register with over 5000 rows in there which I'm calling from MSSQL database. SELECT * FROM vw_asset_register. I always use this to create CSV file into my ...
0
votes
0answers
12 views

Restoring MySQL database data from ibdata1 and ib_logfile

I am trying to restore a MySQL database. I have the following: ibdata1 ib_logfile0 ib_logfile1 .frm files restored as I have a backup of the structure. Is it possible to restore the data for the ...
0
votes
0answers
8 views

how to sync from local database to server database using codeigniter

I created PHP app in working condition, clients want this app without internet working in localhost and with internet automatically connect to the live server,below shown that code,for localhsot ...
0
votes
1answer
17 views

calculate percent change between two entire rows

i have a table of currency data, it's have multiple records in each rows. | Date | ETH | XRP | LTC | USDT | BTC | etc... | |----------------|------|-----|-----|------|------|--------| | ...
0
votes
1answer
18 views

Generate metadata file from PostgreSQL server

Is there a way that I can make a metadata-sheet that lists all the available tables from a postgresql-database, so users can see documentation of the tables? I know that there are descriptions, ...
2
votes
1answer
83 views

Stored Procedure: table-Value parameters

We have a number of stored procedures where we pass in a user defined table type parameter. As per the MS doc below, my understanding is that SQL Server doesn't retain statistics on these (and ...
2
votes
1answer
38 views

Added .Net assembly to SQL CLR without turning TRUSTWORTHY ON

I'm trying to add "System.Messaging.dll" using the guidance provided by Solomon Rutzky in his post Assembly deployment with permission UNSAFE or EXTERNAL_ACCESS using asymmetric key but I'm failing at ...
1
vote
1answer
20 views

How to monitor Mongo databases and Cloud servers?

We have mongo databases installed in AWS and Azure based servers. We need to monitor the Mongo databases and Cloud servers on daily basis. Is there any way to healthcheck the databases and servers ? ...
0
votes
0answers
18 views

How to remove duplicate records in MySQL?

Below is my SQL syntax to query for a given name Vincent Ho, and returning all the matching records associated with the name. However, I would like to only keep the first 2 rows of the output and ...
0
votes
0answers
5 views

Pass 'interval' value to date_trunc function in PostgreSQL procedure

I am fetching the "age" of two timestamp columns (End and Start) and further choosing it as to_char 'MM' format. So I have the difference of the months from two timestamp columns. The syntax in the ...
0
votes
0answers
23 views

MySQL reporting version mismatch due to picking up previous installation

To solve a mysqldump "Workbench was unable to get mysqldump version. Please verify the log for more information.", I opted for the first solution at https://stackoverflow.com/a/44851129/175241 But ...
0
votes
0answers
24 views

Join 2 subqueries in MySQL [on hold]

May I ask if anyone knows how to join 2 subqueries in MySQL? The following syntax below ran into a syntax error when I executed it on MySQL. SELECT * FROM ( SELECT Staff_ID1 FROM phase_2.same_staff ...
0
votes
2answers
26 views

Poor performance on a 'leaderboard' query

Consider the following 2 tables: players: | rooms: id | id name | type room_id | embed_code_id points | My query needs to fetch the 100 players with the most points from a given ...
-1
votes
0answers
29 views

How to create stored procedure involving wildcards? [on hold]

I have a question, I want to write a stored procedure given a name in the where clause of the query, return all matching identities of the staff members who have staff name that contains the queried ...
0
votes
0answers
18 views

Postgres COPY locking on a busy table

Does COPY lock a table for writes? I have a busy table, both reads and writes, and I'd like to COPY it to a logical replica. The table is several GBs, so the COPY will take a while.
0
votes
1answer
8 views

Problem in PostgreSQL replication - ALTER DATABASE

Recently I put to work a Master/Slave replication in my PostgreSQL (9.3). Everything is ok... insert, update, delete, in data and changes in tables... but when I changed the data base name the ...
1
vote
1answer
34 views

PostgreSQL ensure no concurrent reads

I'm sorry if it's a very basic question, but would really appreciate educated advice on this: Say I have an operation, which first has to read from a table and then insert a row if the read value ...
0
votes
1answer
12 views

Safe to use the same temporary table name in parallel transactons?

Using postgreSQL 10 or 11, would it be safe creating temporary tables with the same name, each carrying different data? I do not intend to share the data between any sessions/connection/transactions. ...
1
vote
0answers
15 views

How to read jsonb or json in postgresql spi?

How can I read a json/jsonb field in a PostgreSQL server side function? I am trying to write a server side function using C and SPI for PostgreSQL 11. The json field in mind is simple and contain ...
0
votes
2answers
64 views

How to connect an MSSQL database engine to a local network

I need to let my public IP connect to a database that is located within the same local network. Ex: MY public IP is: 190.222.222.222 The local IP of that PC is: 1.1.1.4 And this server already has an ...
0
votes
0answers
19 views

After switchover OIM app to standby, getting ORA-01033: ORACLE initialization or shutdown in progress

I have the exact same issue as described here JDBC Connection on Current Primary Database After Switchover: ORA-01033 encountered We have OIM 11gr2PS3 app and 2 node rac DB cluster. When I switchover ...
0
votes
1answer
23 views

What's the most appropriate type of index to use for this function-based query?

I'm using Postgres 9.5. I'm going to be running a lot of this kind of query SELECT * FROM mydb_article where regexp_replace(url, '\?.*$', '') = :url_wo_query_string so I figured I would need to ...
1
vote
1answer
43 views

SQL Server Query Store - Force Plan does not work

Here is my situation: I have a simple SP (containing giant joins and a few temp tables), which essentially returns a resultset, works in 15 seconds in 2008 compatibility level, but takes 3 hours when ...
0
votes
0answers
14 views

How do I debug/set up MariaDB SSL connection?

[ I originally posted this on ServerFault but then was pointed at this community ] Since moving from MySQL to a newer MariaDB installation on Debian 9, I a struggling with SSL connections. I have ...

15 30 50 per page