All Questions

0
votes
0answers
10 views

is it possible to enable supplemental logging only on the phisycal standby database of an Oracle dataguard setup?

We have an Oracle Dataguard setup with a Primary and a Phisycal stand by database that we need to use CDC in it. A requirement for CDC is having supplemental logging enabled, my question is if we ...
6
votes
2answers
246 views

Is there such thing as an Availability Group failover trigger?

Is there such thing as a trigger for Availability Group failovers? I want a certain action to happen when an AG fails over. Specifically, I want to turn on a database setting (turning on RCSI). I ...
-1
votes
2answers
30 views

Prevent 'Last' Trigger from firing unnecessarily

We have a legacy application running on SQL Server 2008 R2. On DML operations on some of these legacy tables, I need to write data to a set of tables in another database under the same instance. ...
0
votes
1answer
26 views

How does to_tsquery and to_tsvector decide which characters to omit?

I was quite surprised to find that TO_TSVECTOR('english', '平仮名ひらがな'); results in a vector of '平仮名ひらがな':1. For a system that omitted all non-alphanumeric characters and emojis I threw at it, I expected ...
-1
votes
0answers
22 views

Store Procedure Parameter Name Auto Completion [on hold]

Is there any SQL editor that will auto complete the parameter names of a stored procedure. So that when I type exec dbo.StoredProc it will automatically place the names of parameters with @ signs ...
0
votes
0answers
9 views

How to use the Percona Toolkit to connect to Azure Database for MySQL when SSL is enabled

I am attempting to use the pt-show-grants to connected to a MySQL instance with SSL enabled. $ pt-show-grants --version pt-show-grants 3.0.9 If I attempt to connect to my database without any ...
0
votes
1answer
12 views

Why is my AWS RDS (postgres) at a high percentage of cpu with no active sessions?

I have two postgres db, prod and dev. Lately, dev has been really slow, so I checked into it, and it appears to be using CPU credits faster than I'm getting them. I could not figure out why, so I ...
0
votes
0answers
28 views

Optimize query migrated from SQL Server

I have been working on SQL Server for more than 10 years, now I have a database which I want to confirm if it is viable to change it to PostgreSQL, this (simplified) query runs in about 100ms in SQL ...
0
votes
0answers
37 views

Maintain a large OLTP SQL Database

We are migrating a large OLTP database from Sybase to MSSQL Server. Currently this is been tested on Pre-Prod, after the bcp and inserts to SQL Server the database size is about 3.5TB (and it grows in ...
1
vote
3answers
62 views

Database solution for a large matrix/very wide table

Suppose I have these two data frames (simplified for my question): users +---------+ | user_id | +---------+ | 1 | | 2 | | ... | +---------+ articles +------------+------------+ | ...
2
votes
1answer
51 views

CTE Query to CONCAT text (over 10,000 rows)

I am trying to construct a CTE query to loop through rows of data and concatenate text into one line for each SampleUserNumber. Below is what I am working with: CREATE TABLE #SampleTable ( ...
2
votes
1answer
28 views

What is the strict difference of key and constraint definition in SQL Server?

In SQL Server Keys folder includes primary, foreign and unique keys, constraints folder for example check and default. But unique can also be considered a constraint, so why it is kept under keys ...
1
vote
2answers
84 views

Why does sql server prefer the nonclustered index over the clustered index?

I am trying to speed up a table and as I was experimenting I ran into this (what I think is) odd occurrence. I created a clustered index and a nonclustered index that should be the same thing. However,...
0
votes
0answers
34 views

SQL Server TDE Vs SQL Server Database Backups

Can anyone please help me understand below case: Kindly advise on below case: SQL Server is on 2014 SP2 GDR version I read Compression and TDE does not go hand in hand . I have 2 PRD Environments:...
1
vote
1answer
22 views

Powershell Invoke-Sqlcmd Replacing £ with?

When I create a SQL Script that inserts the value '£' or '€' into a table the value on the table is a question mark (?) Though, when I insert '$' it inserts a dollar sign. Anyone know what is going ...
-2
votes
1answer
44 views

SUBSTRING is not working in where condition in sql server [on hold]

I have one written one query as per below. Its not giving result when i did sub- string. Declare @Result varchar(max) set @Result=(select top 1 value from empkeyValue) select * from department d ...
2
votes
1answer
31 views

Accurately simulate SQL Server work load with diskspd

We were building a new node in an alwayson availibility group and this new server was on a different storage than the other nodes in the cluster. Since it was a separate storage we wanted to make ...
0
votes
2answers
27 views

ssms does not let me change to server authentication mode and I can not log in

I have been using SSMS and logging in through server authentication for a week now and yesterday when I tried to login it suddenly told me "no process on the other end of the pipe". I researched ...
0
votes
0answers
8 views

How to drop dynamically events in mysql 8.0?

Having a question about drop events from MySQL I see here already related a question which I see from far. But I just want to know, How to drop events dynamically? I have tried below way using ...
6
votes
2answers
822 views

On SQL Server, is it possible to restrict certain users from using certain functions, operators or statements?

we support a large number of developers and analysts who either do not know much or don't care at all about query performance. We have every day hundreds of poorly conceived queries (also due to ...
0
votes
0answers
29 views

Parent/child table with include/exclude items

I have a table with parent-child relations. The relations can go n-level deep. There is also a table with elements that belong to a group. CREATE TABLE group_children( id serial PRIMARY KEY, ...
1
vote
1answer
34 views

executing a stored procedure on a monthly schedule

I'm looking to create an invoicing procedure that executes automatically once a month. The procedure name is INVOICE_PROC. I have tried to use a trigger to execute it but I can't get it to work. ...
0
votes
1answer
17 views

How to add a constraint to a table using a partial index?

I have a simple table: create table item ( lan text not null, disabled date ); My aim is to ensure uniqueness for the lan column over all rows, where disabled is null. I created a partial ...
-1
votes
1answer
10 views

Indices, Drop before Loading and Create after Loading

How do you drop all indices before loading new data into an existing table, and make new indices after loading the new data ? COPY command is faster than INSERT INTO right ?
0
votes
0answers
9 views

Copy database from a server to local one with postgresql [on hold]

Please can someone help me to know how to copy a database from a server to a local one ? I was following the instruction of this link http://www.postgresqltutorial.com/postgresql-copy-database/ but i ...
0
votes
0answers
4 views

Execute SQL Task timeout setting is being ignored for Redshift ODBC Connection

When I run an SSIS SQL Task (VS 2017) against an ODBC Amazon Redshift (32 bit) connection, the timeout setting is not being respected and the Task/SQL continues to run endlessly.
0
votes
2answers
19 views

Debian Wheezy to Jessie — MySQL Dead Slow

We just upgraded the Debian Wheezy(7) to Jessie(8). All upgrades went smooth except MySQL which I think is causing some or exhaustive slowness specially in the MySQL's information Schema. the more ...
0
votes
0answers
23 views

Authintcation error 28000 + 18456

I have been trying to link my mssql database to Django. When I run the Django server I get the error below. For normal query (out of Django), it works fine, however, the Django doesnt even connect. ...
0
votes
1answer
19 views

Open files in MySQL increasing over time, eventually causing it to stop accepting connections

Every few seconds MySQL is opening a file and not closing it, which we can see in real time by querying SHOW GLOBAL STATUS WHERE variable_name = 'Open_files'; Looking at the open file descriptors ...
0
votes
0answers
17 views

does a fact table always need to have a field for aggregate?

When I was studying data warehouse modeling, the first thing I came into contact with was the order fact table, and the product, user, date dimension tables. The order table will have quantity, ...
0
votes
0answers
16 views

How to restore mysqldump of one database in different databaseName with content of data in the same host machine

Let's start from the beginning there is a MySQL database with name DB1. As I want to restore the mysqldump backup of DB1 database in DB2. The DB2 database is another database in same Host Server ...
0
votes
0answers
18 views

“service postgresql stop” not working on Ubuntu 18.04

I have a build process that constructs a postgresql database server with some data and then needs to stop the service and create a tar file. The relevant snippet looks like this: if [ $? = 0 ] then ...
0
votes
0answers
19 views

why Threads_connected falls down automatically in some cases

How can I monitoring, when Threads_connected increase from which place(files) or when it decrease, because some of cases it dose not fall down automatically in our production server and we are getting ...
0
votes
0answers
45 views

Postgres bulk upsert performance

I am doing bulk UPSERT on a table with 30 million rows. The table has just two columns (varchar as a primary key and integer). The input data is imported to the temporary table first, and then bulk ...
0
votes
1answer
21 views

sp_Blitz Error on Azure SQL Database [on hold]

Getting the following error when trying to install sp_Blitz on a Azure SQL Database Msg 40515, Level 15, State 1, Procedure sp_Blitz, Line 16 [Batch Start Line 15] Reference to database and/or ...
1
vote
1answer
26 views

MYSQL - How I can filter only Debtor and only Creditors using action_type column?

I have created the balance sheet using PHP MYSQL, for admin. Now I want to filter only Debtors and only Creditors from the table. Here are Debtors and Creditors means: Debtors: A debtor is a ...
1
vote
1answer
14 views

update json value to null

As I understand it, if you select json_value or json_query specifying a key or object that does not exist in your json document, then in strict mode, you will receive an error. This allows you, for ...
0
votes
1answer
13 views

showing table is full on alter mysql

In my phpmyadmin , when am adding a new column to my table , mysql throwing me error table xxx is full i also search on google , but did not get help. am also gone through dba.stackexchange.com ...
0
votes
0answers
18 views

Using lag function in mysql to get previous values

I am trying to create MySQL dataset which has entries from previous study (surgical study with the first study having value of 1) as well for that userid. Each user can have multiple studies. I am ...
1
vote
1answer
33 views

how to prevent UPDATE of existing rows/record but allow INSERT using PostgreSQL trigger?

SOLVED Edit: Trigger function and trigger are working fine with no errors, problem was with my database itself, dropped the database, created new, it's working now. How do I prevent UPDATE on any ...
0
votes
0answers
10 views

Migration of data from relational data base to star schema for power bi [on hold]

how to migrate the data from relational database to star schema . could anyone suggest the best way to do this.
0
votes
2answers
51 views

How to get results in separate rows after joining two tables

I have two tables say - Plans and Discounts. Below are the sample data in Plans table. Below are the sample data in the Discounts table. These two tables are related using PlanName column. I am ...
0
votes
1answer
11 views

Are Snapshot files created during MS SQL replication one time use only?

I added a new article in an existing publication. I saw that it generated a new snapshot folder (E:\Database\Snapshots\unc\S749TCAPDB01_NFS_XXXX_XXXX_PUBLICATION\20190417114556). But this folder ...
1
vote
0answers
13 views

Where to build the OLAP cubes? [on hold]

I have built a data warehouse with multiple fact tables and dimension tables (with a MySQL server). Now where could I build the OLAP cubes and write the MDX queries to produce results? BTW, I have ...
1
vote
1answer
13 views

Why do information_schema queries scan all databases?

I'm building a PHP application that looks up the last modified date of all databases using information_schema. A simplified version is like this: $sql = "SELECT update_time FROM information_schema....
0
votes
1answer
14 views

DB2 LUW V10.5 on Windows. How to Manually rotate the Diaglog using scripts

In DB2 LUW V10.5 on Windows, is there a way to manually rotate the diaglog log file? Currently, it is almost 1GB and it is difficult to open it to find info.The diagsize is set to 0 and I cannot ...
0
votes
1answer
9 views

SQL to MDX translation?

An MDX (a language dealing with multidimensional data, in particularly dealing with the cube metaphor) statement can be translated to an SQL (a well-known language for the relational model) statement -...
0
votes
1answer
25 views

Monthly Date Dimension

I am doing my first ssis and sql project for uni being new to both. I am creating a date dimension but only month and year no days. I have seen loads of examples online for date dim but including days....
5
votes
1answer
97 views

Okay to merge included columns on otherwise identical indexes?

I have two indexes that index the same field on the same table. The only difference between them is the included columns. There's no reason I shouldn't combine the included columns and just have one ...
-3
votes
0answers
40 views

What is the fastest database system to use? [on hold]

I have a VPS that I using solely to build a web api on. I've got a huge database with quite a few tables with anything between five hundred thousand and 500 million records in each one. What is the ...

15 30 50 per page