All Questions

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 ...
-1
votes
0answers
15 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
11 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
13 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
28 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
30 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
17 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
32 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 ...
1
vote
0answers
28 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
27 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 ...
0
votes
1answer
13 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
15 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 ...
5
votes
1answer
69 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
26 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
1answer
36 views

SQL Alert for long running queries [duplicate]

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
238 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.
1
vote
0answers
30 views

Is a relation with two attributes always in Boyce-Codd Normal Form (BCNF)?

I went through some tutorials on BCNF and got that a relation with two attributes is always in BCNF. My question What if a relation with two 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
33 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
28 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
70 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" ...
-4
votes
2answers
60 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
13 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
10 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
12 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 ...
1
vote
0answers
7 views

SSIS won't connect to Oracle issue after ODAC driver un-install & re-install

I installed the ODTwithODAC1120320_32bit drivers and client and could successfully connect SSIS to an Oracle database. I noticed that the installation had defaulted to the E: drive which is where the ...
-1
votes
0answers
7 views

Error when trying to export from pgModeler

I get the following error when trying to export at simple database. Does anyone know how fix it? pgModeler version: v0.9.2-aplha1 Build: 20181214 Qt 5.9.3
5
votes
2answers
107 views

Very similar queries, vastly different performance

I have two very similar queries First query: SELECT count(*) FROM Audits a JOIN AuditRelatedIds ari ON a.Id = ari.AuditId WHERE ari.RelatedId = '1DD87CF1-286B-409A-8C60-3FFEC394FDB1' ...
0
votes
0answers
12 views

Postgres count the same join by different values

I've been trying to create a query that counts the number of different types of events associated with each entry in another table city job job_events id | name | state ...
0
votes
0answers
13 views

display data from database query in Java Jtable [on hold]

I've created a database using MSSQL and connected it to my Java application using gui of netbeans (services>database>new connection.....). Now i'm trying to show data from database using some examples ...
1
vote
2answers
36 views

Find user who kicked off a SQL Agent job at runtime

I have inherited a breakglass procedure that allows certain users to kick off a SQL Agent job that inflates their privileges on the instance. It currently sends an email to say that it has been ...
0
votes
0answers
12 views

Postgresql to have date of 12 last months but it should 1st day of every month [duplicate]

hei, i am getting ERROR: syntax error at or near "int" in declare. declare v_n int; v_i int = 0 v_n := month(now()) - 1 select v_n if object_id('tempdb..#t12345') is not null then drop table #t12345;...
0
votes
0answers
10 views

error occurs when starting mysql group replication

With MySQL 8.0.15, I tried to set up the group replication according to the manual(not all the same steps), but the errors occurred. Maybe I missed some details. I was trying to set up the first ...
-2
votes
1answer
38 views

Query syntax error [on hold]

I tried a lot but can't find what is wrong with this query, It gave me this error: Incorrect syntax near ')' WITH cte AS ( SELECT * FROM ( ...
-5
votes
1answer
39 views

Create table of sequence first days of the calendar month in Postgresql [on hold]

hei, I am trying to create temp table in Postgresql sql script is: I know how to write in SQL server but in Postgresql while running below code i am getting error as ERROR: syntax error at or near "@" ...
0
votes
1answer
20 views

How to get dates from a table while the date range is from the date belonging to another table?

I have a table datedim which has all the dates of a month in it. I have another table attendance that has dates on which attendance were taken. I need to write a query where i can get all the dates ...
-1
votes
0answers
14 views

Connect to Oracle DB on Windows Server 2012, running on VMWare, remotely [migrated]

I'm currently running Windows Server 2012 and Oracle Database 12c Enterprise in VMWare Player. I need to connect to the aforementioned database externally, for example using my host OS to run scripts ...
1
vote
0answers
17 views

DCM page in Filestream_Data_Filegroup

I'm doing some research about the DCM (Differential Change Map) page in SQL Server 2016. This is what I discovered so far: page type: 16 each DCM page covers a GAM interval each data file has a DCM ...
-3
votes
0answers
23 views

how to remove the same value in SequenceNO column [on hold]

declare @projectid int=1 SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY Branch.id) AS SequenceNo, 1 AS FilterD, Installation.name AS Installation, Installation.anum AS ...
0
votes
0answers
16 views

Troubleshoot locks for sysschobjs objects in SQL Server

an application running on our SQL Server 2016 instance creates a lot of key locks for sysschobjs objects. By using the query: with tbl as ( select l.request_session_id, l.resource_database_id,...
0
votes
0answers
21 views

Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I installed mysql-5.7 on solaris 11. Installation went successfully, but I'm not able to find the file which contains the temporary password. I'm getting this error, when I try to login as mysql -u ...
0
votes
1answer
16 views

How to increase size of temp tablespace in Oracle 12C RAC with ASM?

I have an Oracle 12c RAC consisting of two nodes (OL6) and ASM. I use it for learning. For some reason I want to increase its temporary tablespace size. It's about 50M now. I've considered it using ...
2
votes
1answer
47 views

When do Azure SQL Database index rebuilds occur?

Azure backups occur every few minutes as per the documentation for Automated backups: SQL Database supports self-service for point-in-time restore (PITR) by automatically creating full backup, ...
0
votes
1answer
33 views

How to query results from a huge postgres database?

I am trying to query a few tables in a 125GB Postgres database. I find a hard time getting the results back quickly! Even to find unique rows of a column it takes more than 10 minutes. Either I use a ...
0
votes
1answer
23 views

Problems with Listener in AlwaysOn AG in AWS

I have a 2 node AlwaysOn AG cluster with a single database being replicated between the 2 nodes. Windows Failover Clustering Services are installed on each node. The AG is configured to allow ...
0
votes
1answer
29 views

Efficient partition pruning with ORDER BY on same column as PARTITION BY RANGE + LIMIT?

I've set up a table in MariaDB (10.4.5, currently RC) with InnoDB using partitioning by a column of which its value is incrementing-only and new data is always inserted at the end. For this case, ...
1
vote
2answers
39 views

Deduplication/normalization of string column on insert

I have a database of text tuples. Imagine e.g. full file paths + standard comments. Then you dump large file tree and generate comments for files. A file can have lots of comments, but their text ...
0
votes
1answer
64 views

In Oracle 12c trying to create table with columns greater than 4000

New to Oracle and SQL. I have already followed normal procedure to allow for this size: startup upgrade alter system set MAX_STRING_SIZE ='EXTENDED' scope=spfile; @%ORACLE_HOME%\RDBMS\ADMIN\utl32k....

15 30 50 per page