All Questions

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

Performance Tuning

I need input on the below queries in terms of which one is better from performance perspective. Query#1: DECLARE @Var1 NVARCHAR(15) = NULL; -- This variable can have NULL or specific value SELECT ...
0
votes
0answers
4 views

Unknown Property error while installing SQL Server Management Studio 2008 R2

I am unable to install SQL Server 2008 RT. I am receiving the error "unknown property". I would be thankful if someone can help me with this. Please let me know if you need any further information to ...
0
votes
0answers
8 views

How to split one tables rows into multiple child tables?

I have a table with approximately 2 million records in old_parent that I need to split into the table structure below it. I've tried using something like a CTE using a method I saw here. Example: ...
0
votes
0answers
10 views

Create a messages table that has restrictions on who can send messages

I'm creating a table for a web application, the web application has a messaging feature. The web application has normal users (let's call them visitors) and companies. Essentially, the companies are ...
0
votes
0answers
7 views

Cassandra data modelling for IOT devices

We are building a micro service based IOT platform with a dashboard and views of various sensors etc. I have seen a few data modelling videos but I am not able to arrive at a good data model in ...
0
votes
0answers
7 views

How to get MySQL database to stop repeatedly turning itself off and on?

I am running a local MySQL database on my Macbook, and when it works it works. But every once in awhile, it will have turned itself off. Then when I start it again, it will repeatedly stop and start ...
0
votes
1answer
25 views

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
10 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
15 views

PostgreSQL Serialisation failure 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
9 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
21 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... ...
2
votes
1answer
43 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
17 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
32 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
36 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
34 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
15 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
1answer
18 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
23 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
13 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
1answer
18 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
44 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
15 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
22 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
13 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
43 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
7 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
35 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 ...
2
votes
1answer
15 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 ...

15 30 50 per page