All Questions

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

HOW TO INSTALL PYODBC FOR ACCESS

I'm making a program that will need to get some information from an Access database file. In my research, I find out this was possible with pyodbc. I have finally succeeded to install this module ...
2
votes
1answer
9 views

Get the full text of a long request

How to get the full text of the request from the following request: SELECT t.[text] FROM sys.dm_exec_requests AS r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS t Here, with a sufficiently long ...
1
vote
1answer
220 views

mysql deadlock when update some items whose id are selected from another table

I'm sorry, I just can speak a little English. I have two machines(10.10.102.101, 10.10.102.104) which connect to the same mysql datebase. This is a table and deadlock happened on it. mysql> ...
6
votes
3answers
12k views

Restoring from pg_dump with foreign key constraints

In restoring a database from a pg_dump, a number of errors are being generated and the whole table is subsequently being ignored. An example: ERROR: insert or update on table "channelproducts" ...
11
votes
2answers
340 views

SQLServer Upgrade Advisor 2014 hanging

I try to run SQL Server Upgrade Advisor 2014 against a SQL Server 2008 server. Everything looks fine when connecting to the 2008 server and I can select which database I would like to analyze. But ...
1
vote
1answer
300 views

Service Discovery for MongoDB

What is the best way of implement a Service Discovery like ETCD for use in a mongodb cluster? I wish have, 1 master for HA and two nodes, in my master i have a static ip, but nodes maybe can changes ...
4
votes
1answer
39 views

SQL Server query scanning more partitions than expected

So my team has the following select statement in one of our stored procedures SELECT ai.Name ,dc.Component ,SUM(dc.Value) Value FROM Warm.DailyCosts dc JOIN Warm.AccountInfo ai ...
0
votes
1answer
562 views

mysql trigger to trigger only if record doesn't exist

The following trigger : DELIMITER // CREATE TRIGGER auo_mtltp AFTER UPDATE ON master_table_linfomasltp2016 FOR EACH ROW BEGIN IF (NEW.IMHQ_solicitado = 'SI') THEN ...
0
votes
2answers
163 views

Granting a SQL Server database only user execute on xp_instance_regread fails

So I'm not finding an answer to my specific issue. SQL Server 2012 database SSMS 17 admin tool Log on as a database (not domain) user foo. Receive sys.xp_instance_regread no permission errors. In ...
-3
votes
2answers
25 views

SQL Server Always On Availability Group

I have problem with MS SQL Always On Availability. Suppose the connection between primary and secondary replica is broken. The client inserts data to the primary database (replication cannot be done ...
9
votes
5answers
67k views

How to display database structure in phpMyAdmin?

Is there any way to generate a report of my database structure using phpMyAdmin? What I would like is a table format like the following, and an Entity Relationship table. Table name: List ...
0
votes
1answer
2k views

How to load balance mongodb replica cluster

I have created a mongod replica cluster of 2 nodes , mongo1 and mongo2. to load balance I have added following rule in my haproxy listen mongo_replica_cluster bind *:27017 mode tcp ...
40
votes
3answers
59k views

What is the search_path for a given database and user?

I can see the current search_path with: show search_path ; And I can set the search_path for the current session with: set search_path = "$user", public, postgis; As well, I can permanently set ...
3
votes
2answers
1k views

Syncronize mysql databases between local and hosted servers automatically

We have many websites with Development, Staging and Production servers. We have many developers for many projects. We need a solution to synchronize the developer and staging databases. After that one ...
5
votes
1answer
532 views

How to Achieve Concurrent Write Transactions to MySQL Group Replication in Multi-Primary Mode

I've set up a MySQL "cluster" (four CentOS 7 servers running MySQL 5.7.19) using Group Replication in multi-primary mode, but I can't get it to accept writes from more than one thread at a time. This ...
0
votes
1answer
1k views

Import issue: Missing columns values from CSV file

I have a problem with the importing of a CSV file to my table in MySQL. The values (3) of the columns (var1, var2, dates) are not loading, as shown in the image below: First I created the table, ...
1
vote
2answers
110 views

SQL Server bulk transfer help needed

We've got this very badly designed logging table that we want to add functionality to. The problem is that it's already a scalability nightmare and we want to fix the design before adding to it, but ...
0
votes
1answer
122 views

RAID drives or replicate data?

I have an old Microsoft SQL server that, for financial reasons, I cannot replace until later in the year. The OS, DB and temp files are on one 10k RAID 5 array (I didn't design it) The server is ...
1
vote
1answer
46 views
+50

Do long-running and locking queries on subscriber databases cause performance issues on the publisher dbs?

One of our servers has a subscriber database. I've not used replication before and cannot find information on how the mechanism works. Does the publisher have to wait on the replication completing ...
0
votes
1answer
9 views

Postgres VACUUM taking forever

I have an specific table that is taking forever o VACUUM. There are no locks in the DB and even letting it overnight the VACUUM didn't finish. According to the statistics (ANALYZE works fine) the ...
0
votes
3answers
27 views

In-place upgrade vs. new install

My search for this question yielded some similar questions, but none that I could see exactly like this. Question: In your experience, when doing a SQL Server upgrade, say from 2008 to 2017, or from ...
1
vote
1answer
423 views

Parent / Child relation appears to insert out of order via EntityFramework

I'm facing a peculiar issue, when the following code completes, and using (var db = new DbContext()) { var msReceived = new MilestonesReceived() { ...
2
votes
0answers
18 views

What happen with the Log backup if I set the SQL Server clock back?

What happen with the Log backups if I set the SQL Server clock back? In countries with daylight saving this happens at least once a year. Will the point in time restore with the STOPAT option fail? ...
3
votes
3answers
35 views

Any drawbacks of using GIN PostgreSQL index for an integer foreign key?

I have a large table (600 millions rows) with a foreign key other_id of type integer. A single value of the foreign key is repeated about 100 times on average. I need to have an index on that FK ...
0
votes
0answers
43 views

Multiple mdf, empty one is missing

Hi guys i have a big problem. I know i did such stupid and unforgivable mistake. And know please help me if you can. I wanted to make copy of database. I should make it by backup and then restore as ...
8
votes
3answers
2k views

Speed up creation of Postgres partial index

I am trying to create partial indexes for a large (1.2TB), static table in Postgres 9.4. My data is completely static, so I am able to insert all data, then create all indexes. In this 1.2TB table, ...
0
votes
1answer
1k views

Inheritance and foreign keys in Postgres

This is about using inheritance and foreign keys in Postgresql databases. Consider the following simplistic example whose structure is based on what I am building at the moment (but the specifics ...
0
votes
2answers
20 views

How to get last inserted rows where a condition is satisfied

table1: esps -------------- A B C -------------- table2: id _name esp ------------------------------ 1 Ana A 2 Ana B 3 Mario A 4 Jorge A 5 ...
0
votes
2answers
468 views

How can I find out who is trying to connect to my MongoDB?

I have a MongoDB server that I recently configured to allow only SSL connections. Now my mongo.log is filled with this: 2017-05-30T17:39:24.528+0000 I NETWORK [conn7881820] AssertionException ...
4
votes
2answers
70 views

SQL Server - Inconsistent, hidden machine precision error when truncating result of LOG to integer

I noticed some strange rounding behavior in SQL Server (2008R2 at least) when casting log base 10 of 1000 to an integer. The answer is clearly the exact value 3, but there must be some decimals SQL ...
0
votes
0answers
9 views

MySQL Service won't start with error [ERROR] InnoDB: Trying to access page number 4294963199 in space 0

My MySQL installation on Ubuntu 18.04 crashed and now won't start. The error log says Trying to access page number 4294963199 in space 0, space name innodb_system, which is outside the ...
0
votes
1answer
624 views

Restoring multiple files to multiple database with pg_restore

I have multiple dump files and want to restore them with single command. something like this pg_restore -h localhost -p 5432 -U postgres -d gl_election gl_world gl_tourism -c "gl_election" ...
1
vote
1answer
9 views

Database design for bidirectional relationship

I am modeling a bidirectional relationship between users with a relationship table. Each relationship deals with two and only two users. Each direction of the relationship allows for 3 different ...
1
vote
1answer
44 views

Oracle - loop through list of databases to check status

I have a table with database names and connection strings. Do you know any method to loop through the list of database names (and/or the connection details) and test database connectivity (just need ...
0
votes
0answers
4 views

The monthly average of occurrence of two items based on Document Number is challenging

I am wanting to know how many times a month, on average, a particular item was matched with another item, based on Document Number. Some of the functions I am attempting are not working properly and ...
4
votes
2answers
7k views

How to change the path of temp file,redo log file when restore an rman backup on another machine?

I am trying to migrate my database (11.2.0.4) A to another machine by using rman backup. At present, in the source machine, the redo log file, temp file is stored under the directory foo (/foo). In ...
0
votes
0answers
7 views

How do I fix problem connecting to Oracle APEX with Express Edition 11g

These are the results of host lsnrctl start which is being run as sys as sysdba LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 16-AUG-2019 15:33:27 Copyright (c) 1991, 2014, Oracle. ...
0
votes
0answers
9 views

I'm using Transaction Replication and some commands are deadlocking on the subscriber, do I need to re-initialize replication?

I'm trying to understand the nuts and bolts of transactional replication and I have a few questions: 1) If a subscriber command fails to replicate, where is this logged? 2) How am I notified if a ...
1
vote
2answers
36 views

Need to move TempDB to another drive. But its files cannot be dropped or shrunk

Today I had a task to move all TempDB files to a new, smaller drive (RAMdisk). I analysed TempDB files space usage - not all the space inside of its files was used so I decided that new drive is ok. ...
0
votes
1answer
567 views

Amount of time FULL VACUUM/VACUUM

I have a table "lng_grid_test", which, at the beginning, had around 600 000 000 around. The table is defined as : -- Table: public.lng_grid_test -- DROP TABLE public.lng_grid_test; CREATE TABLE ...
0
votes
1answer
37 views

Slow query in production, bad execution plan or bad index?

I've just fixed a production performance issue by dropping an index and recreate it. I suspect dropping the index also dropped executions plans that used it and one of them happen to be bad. ...
97
votes
5answers
32k views

Why use both TRUNCATE and DROP?

In the system I work on there are a lot of stored procedures and SQL scripts that make use of temporary tables. After using these tables it's good practice to drop them. Many of my colleagues (almost ...
-2
votes
0answers
19 views

What would be the suitable certification for SQL Data protection and privacy?

This posting is not related to any specific issue. I couldn't find suitable Certification code related to SQL Data Protection , Privacy , SOX ( Sections 302,404,408, 409 etc..) What would be the ...
0
votes
2answers
33 views

Return rows that meet a condition in two different columns

I have the following table describing the color and smell of an animal. I am trying to filter it to see what animals are the same color and smell. I do not care if multiple animals use the same color ...
0
votes
0answers
42 views

Assistance with appropriate schema for this dataset involving the services of parcel couriers

I would like some assistance with the appropriate schema for this dataset. I initially thought that it would be simple to determine which table should contain which data and which columns should ...
0
votes
1answer
30 views

How to make PG query faster even when it is using indices

I have a PG table with about 30M records. I'm noticing that when I query the table with IN clause that would fetch lot of rows, the query is taking a long time to respond (~3 minutes) Question ...
0
votes
3answers
48 views

Array containment queries in Postgres

Question on GIN index on array. I have 2 million rows in a work table.And I need to find work that a user can do, based on the skills he has. User always will have more skills. Started with RDMS ...
0
votes
1answer
229 views

Couchbase 4.5.1: What is beam.smp and why it is consuming too much memory

We are having a single node Couchbase [4.5.1-2844 Community Edition (build-2844)]. For some reason, we are seeing high memory usage on the server. When we log into the server and view the stats we ...
1
vote
1answer
1k views

Could not connect to the specific instance. MySQL error number 1045. Access denied for user 'root'@'my public ip' (using password:YES)

I was using MySQL query Browser in my system and type the IP address of the remote Server and log in. I tried to create a store procedure and scheduled an event to call the procedure every two minutes....
0
votes
1answer
37 views

MariaDB slave replication stopped after slave upgrade to 10.1.41

After the recent MariaDB 10.1.41 update which happened on 01/Aug/2019, few of our slaves have stopped syncing relay logs from master which is on 10.1.40. Slaves which got automatically updated to 10.1....

15 30 50 per page