All Questions

0
votes
0answers
4 views

Select rows with the same value in multiple columns

I have created this table: CREATE TABLE IF NOT EXISTS `names` ( `ID` int(6) unsigned NOT NULL, `C1` varchar(200), `C2` varchar(200), `C3` varchar(200), PRIMARY KEY (`id`) ) DEFAULT CHARSET=...
0
votes
0answers
6 views

Oracle CLOB contains html - export to csv

I have a table that contains html formatted text in Oracle. I'm trying to export that to a csv but can't use the built in SQL Developer Export features because of character limits. I've tried almost ...
0
votes
0answers
6 views

What's the more performant database design for query speed and write overhead when storing many boolean columns?

Setting the scene I have a PostgreSQL 11 database running on a very fast 64core, 10 SSD HW RAID 10 server. In the database I need to create a table with a couple of million rows, let's call it cars. ...
1
vote
1answer
7 views

SQL Server Backups-Order of FULL & T-log backups

I have an elementary question. I just started as a DBA with no administration experience and upon reviewing the Backup schedule, I noticed on one instance that the maintenance plan that performs the ...
0
votes
0answers
4 views

MongoDB specifying shard key and sharding strategy

What is the syntax to state that a collection is to be sharded as location based, while using the range based sharding strategy. I know you have to use the the sh.shardCollection() command, but what ...
0
votes
0answers
9 views

Duplicate entries - condition on second table with join

I have 2 tables (1. PLATE, 2. MOVEMENT). First table contains some duplicate plate numbers. Every plate number (Fields: PLATE_ID, PLATE_COUNTRY, PLATE_NUMBER) has an unique id, which exists in ...
0
votes
1answer
12 views

Multicondition Subquery Max Date and Item Number

The following is a query to get latest Sales date for a customer. select pt.CustomerId, pt.SalesDate, pt.* from dbo.PurchaseTransactions pt where pt.SalesDate = ( select max(SalesDate) from ...
0
votes
0answers
8 views

(POSTGRES) ON CONFLICT … WHERE condition doesn't seem to be working

We're trying to populate a new table for a new feature with information from an old table, but we are going to be running this query as a script multiple times because we want to catch any user ...
0
votes
1answer
5 views

DB2 select from final table update gives SQL0199 error

Goal: I am trying to retrieve records that were affected by UPDATE query. Based on IBMs article I can use the following query: SELECT empno, salary FROM FINAL TABLE (UPDATE employee SET salary = ...
0
votes
0answers
5 views

I need to run a report using rwclient or rwrun, Forms12c

I need to run a report using rwclient or rwrun, Forms12c. What would be the necessary configuration to execute the report on the client's PC?
0
votes
0answers
8 views

How to create an optimized view that fills in sparse observations with modeled data?

I have a table of sensor observations with obs_ts timestamp, sensor_id text, sensor_val int which is partitioned by month (e.g.: observations_201903). There are approximately 150k sensors, providing ...
0
votes
0answers
14 views

Are there any extension/add-on tools to improve report-writing in SSRS?

My company is implementing some software which uses SSRS as the engine for report presentation both in and out of the application, so we'll be customizing a lot of SSRS reports soon. Microsoft has ...
0
votes
1answer
21 views

Oracle stop long runnig scheduled job

I need to launch a scheduled job at 12 o'clock at night and keep this job running for a period of 8 hours, what happens now is that the job is running for more than 12 hours and I really need to avoid ...
0
votes
0answers
6 views

Error InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid STRING constant

I'm new to Cassandra (using Python) and I'm trying to create a table based on a csv file. Here's how the file looks like: First I create the table query1 = "CREATE TABLE IF NOT EXISTS table1(artist ...
1
vote
1answer
37 views

Assign Permissions to a SQL User

I have active directory on my company, I have some login users created at the level of the SQL Server (2014) that I need to propagate to all my databases on that server. I want to create a read only ...
1
vote
1answer
13 views

What is the meaning of “Monotonically Changing Shard Keys”?

I am writing my first pubblication concerning MongoDB and more specific MongoDB Sharded clusters. On the documentantion I found that the shard key in case of ranged sharding should be "Non-...
0
votes
2answers
33 views

Can a query whose execution plan uses parallelization use the cores of a processor on a another server that's part of the same Availability Group?

If I have two servers (server A and server B) that are part of the same Availability Group failover cluster, and a query running on server A has an execution plan that uses parallelization, is it ...
2
votes
1answer
77 views

How to I force windows to use a specific version of SQLCMD?

I have several versions of SSMS installed on my machine. We have legacy servers running several versions of sql, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default to the ...
0
votes
0answers
8 views

How to workaround Postgres foreign data wrapper not supporting INSERT with an ON CONFLICT

I have a large (~10 million rows) table that needs to be copied to another database. The foreign database should store on the latest version of each row, so normally I would INSERT with an ON CONFLICT ...
0
votes
0answers
13 views

How to manage Oracle diagnostics logs not managed by adrci?

How can I identify Oracle log files that are not managed by adrci? I wish to manage disk space usage, in a similar scenario to this article: "How to free up disk space? which logs/directories to ...
7
votes
1answer
69 views

What is an “unmentionable word” to SQL?

What is an "unmentionable word" to SQL? I am reading sys.query_store_query_text (Transact-SQL) and I see the following, so I google {SQL "unmentionable" word} has_restricted_text bit Query ...
1
vote
1answer
34 views

What is the best practice for the msdb database owner?

In the course of reading up on SQL Server security best practices, I learned that databases should generally be owned by a dedicated, low-privileged login (sometimes a separate one for each DB or each ...
1
vote
1answer
30 views

Trigger to update only if value is in lookup table

I only want to update the comment if a description for the event is found in the TagDescLookup Table. If the Tag isn’t in the Lookup table then don’t change the existing Value for the comment column. ...
0
votes
0answers
9 views

SQL Profiler not capturing cross-database queries

It seems that SQL Server Profiler traces with a DatabaseName filter only capture queries made FROM a connection to the specified database. For example, if the filter is on "DatabaseA", a query such as ...
0
votes
0answers
15 views

Unable to call PASSWORD() with VARCHAR() parameter inside a procedure

DELIMITER // CREATE PROCEDURE custUpdateInfo(IN customer_id varchar(20), IN passwordd VARCHAR(20), IN named varchar(20), IN addressd VARCHAR(60), IN phone_number DECIMAL(10) UNSIGNED, IN email_id ...
6
votes
1answer
181 views

How to Disable and Drop all Temporal Tables from a database

I'm working on a task where I need to backup and restore a database in another instance. But, when I restore that database, I need to Drop all the History Tables associated with Temporal Tables. Is ...
0
votes
1answer
30 views

Add value to a column in a while loop in SQL Server

I have a stored procedure which looks like that : ALTER PROCEDURE psu_auto_segment_folder_create @Folder VARCHAR(MAX), /* for example : 'folder1/folder2/folder3' */ @ListId INT AS BEGIN SET ...
0
votes
1answer
10 views

MySQL replication with no connection

I configured MySQL replication between a Master and a Slave throught VPN. Everything works fine, when connection between them is down, and i make some changes to the Master (like insert a row), then ...
1
vote
0answers
15 views

SQL dump loads with Error 1064

Looks like this issue is just the wrong version of MySQL, need to go to 5.5 So I have a backup of an offsite source SQL database. I am not sure how they are preforming the data dump but I am trying ...
1
vote
2answers
39 views

Logging to file

I am using the ola-hallengren maintenance scripts. I am logging to table and file. I want to change the location of the file logs. Can I do this? Many thanks
-2
votes
0answers
10 views

MONGODB CLUSTER

Need help on this pals i have my percona mongodb cluster with 3 servers one being master, but we had a downtime whereby after services recovery one of the server disconnected from the cluster and cant ...
2
votes
1answer
27 views

Can't create read-write Postgresql user

I'm trying to create two users in a Postgres database—one with read-write access to all tables in two schemas, and one with read-write-create (i.e., able to make DDL changes) to the same schemas. I ...
5
votes
2answers
310 views

Limit max CPU usage SQL SERVER with WSRM

I have a physical server running one instance of SQL Server. I notice that quite often this server is running at 100% cpu usage. My IT is not happy about this, and suggested we reserve 2 or the 32 ...
0
votes
1answer
14 views

Get column difference between same table in different schemas

Suppose I have the following tables: schema_a.products +----+------+------+-------+ | id | code | name | price | +----+------+------+-------+ schema_b.products +----+------+------+ | id | code | ...
0
votes
1answer
39 views

Optimize queries that need to be 100% ACID compliant but can tolerate latency in persistence

A little intro: I'm writing a trading program in C++. The program involves having user balances and orderbooks. The orderbook is basically a set of buy and sell orders. When submitting an order, say ...
0
votes
1answer
19 views

Count rows in a table based on a DATE field

I have a table with 3 columns (order_id, client_id, date_added). The content would look something like this: order_id | client_id | date_added ----------------------------------- 14152 | NA4156 ...
1
vote
2answers
21 views

Index options and applying partitioning to an index

I have following two questions: I have a SQL Server index with the following options: PAD_INDEX = OFF STATISTICS_NORECOMPUTE = OFF SORT_IN_TEMPDB = OFF DROP_EXISTING = OFF ONLINE = OFF ...
-2
votes
1answer
40 views

What do I do about blocked processes? [on hold]

I am getting alerts stating: The SQL Server Performance counter 'Process Blocked' (Instance N/A) of object 'General Statistics' is now above the above threshold of 40 (the current Value is 41)" ...
0
votes
0answers
27 views

File permissions for sql server backups

I have backed up a database and backed up the database master key to the very same folder. Everyone has full access to this folder, however, only the database backup inherits the permissions of the ...
0
votes
0answers
22 views

Flatten multiple tables into a single large table

We are planning to serve analytics for our platform. As of now, data is in relational database and current small scale analytics are running on top of this relational data. Most of the analytics data ...
0
votes
1answer
28 views

Unable to install SQL Server Management Studio (SSMS) on server

We are experiencing persistent errors when attempting to install SSMS on one of our development database servers. We have tried the installers for versions 17.4 and 17.9.1, but the error messages are ...
1
vote
0answers
12 views

Received an unsupported type from Postgres. (14) (SQLGetData)

I have database in PostgreSQL. It is simplest possible database with schema presented here: http://www.postgresqltutorial.com/postgresql-create-table/ I want to migrate it to MySQL. I trying to ...
0
votes
0answers
24 views

Mysql Alter table add column with ALGORITHM=INPLACE, LOCK=NONE

Am running below query Query Alter table dbname.tablename add column column1 varchar(50), add column column2 text , ALGORITHM=INPLACE, LOCK=NONE; It takes more time to execute. Ideally running ...
0
votes
0answers
16 views

Why doesn't tsrange('2018-01-01', NULL) @> transactions.transacted_at use the b-tree index? [duplicate]

Given CREATE TABLE transactions ( transacted_at TIMESTAMP ); CREATE INDEX IF NOT EXISTS index_transactions_on_transacted_at ON transactions (transacted_at); Then this doesn't use the index: ...
1
vote
0answers
13 views

Escape from Alcatraz: SqlAnywhere to MSSQL [on hold]

Is there a migration tool that actually works for SAP SqlAnywhere 17 to MSSQL (any recent version)? Searching for "sqlanywhere mssql migration" yields a variety of hits including SQL Server ...
1
vote
1answer
37 views

SQL Server Instance Root Directory & Shared Feature Directory on Partition with 64k Allocation Unit Size?

I am in the process of setting up new test servers to migrate to SQL Server 2017. For certain reasons I dont have the option to have a separate drive partition for just SQL binaries so my options are ...
0
votes
0answers
22 views

delay advice - Huge resultset

I have a mysql multi select query that performs inner left joins. These queries UNION with two other tables. The resultset is huge (250k+ rows). My client wishes to expose this resultset to a webpage. ...
0
votes
0answers
15 views

Query top and specific ratings for table in postgresql

Say, for example, we have players with their current level and timestamp when this level was got. Table looks like: CREATE TABLE tst_ratings ( player varchar PRIMARY KEY, level integer, ...
0
votes
0answers
6 views

MySQL 5.7 to MariaDB 10.3.13 configuration overwritten - correct way

I have earlier MySQL 5.7 over Ubuntu 16.04 with following configuration in /etc/mysql/my.cnf. [mysqld] innodb_buffer_pool_size = 1228M innodb_log_file_size = 512M innodb_log_buffer_size = 16M ...
0
votes
0answers
12 views

Exporting Multiple, Multi Level BOMs using Bind Variables

I am trying to create a master export of all of our active Manufacturing BOM's. What I am hoping someone can help we with is how to combine these two queries so it will perform, loop? through the each ...

15 30 50 per page