All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
1 view

Inserting Millions Records Into A Table With Identity Column In Sql Server

I was changing the primary key column to different column on a table which contains about 300 million records in itself. I used the table design screen to change it but it got time-out. And, i decided ...
0
votes
0answers
6 views

Recognizing a timestamp

I am looking at some sample data and I noticed that the transaction datetime is 42,814,662,041,308. Can anyone help me convert it please? I have already tried converting using Epoch Unix time
1
vote
0answers
5 views

PostgreSQL Serializable unique key violation on different ids

Serializable isolation mode can be used to avoid race conditions when upserting equal ids. So for create table u(uid int primary key, name text); if we run two similar transactions T1 and T2: begin ...
0
votes
0answers
6 views

How to store a bunch of columns and where you don't know how many there will be, the columns change, and new columns are introduced

So the so source of the data is the internet, and random bots that submit values to my apache server. Periodically new columns appear, but they are not always present. The other problem is then you ...
-3
votes
0answers
18 views

Which is faster in Windows service and Sql server Jobs and Why?

I am working on a application and we have created a stored procedure which is updating and selecting some data. We have not used Transaction in SP. Now we are calling this sp from windows services and ...
0
votes
0answers
5 views

MariaDB - Simulate LEAD with LIMIT i+1

I have an ordered set of rows that I need to filter. The filter condition compares a record with the next record in the list. So I'm trying to assign the next row's value into @leadTime below... ...
0
votes
1answer
20 views

Sql server sleeping state is increasing using ADO.NET?

We have one live ASP.Net application which is used by around 1000 concurrent users. In this application we have used connection pooling. There are 2 connection string defined in web.config with ...
0
votes
1answer
12 views

Use quoted schema in an insert statement executed thorough PreparedStatement in Java

I created an unquoted table my_table under a quoted schema "Quoted_User". When executing the statement INSERT INTO "Quoted_User".my_table (custom_id) VALUES (DEFAULT) using the Intellij Oracle ...
0
votes
2answers
20 views

Counting duplicate instances within column in SQL when grouping by another column

My DB looks something like the following: id | Name | JOBID ----+--------+------ 1 | Sam | a 2 | Sam | b 3 | Ali | b 4 | Tim | c 5 | Tim | d 6 | Fin | a 7 | Mona | ...
1
vote
1answer
27 views

Is it safe to stop the shrinking of MSDB?

In a production server (Microsoft SQL Server 2014), the file MSDBData.mdf ballooned up to more than 450 GB, eating almost all the space in the server (only 38 GB remaining). First thing, I created ...
1
vote
0answers
30 views

Does Log File contain both committed and uncommitted transactions?

My question is related to SQL Server architecture. Mainly log file. In the picture below it says that when transaction is committed, log record in LOG CACHE will be moved to Log file. Does it mean ...
1
vote
0answers
14 views

By using SQL Window Functions, how can I get the lead of the last row in a partition?

Considering the following simple example: select lead(c) over (partition by a order by a) from (values (1,'1','date1'), (1,'2','date1'), (2,null,'date2') ) t(a,b,c) The first two ...
-2
votes
0answers
14 views

help me in database normalization and ERD [on hold]

pleas can any one help me in my database assignment i have problem with the normalization and Entity relationship diagram
0
votes
0answers
2 views

Cannot create or use an SSIS package template in SSDT 2017

ENV: Using VS 2017 Professional/SSDT 2017 on Win10 pro. Our company does NOT allow developers to have Admin Rights on their laptops so the ONLY way to create and use a template is to save it in the ...
0
votes
0answers
10 views

MySQL: INSERT INTO SELECT issues

Consider the following tables: => table1 | aid | | --- | | a1 | | a1 | | a3 | | a2 | | ... | => table2 | aid | count | va | vb | | --- | ----- | ----- | ----- | | a1 | c1 | va1 ...
1
vote
1answer
21 views

How to query/monitor index fragmentation?

I have been a DBA for 3 months now at my first job out of college and I am having a significant amount of difficulty trying to figure out how to accurately query and report on index fragmentation ...
1
vote
2answers
21 views

Incremental backup between now and backup taken one week ago

We do a full backup of our SQL Server 2012 database every night. A new developer needs an incremental (or differential) backup of a backup we took one week ago. The reason is that for them, ...
0
votes
0answers
11 views

Frequency of table update in postgresql?

Given postgres 11. I'm looking for statistics on how often a particular table gets something inserted/updated/deleted. There's of course this: https://www.postgresql.org/docs/11/monitoring-stats....
1
vote
0answers
12 views

Informatica MD5 function vs SQL Hashbytes MD5 function

I am hoping someone has some crossover experience here. I am attempting to utilize the Hashbytes function within SQL to match a value that is being generated utilizing the MD5 function from ...
0
votes
0answers
14 views

Copy package in Production DB to Test DB with dependencies?

This is my first question here, so please let me know if this isn't the right place to ask. I'm a new programmer, fresh out of school. Primarily I develop in Python/C#, with a dash of SQL when needed....
-3
votes
2answers
53 views

Size of an empty database too large

Related to SQL Server 2016. I have a database with five empty tables, let's say db1. I have another database with almost 100 tables and with a data in it, db2. I observed that the size of db1 ...
1
vote
1answer
17 views

Remove expired certificate SQL Server

I am trying to delete an expired certificate from my database server. The certificate was used to encrypt connections to sql server 2014 r2. We no longer have a need to encrypt connections and so we ...
0
votes
1answer
42 views

Oracle database issues

I had my database working properly but I had an issue and when I tried to repair it I executed the following command alter tablespace system add datafile '/var/oracle/oradata/data.dbf' size 10000m ...
6
votes
1answer
153 views

SQL Server Management Studio - Why is Dark Theme Disabled by Default?

Why is the Dark theme disabled by default? Are there some bugs with this theme or something along those lines? It seems odd to me that it is forcible disabled on purpose. I found plenty of links ...
2
votes
2answers
13 views

Azure blob storage container vs VM managed disk for SQL on Azure VM database files

Are there benefits specific to SQL Server on Azure VM when using the SQL Server Data Files in Windows Azure feature? Aka using Azure blob storage container for database files versus an Azure VM data ...
-1
votes
1answer
21 views

how many concurrent session does oracle database support

I want to have an application linked to oracle database the users will request data through the app and the app will access the database and retrieve the info. my question is how many concurrent ...
0
votes
0answers
4 views

Should Amazon RDS SQL Server 2017 Web Edition Max Memory settings be different from that of a locally installed instance?

We have an Amazon RDS SQL Server Web Edition on Windows Server 2012 with 2 processors and 8GB RAM. Should I configure the Max Memory similar to that of an instance on a local server i.e keeping back 3-...
-1
votes
0answers
25 views

Partition every table [duplicate]

Recently i read about partitioning. I was thinking whether it is good idea to partition every possible table(if it's schema allows us to do so). Every table that has some Date column can be ...
0
votes
2answers
27 views

Select/print data from subquery

In my application I have a table "user", a table "role", and a table "userroles". Userroles is simple table consisting of user, role, where user corresponds to the id column of the user table. As user ...
0
votes
2answers
30 views

How is my software conecting on my SQL Server if it failover via availability groups?

I'm a Little confused about this topic. I know with a default instance, we can create a cluster with let's say, with the ip x.x.x.10. then automatically this IP will connect to the x.x.x.9 that is ...
2
votes
1answer
10 views

Implementing a degenerate dimension with an alphanumeric varchar(30) at the transaction level?

I am currently working on designing my first data model and I am confused about this particular implementation of degenerate dimensions. According to Kimball's design tip 46, a degenerate dimension ...
1
vote
2answers
38 views

How to Speed Up my SQL Query?

I have a query that is taking much longer than I expect it should, and I can not figure out how to speed it up. For a little bit of background on the table structure, these are audited records. There'...
0
votes
0answers
6 views

index corrupt error while trying to index a large table

I am trying to index a large table, approximately 12 million rows and 33GB in size. There is currently no indexing on the table. When I am trying to index one of the columns in a table, I get the ...
0
votes
0answers
15 views

TDE Encryption and “Recovery Pending” After Service Reebot

I've recently enable the TDE Encryption in a SQL Server 2012. I've setup de Encrytion key and the certificate in Production and exported to the Test Environment in order to copy/update test environmet....
1
vote
2answers
32 views

Ensure total order in table via constraint

Suppose I have a table create table log (id serial, logged_at timestamp, event_type integer) Can I efficiently (without making every row writable only once or by some special user) ensure that ∄ (r1,...
-1
votes
0answers
5 views

Transpose/pivot rows if the ID is the same

I have the following table (sorry for the formatting, I tried...): id |activity_type |date |file_id 1 |UPLOADED |12/01/2019 |1 2 |DELETED |12/01/2019 |1 3 |UPLOADED |...
1
vote
0answers
28 views

Remove DTC Support From SQL Server 2016

My application is running in Azure SQL which doesn't support DTC. We only use Azure SQL in upper environments. In the local development environments, we're still using SQL Server 2016. I want to ...
1
vote
1answer
9 views

Informix trigger to delete records before insert

I am trying to create a trigger to simply delete records from systables_growth table before an insert happens based on the where clause used on the date_added column for records older than a certain ...
2
votes
1answer
31 views

Log Shipping and Daily Backup

My SQL Server 2012 DR setup is a mess. We've had a maintenance plan in place from the beginning that takes a daily full backup, with hourly log backups. Recently, we set up log shipping to an off-site ...
0
votes
0answers
7 views

Query to fetch records using pivot in Postgres

I have the following table: CREATE TABLE public.flights ( flightid uuid NULL, keys varchar(255) NULL, value varchar(255) NULL ); INSERT INTO flights (flightid,keys,value,crdate) VALUES (...
0
votes
0answers
3 views

Relay log read fail, relay or master log currupt ,How to repair?

I am running mysql InnoDB cluster 8.0.17(group replication) During the repication the slave disk gets full and no space left at all the thread waits for the disk space to be freed at the same time ...
0
votes
0answers
11 views

Schema design: Anonymous user's data across registration

This is a schema design question; implementation is going to be Mongo, but answers are platform agnostic. Given an app, which has users, sessions, and items. All visitors will have a session ...
1
vote
1answer
33 views

Why do I get a BIGINT overflow on MySQL only for some queries?

I've encountered a weird situation In MySQL5.7. Of course, the below query is failed as I expected: mysql> SELECT 18446744073709551615 + 1; ERROR 1690 (22003): BIGINT UNSIGNED value is out of ...
1
vote
0answers
9 views

AWS aurora (postgres) proper value for the shared_buffers parameter

I think it's fairly well known that a normal PostgreSQL database has a starting value of 25% of system memory for its shared_buffers parameter, but I haven't been able to find anything regarding a ...
0
votes
1answer
19 views

How to put result of SQL into bind variable

I'm trying to put the result of the query into a bind variable like this, but doesn't work: var teste number; exec :teste := (select trunc(avg(e.salary),2) from hr.employees e); How I make it to ...
1
vote
1answer
24 views

Memory issue in Transactional Replication

I want to replicate a data of 500 GB through transactional replication once in a day, so my query is this, will it create a new file in the snapshot folder on daily basis of 200-300 GB or will update ...
1
vote
2answers
40 views

Joining unrelated data

I have two tables. Each table has a single column with 2 records. How would I go about merging the columns from both tables into another? For instance, the first table has records 1 and 2, and the ...
0
votes
0answers
12 views

MongoDB restoring to existing replica set (avoid creating a new one)

I have a MongoDB cluster runnning on 3 AWS EC2 instances, 1 for primary and 2 secondary nodes. I'm trying to perform a backup and restore without having to recreate the replica set. mongodump seems a ...
0
votes
1answer
39 views

CU8 for 2016SP2 error

When upgrading to CU8 on 2016SP2, I get the following error Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files. ...
0
votes
0answers
17 views

MongoDB replica set in swarm gets very slow when one node is down

I created a 3 nodes replicaset with mongodb that I host in a swarm environment. To do so, I created 3 services mongo1, mongo2, mongo3 with the same configuration. When I challenged the resiliency of ...

15 30 50 per page