All Questions

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

indexSize mismatch between primary and secondary members on wired tiger engine

we are using mongoDB 4.0 on wired tiger engine. For the last couple of days, we are observing that indexSize of primary server(marked in blue in attached file) went up drastically compared to its ...
0
votes
0answers
12 views

Tool to migrate data to another database with different object names

We are working on a project to migrate our Oracle database to SQL Server. There are many off the shelf products that seem to do this such as Microsoft SQL Server Migration Assistant & Navicat ...
0
votes
1answer
9 views

SSRS Security Audit

Is there a way to audit access given to reports \ folder in SSRS ? Trying to figure out who gave browser access to a user to a specific folder. Thank you.
0
votes
0answers
19 views

I need to add a new condition in between subquery to compare two tables id

SELECT act.actno, act.actid, act.actname, dom.domname, case when act.status =0 then 'Active' when act.status =1 then 'Blocked' when act.status = 15 ...
0
votes
2answers
28 views

Schedule Full, Differential and Transnational Backup in SQL Server 2016

I studied about scheduling backups with SQL Server Agent and Maintenance Plans (which leads to the SQL Server Agent). My first concern is, what is the best way to schedule my backups? I want full ...
0
votes
0answers
10 views

How to get all tables in informix database and their sizes in GB?

I can get a crude estimate of table sizes with SELECT tabname, (rowsize*nrows)/1024/1024/1024 AS tabsize FROM informix.systables ORDER BY tabsize DESC Is there a way to get a more accurate ...
0
votes
2answers
17 views

Multiple AGs on same Windows Failover cluster the Listeners don't work properly

Here is my case. I have Server1 and Server2, which were installed 4 SQL instances as follows: Server1 Server1\SQL1 Server1\SQL2 Server2 Server2\SQL1 Server2\SQL2 The Server1\SQL1 and ...
0
votes
1answer
22 views

How get in SQL pairs of connections in a FW Logs

I have a database with orign_ip, destination_ip, and other columns. I am looking for a way to get in SQL just the connections between two IP's, I need to get just the list. This is my first step : ...
0
votes
1answer
31 views

Why are execution plans wildly different when selecting 1000 rows vs 2000?

Consider the queries below. The only difference is 1000 vs 2000 rows returned. SELECT TOP 1000 lwa.Message INTO #foo FROM dbo.LogWidgetsAPI lwa (NOLOCK) ORDER BY lwa.TimeStamp vs SELECT TOP 2000 ...
0
votes
0answers
12 views

Oracle - clean LOB files - recovering disk space

I have a friend who has a website and asked me for help. I often use MySQL databases but never Oracle databases. And unfortunately he has an Oracle database, so I can't find a solution. The available ...
1
vote
2answers
26 views

Correct data types for my database

I have to make Movies database with the following tables: • Directors (Id, DirectorName, Notes) • Genres (Id, GenreName, Notes) • Categories (Id, CategoryName, Notes) • Movies (Id, Title, ...
0
votes
0answers
17 views

Command runs fine in elevated command prompt, but fails when run in a Windows Task Scheduler task

Here's my predicament: The version on the server is SQL Server Express. And no, we cannot use any other version. (Long story, but: vendor will not allow without $ome...) From 1, you can deduct that ...
0
votes
0answers
5 views

Unable to drop table

In an aws mysql 5.7 database I am running into an issue with dropping a newly created table as it is waiting on a metadata lock. When looking at the active sessions there is nothing accessing that ...
0
votes
1answer
19 views

tempdb move issue

In preparation for moving many of my databases in a data warehouse to READ COMMITTED SNAPSHOT isolation level (CDC and Reads contend for locks) I added a drive and moved my tempdb there (mdf and ldf) ...
0
votes
0answers
7 views

Use or include external schema in search_path on Redshift

Narrative I have a sql script that creates a bunch of tables in a temporary schema name in Redshift. I don't want to repeat the schema name a bunch of times, so I would like to do something like the ...
1
vote
0answers
29 views

How to make Indexed Views work for SQLCLR?

In MS SQL, the Indexed View is a hellscape of limitations. But I need one. I have a formatter SQLCLR function that creates a prettified version of a domain key - users want to be able to search on ...
0
votes
1answer
19 views

Postgres consuming a lot of cpu

I have a Java system with Postgres 8.3 and Glassfish application server, from time to time, the application is very slow at certain times - when it has more hits; by the top command, we can see the ...
0
votes
0answers
13 views

Query returning Union of two tables

I'm trying to retrieve data from a table using multi-column subquery but it unions the result from both tables. I'm unable to modify it to get actual results. Here is my query select * from Recipe,...
5
votes
2answers
108 views

Turn TDE off when restoring SQL databases

We are just getting started with TDE. Eventually it will be in our Prod SQL Server environment and two major non-prod environments, but currently it is only in one non-prod system. My question is ...
-2
votes
0answers
16 views

Write a query which returns the viewer_ids and associated view counts (view_count) of the users with the most views per video_type

Write a query which returns the viewer_ids and associated view counts (view_count) of the users with the most views per video_type. If there are four video_types: food, music, games and sports, the ...
1
vote
1answer
13 views

Change postgres default behavior for connection to database when dbname not supplied

According to postgres documentation: https://www.postgresql.org/docs/10/libpq-connect.html dbname The database name. Defaults to be the same as the user name. In certain contexts, the value is ...
2
votes
1answer
21 views

Saved state for SQL Server Always On on Hyper-V

For our SQL DEV/QA environment our system-engineers did setup an Hyper-V enviroment - 3 hosts - 2 VM on each host (1 for DEV an 1 for QA) Patching for the hosts is scheduled once a month but I ...
-3
votes
0answers
44 views

how can implement the subquery that shows me one table exactly like this picture

How can implement the subquery that shows me one table exactly like this picture? I try this query. I want separate month and year and bring month into the separate column just like the pic Q 3ai ...
2
votes
3answers
26 views

How to get efficient range index scans with multiple columns with different sort order?

Let's say we have this table with a million rows: CREATE TABLE stuff( foo integer, bar integer ); INSERT INTO stuff(foo, bar) SELECT (random()*1000000) :: integer, (random()*1000000) ...
0
votes
1answer
23 views

Slow changing facts: how to?

In our project, we do have slow changing facts, and we want to keep the entire history somehow. We can think of two ways to implement this and I find it difficult to chose... Option A: updating ...
2
votes
1answer
32 views

Availability Group Read Only Routing Not Working for SQL Logins

We have following config of Availability Group: server1.domain.com - primary server2.domain.com - sync secondary server3.domain.com - async secondary sql-listener.domain.com - availability group ...
0
votes
1answer
15 views

Pgbouncer getting auth failing when trying to connect using psql

I'm trying to configure the latest pgbouncer to work with postgres 9. I can connect to my db using psql with the right password but when I use psql -p 6432 I can't connect with the error message of ...
0
votes
0answers
24 views

Why won't postgres use my index?

I have a table comments with many fields and one of them is rating integer not null and I have added index: +--------------+-----------------+-----------------------------------------------------+----...
0
votes
0answers
19 views

unable to set kerberos authentication in mssql 2014 express

Hello I've recently installed MS SQL 2014 Express in MS Server 2016 Essential I wanted to use Kerberos authentication so I've run through many pages but whenever I'm trying authentication always says ...
3
votes
2answers
121 views

How can I run SQL Server Vulnerability Assessment from a SQL Job?

I want to run SQL Server Vulnerability Assessment from a SQL Server Agent Job. Currently, I am attempting a job with a PowerShell script and am running a command like the one below. Invoke-...
0
votes
0answers
29 views

SSIS Slow Data Transfer between Oracle and SQL Server 2016

I am trying to design a process that transfers data from Oracle to SQL Server 2016 by using SSIS. It is done with the aim of removing productive processes from an SQL Server 2000 instance, where the ...
3
votes
1answer
174 views

Why can't SQL Server optimizer use foreign key

I have the following tables(See below for complete reproducible SQL): ToBeTransferredTemp (ID varchar(100),type varchar(100) NOT NULL, other...) CODES(Key1,Key2,Key3, IDSTRING varchar(100), other...) ...
0
votes
0answers
12 views

Amazon RDS instance recovery during mysqldump

I have a db.t2.small read replica, which crashes every time I run mysqldump. The issues started after I made some table changes - my main suspicion is the use of InnoDB. This replica is used as a ...
0
votes
0answers
25 views

Month on Month count to determine variance of table growth

Good Afternoon Team, Hoping you can help me . Every month i get a count of records associated to a table. What i would like to do is month on month calculate the % variance (between jan vs feb, feb ...
0
votes
0answers
26 views

Left join where IS NULL gives not expected results

I have two MySQL tables where table1 is supposed to contain the exact numbers of rows of the second one and table1.id is supposed to be equal to table2.t1_id. However both tables have different sizes, ...
1
vote
1answer
31 views

Is there a way to group the output of a query based on two rows

I'm not sure my question is asking the right question, so i will be as specific as possible in here. I have the following data which i have changed the values of. Below is the code I am using to ...
0
votes
0answers
50 views

SQL stored procedure returning 0x000000000

I have a stored procedure that executes a number of selects for variable setting ,update and delete queries etc. The stored procedure executes manually without error but in the messages shows ...
0
votes
1answer
25 views

declare table variable inside function

In my stored procedure, I have table variable with a lot of columns. Because I want to simplify the stored procedure I thought i could declare table variable in function like CREATE FUNCTION [dbo].[...
0
votes
1answer
50 views

Is there a database table design to avoid storing table names in a table?

So my scenario demands to store details of businesses which offer varied services. One business can offer n different services. Since each service is different, details pertaining to a service are in ...
0
votes
0answers
42 views

A Procedure Causes Some Blockings In SQL Server [on hold]

There is a stored procedure in my sql server database and it causes so much blockings for itself. Here is the code. How to solve this issue? USE [FATURA] GO /****** Object: StoredProcedure [dbo]....
-1
votes
0answers
26 views

SQL Server crash? [on hold]

My Application on .Net framework using entity framework. I am using stored procedures also sometimes SQL server crash and need to restart server.how to trace why this problem occur?
0
votes
1answer
20 views

Speed up simple MySQL query on large database

I have a database with 1 million records and I frequently run this very simple query: select id from my_table limit 1000000; It takes around 5 seconds to execute. And if I add more columns to the ...
3
votes
1answer
62 views

Restore stuck in ASYNC_IO_COMPLETION

Very frequently when I restore databases the restore operation gets stuck and the wait type is ASYNC_IO_COMPLETION. It can be in such state for 10-20-30 minutes untill it proceeds to ...
0
votes
0answers
23 views

Can a decomposition of a database table into 2nf, or 3nf yeild different table results depending on the sequence of splitting?

I am not able to check if the decomposition of a table into 3nf, or 2nf form will depend on the sequence of decomposition. Please help, I want to be assured that even if I adapt different sequence of ...
0
votes
0answers
13 views

SqlAlchemy on conflict returning id [on hold]

I need to convert a PostgreSQL raw query to SQLAlchemy ORM. base = declarative_base() class table_name(base): __tablename__ = "table_name" id= Column(Integer, primary_key=True, autoincrement=...
0
votes
0answers
20 views

How to Track Table Usage

I need to track usage for 1 table, and log how this table is accessed (select, insert, etc.) and by which logins What is the proper way to do it using SQL Server Audit and Extended Events ? If there ...
0
votes
0answers
19 views

Data Loss issue while migrating data from Source(Oracle) to Data Warehouse Staging Database(SQL Server)

Project Overview Loading data from Oracle Database to Datawarehouse Staging Database(SQL Server). Using ETL process we are loading data from Oracle to SQL Server. Staging Database in SQL server is an ...
0
votes
1answer
26 views

SQL Server - Log file not shrinking in AlwaysOn group

We have three-node AO setup in SQL Server. Primary node, one secondary node in Sync mode and another secondary node in Async mode. Main Database on Primary node, log file-size is 434GB, Used 99.91%. ...
-1
votes
1answer
40 views

How can I achieve the below case in marketing cloud without using loop? [on hold]

I have a table like this and in the table you can see 123 losing to 456, 456 losing to 789 and 789 losing to 101112 and in the same fashion for ID's 5 and 6. In this case I want to replace winner ...
0
votes
0answers
17 views

Postgres Pass Subquery results to function that returns TABLE

I have a function that accepts arrays as parameters and returns a table. I can get the arguments passed in correctly, but it is returning rows of type record. If I try to expand the record with FROM I ...

15 30 50 per page