All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

SQL Agent Job - Unable to open Step output file. The step succeeded

I have seen many posts with "Unable to open Step output file.", but can't find any references where the step succeeded. I have my output file location set to: $(ESCAPE_SQUOTE(SQLLOGDIR))\$(...
0
votes
0answers
3 views

How Do Multiple Innodb Buffer Pool Work in Mysql 5.7

Assume that I am using the default settings in Mysql 5.7 which has 8 buffer pools and each is allocated 1GB. Then assume that there are 3 tables, each table are 2GB each. Also, assume this is a test ...
0
votes
0answers
6 views

How do I use the .ibd/.frm files to recover an InnoDB table that went missing when MySQL crashed during OPTIMIZE TABLE?

I have seen How to Recover an InnoDB table whose files were moved around but I am not sure if it's relevant, since MySQL renamed the files and there was no tablename.frm afterwards. I ran OPTIMIZE ...
0
votes
0answers
7 views

Convert Excel function to PostgreSQL

I am looking to convert this Excel function to PostgreSQL. =INDEX(position!A:A,MATCH(species!C2,position!D:D,-1)) The function uses two tables. It looks up the for same values between the D column ...
0
votes
0answers
23 views

Availability groups multiple instance, multiple listeners

In my work environment, I have two database machines: DB01 DB02 Each database machine has three SQL Server instances: MSSQLSERVER FBG Central I've managed to set up availability groups with SQL ...
0
votes
0answers
18 views

How can I disable the @ symbol in SQL scripts for sqlplus?

In Oracle's sqlplus tool, when the script contains an @ symbol, it loads an SQL script with that name and executes it. I'm inserting a VARCHAR value which contains some CSS code, so when it encounters ...
0
votes
0answers
6 views

OS agnostic connection to MySQL database via Matlab

I am trying to setup a database via MySQL and connect to that database using some Matlab code. I notice that there are multiple documentation pages for using Matlab to setup a connection to a MySQL ...
1
vote
3answers
33 views

How do I query for system views in a SQL Server database?

I have some queries that run against Query Store, the view sys.query_store_wait_stats is not in SQL Server 2016, but it is in SQL Server 2017. I want my queries to work in SQL Server 2016 and SQL ...
0
votes
0answers
9 views

Q: [SQL] How can I return records from a variable date range for multiple objects using one query?

Specification: I have a set of accounts. Using a single query, I wish to create a report containing the most recent 12 months of records for each individual account in the set (e.g. if A1 last billed ...
0
votes
1answer
39 views

Mssql query problem. Column '' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

There is a problem I have experienced in mssql. ( but I don't have this problem in mysql. ) They know two different engines. but I could not find a solution. Do you think I can fix this error? My ...
0
votes
0answers
14 views

Azure VM Security

With the move to Azure Cloud things are moving fast! I have a question based on Azure VM with a shared SQL Server containing multiple instances. For example if a Azure VM has 5 instances on there ...
1
vote
1answer
43 views

Inserting few millions of rows: Does indexing happens along with the insert operation

I am inserting 50 million records to an existing table with a primary key , and a non clustered key. My question is whether indexing of those will existing indexes will happen along with the insert ...
0
votes
1answer
8 views

What's best practices for changing a user's email in an application?

I'm working on a crud for an email application, and I'd like the ability to change "everything". Right now, however, it matches the JSON string to the Database based on the email address. Problem: ...
1
vote
1answer
18 views

Master Key vs Password Certificate Encryption in SQL Server

We can encrypt certificates in SQL both by the database master key, and the other option is by password. I want to know the advantages and disadvantages of DMK encryption. Does password usage make the ...
1
vote
1answer
12 views

How to restore a postgres database created via an older version of postgres?

I have a file db.backup, that I would like to restore to PostgreSQL version 11. When I tried to install via Azure Data Studio I got an error: Restore: pg_restore: [archiver] unsupported version (1....
1
vote
0answers
8 views

Postgres Service Not start using via HomeBrew

I have to install homebrew in my macOS then after I tried to install Postgres on my mac using the homebrew. but when I checked my Postgres status is it not running. /usr/local/Cellar/postgresql/11.4/...
2
votes
2answers
45 views

Backup a single table

I need to Truncate a table in Sql server which containing around 250GB data but before truncating i need to take backup of this,it may to csv file or other mode. What is best way to do it.
1
vote
0answers
13 views

Unconnected tables for predefined options in MySQL DB

Is it okay to live some tables not connected to anything? I have a table with a set of discounts for deals. For each deal, discounts can be summed up, so I don't see the point in connecting the "...
-2
votes
2answers
27 views

Create a new calculated column by subtracting two values from a single column

I have following data. (screenshot posted below) I wanted the result in a new column like this (screenshot posted below). The formula should be S-H value (it will be jumbled up across the dataset, ...
1
vote
1answer
52 views

How to check if backups are reliable?

I generally have to restore databases to different servers after important data imports or other important and delicate database operations. I need to be sure that my backups up to that point in time ...
-1
votes
1answer
25 views

Importing CSV file into a PostgreSQL table

I am using Python with pandas to import a CSV file into a table in Postgres import pandas as pd import psycopg2 from sqlalchemy import create_engine df = pd.read_csv('products.csv', sep=';', ...
0
votes
0answers
5 views

MySQL 5.7 - How to choose the value of innodb_online_alter_log_max_size

I've been attempting to Drop a column on a table for a few days now, but each time, it runs for a while before failing with: [Note] Aborted connection 26 to db: 'dbname' user: 'username' host: '1.2.3....
0
votes
0answers
6 views

MySQL server upgrade, how to adapt variables?

I am about to upgrade my MySQL server because I have currently used it mainly with a couple of people in the development stage. Before we launch, however, we would like more capacity to avoid the ...
-4
votes
0answers
23 views

SQL Server Disk Usage Top Tables Green & Yellow Rows Reporting Screen

What is the meaning of the yellow and green rows in this report image from https://ibb.co/L69Knc5?
1
vote
1answer
22 views

Difference in location of transaction isolation level declaration - inside/ouside a transaction?

I have been looking though some stored procedured on our system today when I saw the following structure: (pseudocode indicative of actual SP, server is using the default isolation level): CREATE ...
2
votes
1answer
16 views

How to install pgcrypto?

While trying to answer Create integer id columns from existing string columns (integer coding?) it turned out that I needed my own version of postgres to play with. I already had a decent postgres ...
0
votes
0answers
7 views

DynamoDB: How to model data that's shared and queried by all users?

I am very intrigued by DynamoDB, and it works incredibly well when I model the data for my main use case for my application. That being said, there is one specific use case that I can't wrap my head ...
0
votes
1answer
43 views

SQL don't display ORDER BY column

I'm quite new to SQL programming, so i apologize in Advance for all the irrelevant Information and stupid Questions :) I have a database in Microsoft SQL Server Management Studio. I select data from ...
0
votes
0answers
18 views

Table Partitioning and Performance

I have to migrate one large table and need to do partitioning of the same. I would like to know whether i do Partitioning first and migrate the data second or I do migrate the data first and ...
3
votes
1answer
45 views

Checkpoints on secondary replica AlwaysOn AG

Setup 3 Node Alwayson cluster - 1 sync and 1 async secondary replica - SQL Server 2012 Situation We are witnessing PageIOLatches when reading from the asynchronous secondary replica. This is ...
1
vote
1answer
27 views

When is Service Master Key Exactly generated?

As it is created automatically, on Microsoft official source it says during setup. but in the 70-764 official exam prep book page 18, also there is another non official blog which say Any time ...
0
votes
2answers
33 views

How to select top 3 vendors without duplicate entries?

Here is my tables I want to select Top 3 lowest quoted rate vendors without duplicate Entry. Expected output will be V1, V4, V3 without using while loop. is this possible? Table details CREATE ...
1
vote
0answers
18 views

This failure occured while attempting to connect to the Principle server

One of our clients recently came to us with a problem he's facing while working with our application. The error in the log file is the next: System.Data.SqlClient.SqlException (0x80131904): Timeout ...
0
votes
0answers
22 views

How to reuse index space that was not created

My database is 34Gb in size and I created a clustered index which I believe was not successfully created due to some error and I can't find the index anywhere. During running of creation of Index, i ...
0
votes
1answer
40 views

Lock Escalation happening while inserting few million records into a table in production

I want to insert few million records into a table in my production database. I am not updating any existing rows.I am just doing INSERT INTO TAB1 SELECT COL1,COL2,COL3 FROM TAB2 This table has an ...
0
votes
1answer
27 views

Select query with custom column and value of other column

I want to have a query that have a custom column and have some value of other column here is example of a table table 1 : id, name, emp_id I want to have input like this id | name | emp_id | ...
0
votes
1answer
24 views

Oracle GIS database replacement [on hold]

My company has a huge (hundreds of millions of records) Oracle database of GIS/temporal information. We are trying to switch to an open source alternative. If it helps, we imagined the following ...
0
votes
2answers
17 views

Best Practices - Copying Table with datetime stamped on name

For backing up purposes I need to copy a table into the same DB but with Date and Time on the TableName. My solution doing this with T-sql Job: select * into dbo.tmp from dbo.something go declare @...
0
votes
0answers
15 views

.db file to Excel

I have a paradox .db file that I need to get into SQL. The paradox file contains a mix of Latin and Chinese characters. I have tried a number of programs (Excel, Open Office, LibreOffice, Notepad++, ...
0
votes
1answer
22 views

Proc runinng slow once in a while [duplicate]

I am trying to troubleshoot the performance issue on one of the SP which executes throughout the day daily every 20 mins and on avg completes under a min. For past couple of weeks it happens once in ...
0
votes
0answers
4 views

Sybase SQL Anywhere 12 database backup file date out of sync [on hold]

We have a SQL Anywhere 12 database running for one of our Fire applications and we have a nightly backup job that completes successfully every night, however, the date of the backup file is older than ...
0
votes
0answers
10 views

How to perform strictly SQL query that uses multiple values and searches all fields

I'm trying to create what I would call an "inclusive" search and by that, I'm not referring to "between". I have a snippet of code and it does what I need it to do but it's hacky and inefficient so I'...
0
votes
1answer
21 views

Third Normal Form. Multiple attributes determine another?

Concerning 3NF. If you have a composite non-key determinant to a single non-key dependent, does this violate 3NF? Everything I read on transitive dependencies says one non-key determining another non-...
0
votes
0answers
12 views

Admin on phpMyAdmin does not have Super privileges

I have Plesk via GoDaddy and I am the sole admin and user. When I go to phpMyAdmin and try to execute the following: SET GLOBAL event_scheduler = 'ON' I get the error "#1227 - Access denied; you ...
-3
votes
1answer
41 views

Postgres Restore

I need to restore a single schema from production postgres to test. Test database and schema already exists. The users/roles & sequences are different on prod to test and after schema is ...
2
votes
0answers
50 views

How to send mail from a restricted SQL Server

I have created an DB refresh job on a pre-prod SQL server, with latest successful Prod backup to refresh pre-prod DB every monday morning. However, i want to send a status mail post refresh. Due to ...
2
votes
1answer
38 views

How to use grouping sets in this query that shows database sizes - adding the last time it was updated

I have the following query that shows me the database sizes, including log dna data files. SELECT [Database Name] = DB_NAME(s.database_id), [Type] = CASE WHEN s.Type_Desc = 'ROWS' THEN 'Data ...
0
votes
1answer
19 views

MySQL Count(Table1.ColId) Where IN (any of Table2.Col1 ,Table2.Col2)

I have 2 Tables Table 1 has Id, Name Table 2 has Id, Col1_IdVal, Col2_IdVal,Col3_IdVal,Col4_IdVal I would like simple solution for Count(T1.Id) WHERE T1.Id In (T2.Col1_IdVal,T2.Col2_IdVal,T2....
1
vote
1answer
29 views

Query performance of index scans slower than parallel seq scan on Postgres

I've been trying to debug a performance problem on PostgreSQL 10 on AWS Aurora. Specifically I'm trying to understand performance problems on "cold" queries where the buffer cache does not contain ...
0
votes
0answers
10 views

How to control how JSON_ARRAYAGG orders results

I am testing MySQL JSON_ARRAY and JSON_ARRAYAGG functions in order to move some application expensive processes to SQL stored functions. In the following e-commerce application example, I am trying ...

15 30 50 per page