All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

AlwaysOn database not synchronizing/recovery pending due to cluster loss quorum

I have this error in cluster event 'Cluster node 'MMPDB1NEW' was removed from the active failover cluster membership. The Cluster service on this node may have stopped. This could also be due to ...
-1
votes
1answer
19 views

Unable to declare user-defined variable in MySQL

I'm creating procedure called min_max to find minimum and maximum for every column in a table. But I'm encountering an error for declaring the variable. See below: DELIMITER // DROP PROCEDURE IF ...
0
votes
1answer
10 views

Update Mysql records using Same table but Based on same table record

I have table in which i want to update records based on it's 'wishlist_id' value. Sample format of table records. Expected table record after update. So can you help to update this record using ...
0
votes
0answers
37 views

Database Mail with SSL (like GMAIL SMTP) not working

Is anybody successful sending email via MS SQL Server Database Mail while secure connection is set ON in account settings? I'm trying different SMTP servers with SSL to set up - like Gmail - and none ...
0
votes
0answers
21 views

SQL Server Agent runs a job on one server, not on the other

I have two SQL servers, each running on their own Windows server. The versions of both Windows and SQL Server are the same, they are on the same domain, they're virtually identical. On these servers,...
0
votes
1answer
32 views

Restore database with Availability Groups

I have high availability enabled with two servers and when trying to restore a database I realised I had to un-synchronize the database and then remove it from the availability group. I use Ola ...
-1
votes
0answers
17 views

PostgreSQL : double entry board [on hold]

I have a table of the type: col1 col2 col3 N1 A C1 N2 B C1 N3 A C3` How can we make a double entry array of the type under PostgreSQL ? col3 ( C1 C3`... (col2) ...
1
vote
1answer
14 views

Build a single JSON value from two jsonb columns in two different tables

I have two tables. Both have a jsonb column with an array of objects, each containing the key student_id. I am trying to build one aggregated JSON value from these jsonb columns. Lets say table A ...
-1
votes
0answers
27 views

How To get anti-virus exclusion list using cmd or powershell? [on hold]

I want to list all excluded files/folder using cmd or powershell
1
vote
1answer
24 views

SQL Server Agent - Report Failure but continue When intermediate step fails

I have a SQL Server Agent job that has three steps with the following control flow: Step 1 - on success - Go to next Step. on fail - job fails Step 2 - on success - Go to next Step. on fail - Go to ...
0
votes
1answer
22 views

SSMS Activity Monitor Expensive Query start time

I keep seeing rows in "Recent Expensive Queries" for queries that have not been run for hours. This confuses me when trying to figure what is snarling things up. Is there a way to add start time ...
0
votes
0answers
17 views

How to run chain_job in Postgres using PGagent [on hold]

Please help to find out on how to run chain_jobs in PGAdmin using PGagent. I am finding it most difficult and this is most required for my job. (sys.dbms_scheduler.create_chain) in oracle sql
1
vote
0answers
21 views

Can we change Log Shipping backup file naming convention

Seems the Log Shipping backup files naming convention (especially the date-time stamp in the name) is followed by UTC time, i believe that is default and standard. I would like to clarify on ...
0
votes
1answer
22 views

Migrating a maintenance plan from ms sql 2008 to 2016

I have a bunch of maintenance plans that I want to copy/migrate to sql server 2016. I am able to connect to Integration Services on sql server 2016 but I get the following error when expanding 'MSDB' ...
0
votes
0answers
13 views

MS_Access Employee Productivity database

I have one table all the details available in table1, I am trying to do relationship, however its asking 'No unique index found for the reference file of the primary table" In the Table1 Fields 1....
0
votes
1answer
33 views

Is DEFAULT NULL and 'nullable value without default' completely the same?

ALTER TABLE test_table ADD COLUMN a DEFAULT NULL; vs. ALTER TABLE test_table ADD COLUMN a; Both columns will set NULL if column a is not specified. As far as I know, if I add a column into a table ...
1
vote
2answers
88 views

SQL Server RAM usage is increasing and query executions is slowing down with time

I'm using SQL server on a server with 48 GB of RAM. When I start the SQL Server service, it's using 12% of the RAM at first, but after 24 hours it's reaching 90% and query executions begin slowing ...
0
votes
3answers
33 views

I want to know which table the value comes from in inner join

I have a simple query where i do 2 inner joins to combine data from 3 tables. within the table i would like to know which table each value comes from. i attempted the following but the syntax is wrong....
0
votes
0answers
14 views

Group by with no aggregation expresssion is not supported

I need help i am getting an error to the following query on azure sql. SELECT illuminance as illuminance, temperature as temperature, (select to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM') ...
0
votes
0answers
14 views

Partioning a big table, or splitting it into seperate tables for speeding up queries (PostgresSQL 9) [on hold]

At work we are using Postgres 9, and I currently have to optimise a page, which loads very slowly (like 70 seconds). This happens mainly due to the queries executed against the database and that ...
0
votes
1answer
16 views

ORA-00823: Specified value of sga_target greater than sga_max_size dba

I was doing a modification in my database and something I should not have done well and I got the following error : SQL> startup ORA-00823: Specified value of sga_target greater than sga_max_size ...
0
votes
1answer
24 views

Updating multiple columns using case conditional clause

In the following TSQL code the second column TypeId2 is not updated. What could be the problem here? declare @dd table(Id int,number int, TypeId int) declare @tt table(Id int,TypeId1 int, TypeId2 ...
2
votes
1answer
31 views

SUM counts from parent and child

With this SQL-query, I am able to obtain the count(*) of items in subcategory, but I want to be able to SUM total items, from both main (parent) category and subcategory (child), how can this be ...
2
votes
0answers
26 views

Solution for the deletion of old Database Backups for Linux SQL Server 2017 after Backups created with Ola Hallengren scripts?

I have a problem when I want to delete older backups, I've created with Ola Halengreen scripts. USE Maintenance EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory ='/mssql/backup/'...
0
votes
0answers
9 views

How Can I Evaluate a SQL Server Policy using T-SQL?

I have created a policy in SQL Server 2008 R2 and need it to be evaluated on demand - whenever a new database is created. In order to achieve that, I created a DDL trigger at server level, which ...
0
votes
1answer
27 views

Define Database Size

I want to create a database with Size limitation. I am using sql server 2008r2 edition. Maximum size should be only 20GB. That means it should allow only 20GB space for particular database. How can ...
0
votes
2answers
19 views

Explain plan changes for insert vs select vs CTAS in Postgres11

We have a postgres DB on version 11.2. We are running the below query and the objective is to insert into a staging table. The number of records inserted are only 82. But the performance varies ...
0
votes
0answers
8 views

adding results of InfluxDB subqueries

I'm trying to get the kWh from multiple entities in InfluxDB in Grafana. I have the following raw query. SELECT ("a" + "b") / 3600000 FROM ( SELECT spread("watt_seconds") AS "a" FROM "W" ...
0
votes
1answer
19 views

Function does not exist, but im pretty sure it does

So, i have a procedure.. create or replace procedure pro_update_last_read(in input_sensor_id integer, in read_time timestamp) as $$ begin update sensor set last_read = read_time where ...
0
votes
1answer
16 views

How to join sparse events for individual users on a “filled in” date ranges in Redshift?

Let's say I have a table that has a record of every change a customer has made to their subscription for an internet service: +-----+------------+-----------+------------+ | _id | account_id | ...
0
votes
0answers
12 views

Find street number of the longest street in each city in Canada

Find street number of the longest street in each city in Canada Relevant relations: City(city-name,country-name,area,population) Street(stno,city-name,length) The keys are bolded My tuple ...
1
vote
1answer
23 views

LOAD DATA keeps CPU usage high after it finishes

I'm loading multiple files into the database using the LOAD DATA LOCAL INFILE command combined with Golang database/sql driver like this: mysql.RegisterLocalFile(fileName) _, err = dbConnection.Exec(...
0
votes
0answers
16 views

Cannot connect to RDS Aurora Mysql Database Even Though It Exists

We have an RDS aurora mysql instance that has been up and running for a while without issue, however, today our application's connection to the db failed, with error ERROR 1049 (42000): Unknown ...
1
vote
1answer
24 views

Postgres full text search on words, not lexemes

I've got a table with columns of text that I'd like to search by word, not lexeme. More to the point, that I'd like to have indexed by word rather than lexeme. We've got error dumps with a lot of code ...
0
votes
0answers
3 views

How to return the top 3 relationships for each node using a relationship property as a metric using cypher in neo4j?

The basic structure of my data is: (a:Crosspost {name:'test'})-[t:TAGGED {upvotes:3}]->(b:Tag {name:'testtag'}) and every Crosspost is TAGGED with multiple Tags. If the user thinks the Tag is ...
0
votes
1answer
18 views

group by with joins

So I have 2 tables with identical structures that represent data from 2 vendors.....I would have set this up in one table but I lost the argument with the data guy...anyway....keep getting an error ...
0
votes
1answer
34 views

Can I fix this insertion anomaly without using a composite key?

Suppose I have a schema with the following basic elements: Client : id (PK) Pet : id (PK) owner_id (FK to Client) Contract : id (PK) client_id (FK to Client) PetInContract : ...
0
votes
1answer
8 views

COPY command only works as command line argument, not as part of script

No rows are being copied when I try to copy a CSV from stdin. To be more specific, this works when writing the command on the cli, but not when read as part of a file. Why is reading SQL commands from ...
0
votes
2answers
22 views

How to restore a .backup file from a single table on postgres?

I have a .backup dump from a single table, but it didn't work restore like a normal backup from an entire db. I'm creating this backup file with the following batch script bin\pg_dump -h localhost -p ...
-1
votes
1answer
21 views

MySql query suddenly became very slow after a while

I have a program that reads a set of entries from a database, performs some set of operations on these entries, and updates them in the database, the select query is pretty straight forward, It just ...
-1
votes
0answers
26 views

sql query to show empty data in columns [on hold]

there are 15 different columns in a table, I want to find blank data fields records in a table for three different fields (columns) in SQL. Default Items: billing_item: _blank_____ job_id : ...
0
votes
0answers
8 views

Microsoft Access Max 2G error or temp file error [closed]

I have been running several Microsoft Access queries for several years. However, today I have continued to get max 2G size error or temp file error. The actual file is very small. However, I noticed ...
0
votes
1answer
33 views

Get Row Value by Column Name of Name at runtime

I currently have a stored procedure that obtains rows from an import table and joins another table which has a row for each column header of the import table. I am able to query this but in order to ...
0
votes
0answers
15 views

Explain plan : Why rows examined higher in this cased? [duplicate]

I have 450 million records in my table which contains the data for around 7 to 8 months. So per month data is around 60 million records. Table has index on empDate. When I execute below query , I ...
0
votes
0answers
23 views

How to find the MAXSIZE for user databases from a connection to master in Azure SQL Database?

While it is simple enough to SELECT DATABASEPROPERTYEX(@DatabaseName, 'MaxSizeInBytes') when connected to a user database, I have been unable to find how to get this information for all of the ...
3
votes
0answers
37 views

Strange Hostname/Application name when hunting for SA login errors [on hold]

So I've noticed thousands of login failed for user S.A. after I've changed sa password. We all agreed with this, its a test environment and nobody was using SA and since i'm new here I would like to ...
7
votes
0answers
307 views

Database Stuck 'In Recovery' with command XTP_DB_RECOVERY

We recently converted a table to memory optimized data. Our backups have all ballooned (3x300GB files to 3x600GB files for Full, 3x50GB to 3x250GB for Diffs), and startup has been getting ...
0
votes
0answers
5 views

Why MySQL configured as recent version yet PHPINFO() shows an older version?

I have an AWS RDS MySQL instance configured for version 5.7.26 which also shows in the RDS dashboard as expected. However, when I run phpinfo() it shows version 5.7.0. Why the difference? Also, is ...
0
votes
3answers
96 views

Extract only Date from the string

I have one field in database and I am getting the multiple dates in the same field. I want to extract multiple dates from the string. Please help me on this String like: "7/3/2019 1:20 AM - Request ...
0
votes
1answer
19 views

Need help to design ER diagram

I need to design an ER diagram for a centralized healthcare management system for my college mini-project. Firstly, I came up with the following ER diagram. ER-diagram-1 While designing the tables ...

15 30 50 per page