All Questions

0
votes
0answers
8 views

How avoid updating unnecessary columns in Update statement?

I have an Update statement which update several columns. Some of those columns are nvarchar(max) type and not always need to be updated. I would like to avoid updating unnecessary columns, so, the ...
1
vote
0answers
4 views

SQL Server Audit File Metrics Information

I'm currently working in an environment that requires we enable SQL Server Audit, enterprise-wide. We generate .sqlaudit files as we have retention and access guidelines, and I'm finding that we need ...
0
votes
0answers
6 views

Can we create read only service for Oracle primary database

We have 1 Oracle primary database 12c without any active standby. Could we cra read only service ?
0
votes
0answers
12 views

SQL Server - CASE for multiple tables

hope I can explain myself right in this question. I have three (3) tables from which I have to build a report, this is the data selection process I need to do in order to correctly output the data to ...
-2
votes
0answers
8 views

Open source database for testing algorithm

I have developed algorithm which probably would optimize query executions and accuracy of results. I am seeking for some open source or free database systems where I could run this algorithm. Even ...
0
votes
0answers
3 views

VS 2019 - Schema Compare - “The certificate chain was issued by an authority that is not trusted” when TrustServerCertificate=True

I'm trying to do a schema compare in VS 2019 with Active Directory Password Authentication. The account I'm using works in SSMS, but fails in VS with the following error, even when ...
0
votes
0answers
4 views

Mysql not writing to binlog

Mysql is not writing events to binlog, I have tried change the binlog configurations, but can't solve. Conf: server_id = 2 log-bin = master binlog_format = row replicate-do-db = our_db log-slave-...
0
votes
1answer
25 views

SQL Server 2017 Configuration Problems

On my Development Server I have two instances configured; the default and one for our ERP system testing. I can connect to the ERP instance remotely with no problems. However, I cannot connect to the ...
-1
votes
0answers
20 views

Migrating Data to another database and changing all ID values

I'm currently seeking some advice on a project that the team and I have been asked to deliver on. The project is to migrate the data for one of our customers, from a production DB in the UK, to a ...
3
votes
1answer
33 views

why it is doing index seek

I created a sample table as below CREATE TABLE [dbo].[StatisticsDemo]( [ID] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](50) NULL ) ON [PRIMARY] Then I inserted below data as below: ...
0
votes
0answers
6 views

Lock wait timeout in error.log

Is there a way to put messages like 'Error Code: 1205. Lock wait timeout exceeded; try restarting transaction' into error.log in MySQL? MySQL: 5.7.26 | log_error | /var/log/mysql/error.lo ...
0
votes
0answers
9 views

In a replication setup, does corrupted data also gets replicated?

Say one of the tables got corrupted, will that corrupted table still get replicated to the other DB? Or, will the replication stop to prevent the other DB from being corrupted too? Note: Question is ...
1
vote
0answers
13 views

Levenshtein distance on MariaDB

is there any official or "de-facto" official implementation of Levenshtein distance on MariaDB 10.2 or 10.3? I found this https://github.com/juanmirocks/Levenshtein-MySQL-UDF, but I want to be sure ...
0
votes
0answers
9 views

R Studio Error '/ not defined for Date Objects '

Bit of a newbie to R. Get this error running a regular report that other guys in my team run ok. Went through and compared librarys were ok ? Customers1$date <- Sys.Date() Customers1$MonthsLive &...
0
votes
0answers
32 views

Alter view after table drop

I want to alter the view for the drop tables. For an example: View: create view View1 as select * from table1 union all select * from table2 union all select * from table3 union all select * from ...
0
votes
0answers
12 views

Undone the table partition for a particular year

I have implemented partitioning for a particular table, in such a way that user can partition min 1 and max upto 52, to a particular table for a particular year. Now, after performing partitioning, I ...
0
votes
1answer
14 views

how to update a column from another database?

I would like to update a field that has been delete from the backup database. how can I update the field from an other database
0
votes
0answers
16 views

[SSISDB].[internal].[cleanup_server_retention_window] Foreign key Violation

I have setup a job to cleanup SSISDB with predefined storeprocedure "[SSISDB].[internal].[cleanup_server_retention_window]" but sometimes i get following error. After that i have to do manual cleanup ...
1
vote
1answer
7 views

simple privileges on view in schema postgresql 9.1

hope you can help me. I have 3 users First is me, the db admin. I run the GRANT queries, I can do anything. (name doesn't matter now) Second is the data manager user. = manager_u Third is the data ...
0
votes
1answer
27 views

ORA-28040: No matching authentication protocol in Eclipse project

I recently tried to connect my java program to my Sql data base made on SQLDevlopper, but after downloading & installing in my Eclipse project the ojdbc6 driver I still have the "ORA-28040: No ...
1
vote
1answer
25 views

Subquery in where clause forces seq scan instead of using trigram index

I have a query that is supposed to use a bunch of trigram indexes to speed up ILIKE clauses. This works as long as there isn't a subquery in one of the where terms. I've simplified my query and can ...
1
vote
0answers
12 views

Query plan (JSON format) in pgAdmin not showing completely

I would like to use the tool Postgres Explain Viewer (PEV). For it I need to paste the execution plan in json format. If I try to get the execution plan in pgAdmin with this query: EXPLAIN (ANALYZE, ...
0
votes
1answer
17 views

SQL substract values from same column different rows

I have above mysql stock table where both inward and outward data are stored and identified each type by type column (i and o). I want to build a query to retrieve balance quantity(qty) per each ...
0
votes
1answer
16 views

MySQL/innodb trying to lock uncommitted row from parallel transaction, deadlock in result

MySQL 8.0.16, 2 simple RC transactions, each trying to insert and delete rows: CREATE TABLE test1 ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(100), PRIMARY KEY (id) ) ...
0
votes
0answers
14 views

Help to troubleshoot pgadmin4 and /svn/repo 403 error

I installed postgresql db and pgadmin4 3 months ago, configured both on centos7. I used to access pgadmin4 from random remote machines every day by, xxx.xxx.xxx.xxx/pgadmin4 and xxx.xxx.xxx.xxx/svn/...
-1
votes
1answer
9 views

No MySQL Server 8.0.16 included in the installer

I downloaded the MySQL community Edition 8.0.16 in my windows 7 32-bit. However there was
0
votes
1answer
60 views

Is there a way to have a system generated report of list of DBA in SQL Server?

I'm an auditor, and I want to ask if there is a list of system generated report of DBA users in SQL Server? Per my audit client, there is no way to generate it. However, I'm thinking that this is a ...
0
votes
0answers
5 views

RUN DDLs in Galera Cluster

I have 3 node Production Mariadb Galera Cluster with many schemas. I need to run ALTERs quite often and since its a Galera , cluster wide locking is happening and currently wsrep_OSU_method=TOI. I am ...
1
vote
1answer
22 views

MySQL XOR produces incorrect results

Why does the expression conv('9000084e703720f9', 16, 10) ^ conv('801A93A5A18A773F', 16, 10) produces wrong result? In a step by step explanation: SELECT conv('9000084e703720f9', 16, 10); Result: ...
-1
votes
0answers
12 views

Joining 3 tables using ms-access [on hold]

i have 3 table in acces 2007 . iwant to show data like this : num_produit from (prod_sort), designation from (produit), organisme_deman from (bon_sortie). need help..
2
votes
2answers
37 views

Stored Procedure - Reseed Identity

I have a bunch of LU tables that have values added and deleted all the time. Therefore, I figured writing a quick stored procedure would serve me well and then can call the stored procedure on another ...
0
votes
1answer
23 views

Speed up slow postgres query with indices (~5 minutes)

I have roughly 100 million rows in a table called 'bets' and a couple million in 'games'. The problem is that even with indices particular queries run very slow. The tables are structured as so: ...
0
votes
1answer
13 views

SQL Server license from AWS Marketplace with ? cores

We are planning to buy a SQL Server 2012 Enterprise edition license from AWS Marketplace for our company. We have exhausted our previous licenses and we need to add a new region with SQL Server in ...
-1
votes
0answers
12 views

Postgres “view” that references foreign data wrapper — Loading Slowly

I'm using Postgres 11. Here is my setup: I have one database, call it live, which devices write to every second. I have another database, call it info, with metadata that helps interpret the live ...
5
votes
1answer
34 views

Find which databases have a particular service in SQL Server Service Broker

From what I currently understand, the names of services are global to the instance and you can refer to them without knowing which database contains the service and associated queue etc. In addition, ...
-2
votes
0answers
19 views

move data directory for pgsql-9.2 on rhel 7

I am installing database on VM which are very restricted about outside access. Firewall does not allow yum to get packages from outside. I have installed the pgsql-9.2 (only available) on rhel7 VM. ...
0
votes
0answers
36 views

Using @@PROCID to return name of stored procedure

We are migrating from Sybase to MSSQL 2016, and have triggers on some Sybase tables which we have ported from SYB to MSSQL. These triggers are really useful in SYB because they tell us the proc wrote ...
6
votes
1answer
42 views

Query/Table Hints for the History Table when Using the FOR SYSTEM_TIME Clause

Probably a pretty quick question, but is there any way to specify Query/Table hints for the History Table when using the FOR SYSTEM_TIME statement when querying temporal tables? I suspect not, but I ...
2
votes
1answer
28 views

How to find dropped or ghosted columns in Azure SQL DB?

In SQL Server, dropping a column is a metadata only change; the data remains in the index until the index is rebuilt. On prem, I use system_internals_partition_columns to determine what indexes have ...
0
votes
1answer
12 views

Is the limit on the number of databases in an Azure SQL managed instance a hard limit?

I see the documentation for Azure SQL Managed Instance lists a limit of 100 databases per managed instance. I would like to understand if this is a soft limit that is adjustable on request or a hard ...
4
votes
3answers
547 views

How to determine if a hyphen (-) exists inside a column

In a CASE expression, I'm trying to search inside a text column to identify a hyphen (-): CASE WHEN SUBSTRING(al.ALT_ADDRESS,1,1) IN('1','5','7') AND al.NEW_ADDRESS CONTAINS '-' ...
1
vote
0answers
8 views

SQL Server 2016 query Azure AD

I need to query our (Azure) AD to get a user username based on on an email address I am being passed and then write it to a table ideally via an SP. From my brief bit of reading, Azure AD supports ...
-2
votes
0answers
50 views

Can anyone help me with this hideous query plan? [on hold]

Here's the plan https://www.brentozar.com/pastetheplan/?id=SJxeroW6N This is our number one throughput SP, I'm just trying to determine what I can do to improve it.
0
votes
0answers
30 views

Values for maintenance solution [on hold]

I am working on the SQL Server maintenance script. The job will execute when you enter date and time. What date and time format will you use for this task?
1
vote
1answer
12 views

pgsql Return Partial Text Field Ending In A Whole Word

I found this PHP code that returns a sub-string ending with a whole word (IE separated by a space): if ( strlen( $body ) < $maxlength ) return $body; $body = substr( $body , 0 , $maxlength ); $...
0
votes
0answers
46 views

Is a SQL Server DB worth shrinking? [duplicate]

I purged about 100 GB on 200 GB SQL Server v11 DB. The MDF file still show about 200 GB in the file explorer. Everything looks fine, first tests shows 50% time treatments increase and the backup's ...
0
votes
1answer
23 views

How to determine/set the Java classpath for an Oracle DB?

l am trying to make use of some proprietary Oracle Java classes/methods using an Oracle provided virtual machine (E-Business Suite Vision, Oracle 12.2.28) On my test server I define a function: [...
0
votes
3answers
34 views

Get distinct category columns with multiple subcategory columns mapped in table

I have 2 tables, category and subcategory, this query select C.Description,s.Description from category C inner join SubCategory S on C.CategoryID =S.CategoryID where C.IsActive=1 and S.IsActive=1 ...
0
votes
2answers
33 views

Example of MS Access SQL IIF to T-SQL

Given the syntax rules shown below Access: IF(Condition, ReturnIfTrue, ReturnIfValue) T-SQL: CASE WHEN Condition THEN ReturnIfTrue ELSE ReturnIfFalse END What would the below be formatted to T-SQL ...
0
votes
1answer
26 views

Dynamic LIMIT based on query time

I'm writing scripts in Python for cleaning up a database. It mainly is finding and deleting billions of rows of data based on some logic. I have it running in a loop with a LIMIT that will run until ...

15 30 50 per page