All Questions

0
votes
0answers
2 views

How to create an Index on a raster column?

In a PostGIS enabled DB, I have a 1.7GB table with a raster column rast. I need to create an index on that column in order to speed up my raster queries. I have tried the following: CREATE INDEX ...
0
votes
0answers
3 views

Procedure can not be executed

I can run one procedure in one database: $ mysql --user=license --password=test123 --host=mariadb.devlocal --database=license -s '--execute=CALL config_sp_License_Update("missing","...
1
vote
0answers
3 views

Get base table from materialized view in postgresql

I use materialized view in postgresql. when retrieving the list of materialized view (select * from pg_matviews), in the "definition" column, there is a query building the materialized view. how do i ...
0
votes
0answers
3 views

Where can SSISDB actually reside?

Trying to wrap my head around what's going on under the hood when integration services is installed, and how that relates to SQL instances on the same machine. Currently we are aiming to have a full ...
0
votes
0answers
4 views

When to choose Unified search model or stratified search model in database system design

Guess this question is more a database system design question. I recently started building my own query optimizer based on the theory as presented by the CMU database group. While I fully understand ...
0
votes
0answers
6 views

Oracle database creation - recording response file option not available

I try to create database with dbca assistant (v 12c) and I would like to firstly use the graphical guide in order to save the response file for later. I checked the advanced mode during the step 2, ...
0
votes
0answers
6 views

how to improve this query performance

I have an application that's running this following query SELECT SQL_NO_CACHE p.*, product_shop.*, stock.out_of_stock, IFNULL(stock....
-1
votes
0answers
5 views

Getting error when changing database in ssis package

I was not able to execute a SQL task contains a stored procedure to get a connection string , after changed the database but it is a copy of it.Why am I getting error now?
0
votes
0answers
4 views

Why am I getting this counter-intuitive relevancy result to a MySQL full-text query?

I'm querying for +2019* +sponsor* +BGHDA* and getting this result: 2019 sponsor BGHDA #7 Springfield, WA 2019 03 04 relevancy: 34.139 2019 sponsor BGHDA relevancy: 26.087 Given that my ...
-1
votes
0answers
5 views

Mongodump Failed: error writing data for collection

Failed: error writing data for collection XXXXXXXXX to disk: error reading collection: read tcp 10.40.8.38:59326->10.43.235.88:27017: read: connection reset by peer
2
votes
1answer
8 views

Postgres database not using indexes

I have a SQL optimization question. Table Name: charts Total Records: +250 million Columns: timestamp(string), imported(boolean), .... Indexes: CREATE INDEX index_charts_on_timestamp ON public....
0
votes
0answers
7 views

How can I query 60 timestamp in a SQL?

Suppose I have a table CREATE TABLE `monitor_index_data` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `index_id` bigint(20) NOT NULL, `index_time` bigint(20) NOT NULL, `value` double ...
0
votes
0answers
5 views

Failed Login on Registered Server When Opening Connection

I have a number of servers registered in the Registered Servers pane in SQL Server Management Studio. When I right click a server group and select "New Query", a window opens in which I can execute a ...
0
votes
0answers
2 views

How to combine results of two mysql queries?

I am building an online exam site using php and mysql. It's just for MCQ type questions. I have a database where I store questions in one table and the various MCQ options in another table. For some ...
0
votes
0answers
12 views

Cannot find slow (frozen) running query in Query Store

I have huge issues with a stored procedure that has not finished the last week. It seem slike it stops at around 140 000ms of CPU time and freezing there, while the elapsed time increases. This makes ...
0
votes
0answers
3 views

How to take mysqldump with Generated column?

I am getting below error while importing the dump, ERROR 3105 (HY000) at line 82: The value specified for generated column 'column_name' in table 'table_name' is not allowed. When I describe the ...
0
votes
0answers
11 views

Can we use MariaDB mysqldump CLI to take dump from MySQL Community version?

MySQL server version: mysqld Ver 5.7.26 for Linux on x86_64 (MySQL Community Server (GPL)) MariaDB mysqldump CLI version: mysqldump Ver 10.17 Distrib 10.3.12-MariaDB, for Linux (x86_64) I am ...
0
votes
0answers
6 views

How to Extract SQL Database from Compress Backup File [on hold]

I want to extract the SQL Database from a corrupted compressed Windows Backup file. How to do it?
1
vote
0answers
6 views

How to make delete duplicates faster?

On a mysql table with about 1.7M rows, I tried to delete duplicates posts: delete a FROM comment a INNER JOIN comment a2 WHERE a.id < a2.id AND a.body = a2.body; The result was: ...
-2
votes
0answers
7 views

Please can anyone tell proper sources to learn how to create ETLs in pentaho? [on hold]

Creating ETL in pentaho tutorials and sources. I havent been able to come across proper sources.
0
votes
0answers
10 views

using Federated tables for different data sources

We are planning to create a standalone MySQL server specifically for Federated tables that points to 4 DB instances. Sample table: federated_db1_users federated_db1_transactions federated_db2_users ...
0
votes
0answers
4 views

Migrating AWS RDS SQL Server to a smaller RDS instance

I am in the process of migrating an AWS RDS SQL Server to another instance of AWS RDS SQL Server with lesser storage. AWS folks suggested using the native backup/restore option instead of DMS. Steps ...
0
votes
0answers
12 views

non cluster index store the cluster key instead of RID [duplicate]

I was reading a textbook which says: "Remember that the clustered index defines the actual physical ordering of the data rows on the disk. If a row is updated such that its cluster key changes, that ...
0
votes
1answer
7 views

SQL Server unattended / Silent installation override Configuration.ini file in command line parameter

I am creating a PowerShell script to install SQL Server 2012 silent installation. It is not hard to find a tutorial or instructions online on how to do so. I want to my script be a bit more flexible ...
0
votes
0answers
14 views

What will this nonclustered index's root and non-leaf level look like? [duplicate]

Let's say we have an Employee table with columns EmpID, FirstName...etc. and EmpID is the primary key. Say there is no clustered index, and we create a nonclustered index on FirstName. I know leaf ...
0
votes
0answers
10 views

on insert rows in a table how to update that inserted data in another table?

I'm trying to update large amount of rows (20,000) rows, so i created a temp table similar to this one. and i want to create a trigger on insertion or update and a function to take the inserted or ...
0
votes
0answers
9 views

Restoring Postgresql database on Windows if only “data” folder available?

Is is possible to restore a PostgreSQL database if all I have available is the "data" (C:\PostgreSQL\data in my case) folder of the server whose databases I want to restore.I know this folder contains ...
-2
votes
1answer
27 views

How to find out NOT NULL attributes in tables

I need a query that returns a list of attributes in a table that cannot be null.
0
votes
2answers
27 views

Are race conditions possible in SQL?

I would like to understand what the SQL standard says about parallel queries and race conditions. If there is no standard, then I would be interested in the approach adopted by popular databases. I ...
1
vote
0answers
13 views

Can CyberArk Manage SQL Credentials To Synchronize Password Changes?

My organization utilizes CyberArk to force expiration & reset of administrator & service account passwords on the domain. When it comes to SQL Server-related assets, I'm hitting an impasse ...
0
votes
1answer
11 views

sp_BlitzCache and cursors

I'm running sp_BlitzCache (Brent Ozar) to get some information about database performance. The program that "attacks" this database uses cursors everywhere, so sp_BlitzCache gives me several lines ...
0
votes
1answer
28 views

How do I get more control over backup file retention using Ola Hallengren's DatabaseBackup solution?

I've noticed some unexpected behavior using the database backup job in Ola's Maintenance Solution. On the test instance I'm working on, I have the user database backup job scheduled to run at 2:00am ...
2
votes
0answers
19 views

Is it possible to setup a CREATE_LOGON trigger that treats AD Groups differently from users?

Just started in a DBA role with a new organization and they gave me a bit of a head-scratcher. We've got a trigger on CREATE_LOGON that DENYs VIEW ANY DEFINITION & VIEW ANY DATABASE. This was ...
0
votes
0answers
18 views

How to formulate a query and view for the following structure?

Consider the following table structure TableA ColumnA ColumnB ColumnC Ro1 A 1 Ro1 A 1 Ro7 A 3 Ro2 C 1 Ro3 B 1 Ro3 B 1 Ro6 ...
0
votes
1answer
11 views

How to prevent a record from being affected by the ORDER BY RAND statement in MYSQL

I have a series of problems all which I can't put in the title but I will try to explain them as best as I can. I am building an online exam platform with PHP and MySQL. Problem 1: Prevent a record ...
1
vote
0answers
13 views

SQL Server Database auditing not working

I'm setting up auditing on a SQL Server Managed Instance in Azure (Version = Microsoft SQL Azure (RTM) - 12.0.2000.8). Following the instructions in the link, everything worked for server-level ...
4
votes
1answer
62 views

Update Intersect hangs

We have this really weird behavior we just started experiencing with our update intersect statements. These were working fine, but now we are ingesting a pretty wide data source in terms of columns ...
0
votes
0answers
25 views

Striped SQL Backup - Benefits [duplicate]

We have a 3TB database, and current backup schedule is - Weekly Full Backup, Daily Diff and hourly transaction log from maintenance plans. All these backups are performed using Backup command and ...
0
votes
2answers
34 views

SQL Alert for long running queries

I want to receive a mail when a query is running for more than x seconds. I know I can set up a job running on the database but, is there any way to do the same using SQL Alerts? What kind of alert ...
5
votes
3answers
127 views

DBCC checkdb on tempdb

Is it recommended to run DBCC CheckDB on tempdb? If yes, can someone please list out the reasons to do so? This could be on any SQL Server version. The one I have is SQL Server 2017.
0
votes
0answers
22 views

Is a relation with 2 attributes always in BCNF?

I went through some tutorials on BCNF and got that a relation with 2 attributes is always in BCNF. My question is: What if a relation with 2 attributes has no prime or non-prime attributes? That is, ...
0
votes
0answers
10 views

HIVE SQL - JOIN

I am trying to perform a left join between tables. The syntax looks something like this: select a.x1, a.x2, a.x3, b.y1 from a left join b on a.x1=b.x1 Ideally, the query should give all records that ...
2
votes
2answers
32 views

Job Information - When querying [msdb].[dbo].SYSJOBS_VIEW through linked server

I am trying to build a report to query all my sql server jobs and thier status from the previous night's run. In an effort to have just one report instead of a separate report for each server, I am ...
1
vote
1answer
19 views

How to prevent concurrency issues in a ssis package?

Have a SQL Server 2017 Server. Have several SQL Server jobs that call a single SSIS package using the SYNCHRONIZED flag. In the package there is a data flow that runs a stored proc (please see below)...
6
votes
1answer
66 views

Cannot insert duplicate key row on a non-unique index?

We've been encountering this strange error 3x the past few days after being error free for 8 weeks and I'm stumped. This is the error message: Executing the query "EXEC dbo.MergeTransactions" ...
-3
votes
2answers
44 views

Why is this query not returning the right result? [on hold]

I want to select/filter by 2 columns status and state from a table of 6 columns . I have written the query below to select cars that are unsold and either new or used but the filter returns both new ...
1
vote
1answer
19 views

SQL sort by sum of two different where clauses in a join

table1 ID | Name 1 ID1 2 ID2 3 ID3 table2 ID | table1ID | Values 1 1 3 2 2 3 3 3 2 4 1 3 5 2 1 6 3 2 7 1 ...
1
vote
1answer
12 views

Using plpgsql to remove all functions

I intended to drop all functions in all schemas within a certain database, however, after I executed the bash file containing the following code block, the functions are still there # use pg_dump and ...
1
vote
0answers
8 views

MySQL Percrona 8.0 became suddenly slow until restart mysql

My website today suddenly became slow and all requests were taking about 2 seconds to complete. Usually it takes like 0.2 second I checked available space on disk and I have a lot. Memory and CPU ...
2
votes
0answers
11 views

How to Configure SSRS Web Service Port via Command Line

It is straightforward to change the TCP port of SSRS using the GUI (Reporting Services Configuration Manager) but I am trying to fully script the installation and config of our SSRS servers. Is it ...

15 30 50 per page