All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
83 views

Powershell Invoke-Sqlcmd Replacing £ with?

When I create a SQL Script that inserts the value '£' or '€' into a table the value on the table is a question mark (?) Though, when I insert '$' it inserts a dollar sign. Anyone know what is going ...
0
votes
1answer
38 views

How can Inner join be optimize?

I have a table where there is in some cases twin records. in the table, I have the following records: id (identity column) action_id, session_id, row_id, timestamp, and more records. I need to find ...
0
votes
1answer
82 views

Postgresql streaming replication slow on macOS

I am using PostgreSQL 10.1 on MAC on which I am trying to set up streaming replication. I configured both master and slave to be on the same machine. I find the streaming replication lag to be slower ...
2
votes
2answers
6k views

Oracle database 18c – ORA-12541: TNS:no listener

I have installed Oracle 18c in my local machine and i have created a user names as USER_NAME := c##scott Passkey : oracle When i used to connect to that user using cmd. The following error is ...
0
votes
0answers
13 views

Enable archivelog

I'm trying to enable archivelog mode in Oracle database. For that I shutdown the services and used startup mount. Instead of database getting mounted, I'm getting error ORA- 12528 TNS - All instances ...
6
votes
3answers
260 views

What events still occur within a transaction that gets rolled back?

Is it true that all data modifications are undone when the transaction they are a part of gets rolled back? For example if a cursor that just executed a stored procedure 100 times that updated a ...
1
vote
1answer
96 views

MYSQL 5.6 : Database Loss After Several Power Outttage

I have lost 10 days of uncommitted data - InnoDB. Apart from, my mysql database directory have two more files: **ib_logfile0_2016-06-16T14-56-52 and ib_logfile1_2016-06-16T14-56-52 on top of ...
0
votes
0answers
2 views

Storing images in MongoDb Atlas

I'm trying to store images in my existing collection. For example, one of my document looks like {"_id":{"$oid":"5dc5a4851c9d440000cb2d5b"},"Name":"Johnny's Tavern","Monday":"11:30am-10pm","Tuesday":"...
0
votes
0answers
5 views

Is subscription database considered as read-only?

I am not sure about that because while users implement SELECT from subscription database, publisher replicates data to the subscription server meaning that INSERT and UPDATE also take place (which are ...
0
votes
1answer
90 views

Is it possible to audit query results in SQL Server?

I want to find out if it is possible to audit the results of any query that gets executed on an instance of SQL Server. We currently have C2 auditing enabled, but this only showed what query was ...
0
votes
1answer
222 views

MySQL sql_mode for remote access

I have setup MySQL with the default conf /etc/my.cnf as following: [mysqld] user=root innodb_file_per_table innodb_file_format=Barracuda innodb_large_prefix log_bin_trust_function_creators sql-...
0
votes
1answer
159 views

why binlog doesn't log the DML statement?

two method compared 1. use test; create table t (a int); 2. create table test.t1(a int); my result is the first one can log the binlog but the second one can't not use test;create table t(a int); ...
0
votes
0answers
5 views

RDIT clinic maintaining the database of the clients called Patient Records

RDIT clinic is maintaining the database of her clients called patient records, in a table format. The patient’s table has the following fields: PCN (patient card number), first name, surname, age, ...
0
votes
1answer
14 views

Sql Server 2014 - Rows to Columns convert Dynamically-

Below are my query and table details create table #ReviewData ( ProjectId int, ReviewId int, ReviewDataPointKey varchar(max), ReviewDataPointValue varchar(max)) Insert into #ReviewData values (...
0
votes
1answer
83 views

MySql split table on insert

I am new so please go easy on me :) I have the following table CREATE TABLE `send_sms` ( `sql_id` BIGINT(20) NOT NULL AUTO_INCREMENT, `momt` ENUM('MO','MT') NULL DEFAULT NULL, `sender` ...
0
votes
0answers
6 views

What do these ERD relationship arrows mean practically? (One to one, zero or one to one)

So let's say we have this situation: I know this means that foreign key fk1 can be assigned to only one primary key id2 and likewise (meaning there cannot be duplicates of fk1 values in table1 as far ...
0
votes
1answer
156 views

Error Message while executing command in Arbiter for log rotation

While running the command in the shell db.adminCommand( { logRotate : 1 } ) of arbiter it showing an error message as not authorized to run this command but in primary and secondary of replicaset its ...
-1
votes
1answer
280 views

Unexplained PLE drop

Our SQL server has 512 GB ram with 448 GB available to SQL 2012 (sp2, cu7) serving a typical OLTP workload. The server is only for SQL other than SIOS for geo clustering. There is not a big swing in ...
0
votes
1answer
29 views

Can I show a relation - “Either in this table or in that ” in ER diagram?

I am making a database for handling leave applications in an academic institute. Given that there is hierarchy existent in such institutes, and I need to keep record of the people that were at these ...
0
votes
1answer
83 views

Can I use the same keywords/symbols as DATEADD and DATEPART in user-defined functions

The SQL functions DATEADD, DATEDIFF and DATEPART take a keyword parameter specifying the date/time period you're dealing with - it's not a varchar/string, it's a bare keyword. (https://docs.microsoft....
0
votes
1answer
149 views

Query Tuning and Index Tuning - SQL Server

I've been asked to improve the performance of the following query. I can't amend any existing Indexes but I can create new ones. The table structures can be found in this SQL Fiddle The row sizes of ...
-1
votes
1answer
114 views

SQL Maintenance script not running with SQL Server Express

Hello and thank you for making such a well-designed script available to the public. I have client with some heavy db fragmentation and performance issues. I would like to use your scripts to help ...
-1
votes
1answer
104 views

Count Unique User With Filter Combination

I have tables with millions of data. I need to create unique user based on msisdn column for all possible filter (area, region, branch, etc.) combination. I count, there will 512 possible combination ...
0
votes
0answers
24 views

How can I get MariaDB to use indexes in a RANK() query?

Consider the following simple RANK() query. select project_id, group_id, rank() over (partition by group_id order by stars desc) as star_rank from project_metrics; I've added indexes to the ...
2
votes
1answer
838 views

This installation of MySQL is already upgraded to 5.7.25?

I used sudo apt upgrade and got this: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. So I did it and I see this for more than an hour. Setting up ...
0
votes
0answers
34 views

After upgrading DB to SQL Server 2019, SP throws “insufficient memory” error

I have moved an SQL Server 2012 Database (8GB in size) to a newly setup SQL Server 2019 virtual machine with the same memory and CPU configuration and changed the compatibility level to SQL Server ...
2
votes
1answer
21 views

Is it possible to create AWS RDS as replication from external server?

I can't find any tutorial to create a new instance of AWS RDS (MySQL) to be an replication db from an external db server. Is it possible to create one? Thanks.
2
votes
1answer
65 views

Why can't I create a new schema with the owner set to dbo?

I created a test account for checking permissions against. It currently has the db_datareader, db_datawriter, and db_ddladmin roles for the Northwind database. But when it tries to create a new schema ...
0
votes
1answer
136 views

How to sort query filename output like Windows explorer?

i would like to order my query output the way Windows Explorer does. First special characters like _, then the numbers, and the letters last. _ttt.bmp 0.gif bbb.png
0
votes
1answer
110 views

SQL Server Partition - File Placement

According to Microsoft best practices you can optimize SQL and take a lot of benefits by using this technique, my only question is how to correctly install the SQL Server to match the drives/paths ...
0
votes
0answers
14 views

Installation of Database Engine Services failed - “SQL Server Browser service group does not exist”

I tried to install a new instance of SQL Server 2017 on a Windows Server 2016, but received an error: “The following error has occurred. SQL Server Browser service group does not exist. Check for ...
0
votes
1answer
7k views

how to drop oracle 12c instance on linux

I have created an Oracle 12c container db instance. I need to drop the instance. What's the most effective way to drop instance?
0
votes
2answers
23 views

Importing plain (raw) files into postgres table/column

What is a good way to insert/copy plain files into a postgres table, using the psql command-line? In my case the files are a bunch of eMails from Maildir archives, so I tried to use COPY: psql -c "...
0
votes
1answer
12 views

mysqldump still fails even with mysqldump --column-statistics=0

mysqldump still fails even when using mysqldump --column-statistics=0 # mysqldump --column-statistics=0 Just returns # mysqldump: [ERROR] unknown variable 'column-statistics=0' Am I missing ...
0
votes
1answer
260 views

help in designing a database for medical clinic keeping record of patient visit

I am making software for patients record keeping in a clinic . I have written a peewee model for setting up tables to store record of each patient visit and patient contact and a relative table that ...
2
votes
1answer
86 views

Excessive log throttling on Azure SQL on business critical tier

We moved from the Biz Critical vCore Gen4_8 tier to Gen5_8 over the holidays. We had to move because our log growth is constantly pushing us into the 1 TB limit of Gen4. Not only are our queries ...
-1
votes
1answer
17 views

Problem in codeigniter “Not unique table/alias: 'detail'”

function get_santri_certificate($detail_id) { $q = $this->db->query( "select detail.*, student.name from detail inner join detail on detail.detail_student_id = student.name where ...
1
vote
2answers
27 views

how to get the marks in ‘Math’ of ‘English’ topper for each class in mysql for student result data

I need to find the marks in ‘Math’, of ‘English’ topper for each class in MySQL for student result data. Output schema: class, roll_no, math_marks (Here expected result image not exact answer) ...
-2
votes
1answer
53 views

Sql Server Rows to Columns Dynamically

Below are my table and query details create table #ReviewData ( ProjectId int, ReviewId int, ReviewDataPointKey varchar(max), ReviewDataPointValue varchar(max)) Insert into #ReviewData values (...
0
votes
1answer
106 views

SQL Server: Description: The version of Destination - ***.csv is not compatible with this version of the DataFlow

I have downloaded SQL Server 2016 evaluation onto a Windows 10 laptop. I have imported some data into a new DB and new table. So far so good. I have exported the data to a CSV file and save this as ...
1
vote
1answer
146 views

SQL Server AlwaysOn Table and Archiving

We have a number of tables that will process a large amount of inserts each day. For this reason, the tables are archived on a weekly basis using a labour intensive process of backing up the database ...
0
votes
0answers
20 views

Kerberos connection without spn

Default SPNs are registered by the SQL Service. querying dm_exec_connections show auth_scheme is kerberos but klist does not shows the SQL Server ticket.
-1
votes
0answers
15 views

Operation from datatable values in one textbox

My objective is to type an operation (operands and operators) in a single expressionTextBox and if I click on a button the result will be displayed. For example, after inserting 3 variables of type ...
0
votes
1answer
140 views

Is it advisable to asynchronously update the summary table every time a transaction is deleted?

Given three tables: (a) Product (b) Transaction Head (c) Transaction Detail We need to create a query that fetches a list of products with associated latest ordered quantity and latest transaction ...
0
votes
0answers
8 views

Mongodb doesn't respond

We have a sharded cluster with 3 shards. The version is: 3.6.13. The users of the prod. database (1,8 TB sized) complain about an issue. System works normally but after sometime it stucks and doesn't ...
0
votes
1answer
193 views

PostgreSQL query suddenly very slow after new column addition

I have a query that's performing terribly after adding a new column. Here's the slow version: SELECT COUNT(*) FROM activities INNER JOIN "users" ON "users"."id" = "activities"."user_id" AND "users"."...
1
vote
1answer
38 views

Delete query does not commit

I need to delete about 900m rows from a table that has 6b rows. Since big deletes cause big problems for the transaction log, I'm deleting the data in small batches. What puzzles me is SQL Server does ...
1
vote
1answer
130 views

Single MySQL query with row averages based on conditions

I have problem, where i know how to proceed with multiple queries, but dont really now I Have a table with BP { name: varchar systolic : int diastolic : int timestamp: date } I need to ...
0
votes
0answers
7 views

WARNING: pga_aggregate_limit value is too high for the amount of physical memory on the system

WARNING: pga_aggregate_limit value is too high for the amount of physical memory on the system
1
vote
1answer
135 views

Password char on MS Access 2016 inputbox

I am currently using Microsoft Access 2016 to develop a database for a music store and a hospitality store (both with the same owner). I call it "WakesMusicDB." It is close to completion and I'm just ...

15 30 50 per page