All Questions

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

SQL Azure Indexes need Rebuilding for Foreign Keys to work

We have a product that runs off SQL databases. Until recently, each of our clients had their own fileserver running SQL Server, however we have now started hosting on Azure for some existing and some ...
0
votes
0answers
4 views

Does plan recompilation happens to plan guide?

Does plan recompilation happens for plan guide due to the, for example, auto update stats? P.S Do not take into account adding a hint OPTION (RECOMPILE) in the plan guide
0
votes
0answers
11 views

Maximum size transaction log and impact

I was doing some research on what the recommended maximum size for the transaction log, but I cannot find any substantiate or documented answer. I learned that a log size of about 25 - 50 percent of ...
0
votes
1answer
14 views

Is it good practice to only delete through a trigger to enforce 'deleted by' auditing?

We've decided to design our database such that we actually delete rows when we want to delete some data, rather than just marking them as deleted, because the latter approach means that you always ...
0
votes
0answers
10 views

Why is for some sessions count of deallocated pages in tempdb bigger than allocated?

Why is for some sessions count of deallocated pages in tempdb bigger than allocated? I used query select session_id, user_objects_alloc_page_count, user_objects_dealloc_page_count, ...
0
votes
0answers
13 views

How to correctly define foreign keys to heterogenous dimensions in fact table?

Question What is the best practice for defining foreign keys in a fact table to multiple different and mutually-exclusive dimension tables? Example Case Business process I am creating a ...
1
vote
1answer
18 views

dbcc checkdb runs for interminably long time, 50% of the time

I've got a nightly maintenance job (largely taken from the ola hallengren maintenance package) that runs database backups and runs an an integrity check on every database. The integrity check part ...
0
votes
1answer
7 views

Aurora vacuum not deleting frozen empty pages?

I recently ended up deleting most of the data in one of our tables, on purpose. Normally the table is append-mostly, with a short window during which updates might happen after the original insert. ...
1
vote
0answers
9 views

Data-tier .bacpac import keeps failing

Within a container, I have SqlServer running in a docker container. It was created like so: docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$1" -p 1433:1433 --name sql1 -v sql1-sqlvolume:/var/opt/...
0
votes
1answer
10 views

Adding a dropped check-constraint what queries the table

I'm using a Postgres to preist a hierarchical data set; the table I'm using is something like this: CREATE TABLE layers ( bucket text not null, uniq_id serial not null, name ...
0
votes
0answers
9 views

How to change the timezone of the table while using timescaledb?

I have the following data in a table in my timescaledb: id | country_code | value | start | end | price_type -----+--------------+-------+-----------------------...
0
votes
0answers
5 views

how to run db.adminCommand() using pymongo for mongodb 3.6

I want to run this command and get it's output using pymongo module. db.adminCommand({getParameter: 1, logLevel: 1}) or say I want to run this command db.adminCommand( { setParameter: 1, ...
0
votes
0answers
12 views

Question about terminology

This question is not about a query-problem. I have used Wordpress and been able to look in the database. I have seen that in the table 'post_meta' there are two columns used together: meta_key ...
0
votes
0answers
6 views

Oracle source with SSIS 2008

I am trying to use an Oracle OleDb source in my SSIS package with no luck, every time I try to connect to the server I get the error: ORA-12154 tns could not resolve the connect identifier ...
-2
votes
0answers
20 views

conversion failed when converting date and/or time from character string c#

Action Method: PayTns std = new PayTns(); std.C_Group = fc["C_Group"]; std.Date = Convert.ToDateTime(fc["Date"]); std.C_Name = fc["C_Name"]; std.D_Group = fc["D_Group"]; std.D_Name = fc["D_Name"]; ...
0
votes
0answers
32 views

Create column referencing multiple PK's from same table

I am trying to create an table, menu items, to use in my front end. Menu items can have 1 or many submenu items. So one column must be able to contain 1 or more ID's from other menu item records. ...
0
votes
0answers
9 views

Backup and upgrade MongoDB databases

I have a web application using MongoDB (Version 2.6.12), hosted in a (Ubuntu 16.04) server of DigitalOcean. I like to use Robo 3T to connect to the remote database and do simple queries. Sometimes I ...
1
vote
1answer
19 views

Will Postgres use a multi-column index when setting multiple colums not null?

Typically, when I set a column not null, if it doesn't have an index then I add it first, so that postgres can (hopefully) use the index while doing the table scan while locking the table, so that the ...
0
votes
0answers
29 views

SQL Deadlock History [duplicate]

What query can I run to display historical deadlocks? I can see the current days deadlocks by going into "Management - Extended Events - system_health - package0.event_file" and looking at the ...
0
votes
1answer
11 views

Availability Group: Is it possible not to do automatic failover for particular groups?

We've got two Windows Server 2016 with SQLServer 2016 on AWS EC2 instances (node 1 and node 2) Because we're using a standard edition, we're limited to having one database per availability group. ...
-1
votes
0answers
27 views

Uninstall SQL Server 2016

I have SQL Server 2012 and SQL Server 2016 standard named instance on same server and we would like to update Sql 2016 to Sql 2014, Is it any way we directly upgrade the version on a same server where ...
0
votes
1answer
20 views

The OLE DB provider “MSDASQL” for linked server “(null)” reported an error

I created a linked server to MySQL database server on my SQL Server database server. I tested the connection. It succeeded successfully for MySQL connection. I can see the databases on MySQL instance ...
0
votes
0answers
17 views

After enabling SSL in Oracle user must log in twice

I've enabled SSL for my Oracle 12c DB. The lsnr starts up fine and I can access it via a sqlplus / as sysdba (no password auth there, it's OS local). However, if I attempt to connect as a user which ...
0
votes
1answer
22 views

Add Postgresql server to postgres-common

I've created postgresql cluster using initdb. Now I can't use it with common tools. Can i somehow add this cluster or if no, how can i delete it to create new one with pg_createcluster. I know there's ...
1
vote
1answer
25 views

Why is autovacuum running during a VACUUM FREEZE on the whole database?

I have a 14.7 TB Postgres(9.1) database that has to endure heavy writes for prolonged periods of time. I know that I need to closely manage my transaction ids to prevent db lockup. Recently I noticed ...
0
votes
0answers
16 views

How can I find out who and when deleted particular database user from oracle database

I am trying to investigate some database users that used to exist in the system. I am interested when and who deleted the database user from the oracle database. Does oracle have any table or way ...
0
votes
0answers
17 views

How to separate a part of a string from other parts in Oracle PL-SQL using “regular_expression”

I have a string like this : string := ' (sum(x) = 12 and sum(y) = 13 and sum(z) = 14 ) and w = 'p' AND q = 'p' AND ...
0
votes
0answers
34 views

SQL Server Error - The wait operation timed out (provider: TCP Provider, error: 0 - The wait operation timed out.)

I'm running a couple web applications on the same set of servers. In my logs across a number of different queries in both apps (as well as calls to the ASPState session state database) I see errors ...
0
votes
1answer
21 views

How to update data with a trigger function and a join

I have two relations : CREATE TABLE relation_a (id_a int PRIMARY KEY, field_1 int); CREATE TABLE relation_b (id_b int PRIMARY KEY,fk_a int REFERENCES relation_a(id_a), field_1 int); INSERT INTO ...
0
votes
1answer
21 views

Database Design for Employee Information

I would like to ask if I'm doing this right since it's my first time creating a database model. Basically what I'm trying do build is an Employee Information model where: An employee can have ...
1
vote
1answer
32 views

Is filling up plan cache causes a decrease in space allocated for data cache?

SQL Server uses allocated server memory for different kind of purposes. Two of them are plan cache and data cache which are used to store execution plans and actual data correspondingly. My question: ...
0
votes
1answer
16 views

Remote mysql only works from my computer, but no others

I need a direct connection to a MySQL server on a remote web server. So I've added to cpanel access hosts list an IP of the computer I wish to connect to the remote web server. But I can't connect, ...
0
votes
1answer
15 views

How to insert json into a table and have certain columns remain json [closed]

I want to insert data into a table where the first level keys are inserted as values and not as json. Although column "p_attribute" needs to store the nested json. For example, in case of Jane Doe, I ...
0
votes
0answers
10 views

SSMS sql server logs rotate date [closed]

we have a sql server which rotates it's logs using a job. But the rotation/creation date of the log is not shown (see screenshot). Any help would be great!
0
votes
1answer
18 views

MariaDB 10.1 shutdown stuck at “Event Scheduler: Purging the queue”

I have read many different questions about slow MariaDB/MySQL shutdown, but I have not found an answer which solves my problem yet. On one of our servers with the highest load, when I issue a stop ...
0
votes
1answer
13 views

Fetching records using some unknown join

I have two tables: 1. Users 2. Ratings Users table have columns i.e. id, name etc. Ratings table have columns i.e. - id, rate_by_id, rate_to_id etc. I want to display all the ratings in a table. ...
-2
votes
0answers
16 views

MS-SQL Server 2016 Installation Error [closed]

I'm trying to install MS-SQL Server 2016, But along away I'm getting the following Error: Please help me on how aI get Solve this error. Thanks in Advance.
-1
votes
0answers
7 views

How to import data from AWS data lake to PostgreSQL DB?

We got already existing product which pushed data to AWS data lake and currently we are manually using that that data for some external processing. Now we are creating a product with PostgreSQL DB. We ...
0
votes
0answers
8 views

I am unable to extract numeric fields from a PostgreSQL database using Dart and the Postgres package

I have a simple, single row, PostgreSQL database table that includes a numeric(8,2) field, set to 120.00, and a character field set to 'N'. This is a Windows 10 setup. When I run the following Dart ...
0
votes
1answer
24 views

Why does this mysql query take so long?

I have a MySQL server (ver 5.6) that is well equipped with hardware (Linux, in AWS, 32GB RAM, 56 CPUs), and according to top and iotop, it isn't even feeling warm; yet this query takes something like ...
0
votes
1answer
25 views

Two left joins not working [closed]

EDIT: Ok, so I managed to get something but it only changes to table on the left side even though I gave 2 specific left joins. SELECT speler.Roepnaam as team1, wedstrijd.Speler2ID as team2 FROM ...
0
votes
0answers
20 views

How to load generated Microsoft SQL Server database capture scripts into Oracle SQL Developer 19.4?

I'm following Oracle documentation to migrate an Microsoft SQL Server database to an Oracle schema. I have generated offline database capture scripts properly and I need to load those into Oracle SQL ...
0
votes
0answers
12 views

getting all files into one database

so i have got around 50 acces files wich contain some data that data has exactly the same structure i mean tables are the same i just posted the images to show they are the same however they all ...
0
votes
0answers
12 views

MongoDB indexing strategy for any subsequence of multiple fields

Let's say I have huge mongodb collection and each element has fields A, B, C, D, E. I want to filter this collection by different groups of this fields like ABC, BDE, AE and so on. Documentation says ...
0
votes
1answer
16 views

MySQL, get rows for non-matching reference or reference does not exist in other table

MySQL, select non-matching reference or reference does not exist in other table. For example. table: category category_id, category_name 1 XYZ_1 2 XYZ_2 3 ...
1
vote
0answers
50 views

My question is in a select statement how do you return the RID along with the table data?

I need your help with a concept I want to show developers, that concept is to help them understand how SQL Server retrieves data from a table. In the event that a developer does not use a clustered ...
0
votes
2answers
30 views

Permission to select sys tables in stored procedure

I have implemented the stored procedure to check if a specific [schema].[procedure] exists. CREATE PROCEDURE [BlobCheckExisting].[usp_DoesStoredProcedureExist] @schemaName varchar(128), @...
0
votes
0answers
8 views

Losing connection to the server when using PG Routing function pgr_alphaShapes

I am running PG Routing v. 3.0 on Postgresql 12.2 and the pgr_alphaShapes function is giving me a lot of trouble. Following the documentation here, I passed a geometry and a spoon radius. SELECT * ...
1
vote
1answer
22 views

Improve PostgreSQL SELECT performance in a parent table (inheritance)

I have a PostgreSQL 9.2 database where each account has a schema, like below: My_Database |-> Schemas |-> AccountA |-> AccountB |-> AccountC |-> AccountD |-> ...
0
votes
1answer
17 views

Table normalisation and empty values

Here are two ways I can optimise mapping of a text field with several other attributes to question and answer. First approach is, creating a map table with both question_id and answer_id in which ...

15 30 50 per page
1
2 3 4 5
1670