2
votes
0answers
17 views

export data from postgresql

I have some text like xml -code in a field of table. I want to export the data from my field into file without any changes. I've tried to use a lot of variants but all of them changes the text. The ...
0
votes
0answers
14 views

Is there a UI tool for moving data from two different tables?

The schemas in the two databases are different. Eg. Database 1 / users - id - name - phone Database 2 / users - id - first_name - mobile Is there a tool that lets me visually create the statements ...
17
votes
2answers
2k views

If positive, sum all items. If negative, return each one

I am needing to find a way to SUM() all of the positive values for num and return the SUM() of all positive numbers and an individual row for each negative number. Below is a sample DDL: Create ...
-2
votes
0answers
44 views

SQL features and analytical tools backwards compatibility

Is it possible to use the extra installed features and analytical tools that come installed with a more recent version of SQL Server 2012/14 such as SSRS and SSAS on data which is held on an old 2005 ...
1
vote
0answers
32 views

Do not want to allow Queries to take more than x minutes?

Do not want to allow Queries to take more than x minutes ! What System variable can I set to automatically terminate it.
0
votes
0answers
18 views

Cannot create a database connection SQL Developer

I will try to explain the current situation in the best possible way. Well, I got a VM with SQL Developer already installed but could not run properly. After some reasearch, I solve the problem ...
1
vote
0answers
10 views

Mongodb performance: compound query vs moving to other collection

My application uses mongodb to store order information. At some point orders are sent after which I need to generate some reporting of all orders in a timerange. To give an idea of my order document: ...
-4
votes
1answer
50 views

Get all the queries executed in the last week in SQL Server [on hold]

How can I get all the queries executed on a SQL Server in last week.
1
vote
0answers
53 views

In Postgresql comparing timestamps gives no result at all? [on hold]

I am having two tables a, b. Table a is a FDW table from a mysql database. Table b is a normal pgsql table. b.entry_time is of type timestamp without time zone. table a is having some data that I ...
2
votes
1answer
28 views

Insert if something changed other than specific column

I have a table with many columns but my snippet is simplified. I have the trigger shown below but how can I have it so that nothing is inserted if only the created_at column has changed? ALTER ...
1
vote
1answer
27 views

SQL Backup with Mirror option in maintenance plan

I need to do backup ALL databases on an instance and put them in 3 different locations on our network, so i found that you can use backup with mirror, so I set that up. I have a maintenance plan ...
1
vote
1answer
27 views

Recommended ways to upgrade AlwaysOn AG from 2014 to 2016

What is the recommended process of upgrading Availability Groups with one Sync Replica from SQL 2014 to 2016? My understanding is that in-place upgrades are not really liked among database ...
1
vote
0answers
26 views

Backup MySQL to different destinations

I'm working with MySQL databases on Windows and I need a solution how to backup them to Amazon S3 and DropBox. I have 5 databases 600-900 MB each and I need to backup 3 of them to DropBox and another ...
0
votes
1answer
27 views

How do I prevent multiple row insert?

I set up a playground MySQL database for users and I'd like to prevent multiple row (large) inserts. That is, if there will be over N rows after INSERT operation, then raise an error and do not ...
1
vote
0answers
21 views

How to ensure NULLed encryption key columns are permanently erased

We are storing BLOB data (call recordings) in commodity cloud storage. These are encrypted and the keys stored in an SQL Server database. I am working on a project to implement "Retention", i.e. ...
-3
votes
0answers
12 views

how to analyze explain plan in oracle 11g [on hold]

hi please can you tell how to analze explain plan in oracle 11g . where to look and what to change . please can you provide me any document reg tuning . thanks List item
1
vote
0answers
17 views

Retrieve data from OLTP MySQL to SQL Server DWH using SSIS

I'm running a BI solution currently reading data from an OLTP SQL Server 2008 to a SQL Server 2012 data warehouse. The ETL phase is implemented with SSIS and runs twice a day. This phase relies on a ...
-1
votes
0answers
10 views

How to import one varbinary(max) column with bcp [on hold]

bcp reacts with oversize message on importing a jpg-file. azure does not allow to use bulk operations. how to import a varbinary(max) with bcp?
0
votes
0answers
12 views

mysql needs a start after turning system off

Hii I am facing severe installation issues after installing Ubuntu 16.04. Mysql needs a start everytime system is turned ON. I have removed every available package of mysql 5.7 but after installation ...
-1
votes
0answers
29 views

how to restore database without the physical backup sql server 2008 [on hold]

I have one database is recently have data loss after stop mirroring(sql server 2008), the best part is the principal database is also data loss, can i recover back the loss data?. i don't have the ...
0
votes
1answer
13 views

how to change wsrep_cluster_size in Percona XtraDB Cluste?

I am trying to setup Percona XtraDB Cluster according to their doc When I run show status like 'wsrep%'; it's show wsrep_cluster_size is 1 in every node(2 node for me). Actually it should be 1 for ...
1
vote
1answer
40 views

Single table having large no of rows [on hold]

I am about to start a project and currently working on data design. While I am done in defining schema of db, I am just wondering to ask from experts. I have only one table in which I am going to ...
2
votes
0answers
35 views

Understanding Database Query Cost Optimzation

I have been learning Query Optimization from "Fundamentals of Database Systems by Elmasri and Navathe (6th edition)" and I am having trouble understanding on how some variables are being derived in ...
-1
votes
1answer
33 views

SQL Server mirroring / failover alternative [on hold]

I am looking at building at reliable database with Microsoft SQL Server, with mirroring and automatic failover. The SQL Server here is standard version, not enterprise one so High Availability ...
-1
votes
0answers
16 views

How to get the procedure names which has its underlying view missing in a database?

I need to identify procedures with broken dependency along with the list of view/ views or tables underlying under that procedure
2
votes
1answer
52 views

Sql Server: Two identical queries, one times out, one is quickly done

I see a very strange behavior on Sql Server I need assistance for from people who know a bit more about it than I do. For the first time I used the Sql Server Profiler which confirmed that it is ...
0
votes
0answers
19 views

ERROR: Arithmetic overflow error converting float to data type numeric

I unfortunately have some bad data and need to work around it. I have a Parcel column in a spreadsheet with some parcels that have inadvertently been converted to floating point numbers. I posted a ...
0
votes
0answers
10 views

Tool like `pt-table-sync` for Amazon RDS

I am looking for a tool / script that does the same functionality as pt-table-sync in the Percona Toolkit, (i.e. sync two tables that are explicitly NOT in a master-slave setup) but is compatible with ...
1
vote
1answer
43 views

Installing SQL Server version 10.50.4000 is failing

I am attempting to install SQL Server 2008 R2 version 10.50.4000 on a virtual machine running Microsoft Windows Server 2008 R2. When I try to install SQL Server, I get an error that, when I look it ...
1
vote
0answers
30 views

How can I have SQL Server send Job Notification alerts to an API

I am trying to get the notifications for a job out of my email and into a chat client(HipChat). So far my googling has been less than successful so I will put the question to the community: Is there ...
2
votes
2answers
51 views

Applying Transaction Logs to an existing Database

I am wondering if this possible, I can not seem to apply another transaction log. I have restored the Full database backup, the differential backup and my last Transaction Log WITH RECOVERY. If later ...
0
votes
0answers
16 views

An item with the same key has already been added

All I am trying to do is make some changes to a query that was just working this morning. I get the error An item with the same key has already been added. I can run the query in ssms and I have ...
3
votes
2answers
227 views

In SQL Server, is there a way to determine the values of the parameters passed to an executing stored procedure

One way to determine the executing stored procedure is to use "dynamic management" methods, like so: SELECT sqlText.Text, req.* FROM sys.dm_exec_requests req OUTER APPLY sys....
0
votes
1answer
27 views

Sync two MySQL servers data, while changing the Engine in the slave

I'm running a MySQL server 5.5.44, and I'd need to sync its data to a new server running MySQL 5.7.13 using master-slave. The idea is to bring both DBs synced until we migrate to the second, newer ...
1
vote
1answer
47 views

How to deal with a chain of several linked 1:n:n*m:n*m*k “join” explosion?

I have a domain model, where I have a "manager" which has 1:n relation with another resource (A). A has 1:n with B, and B has 1:n with C (it makes sense as a relation). However I'll need a lot of ...
0
votes
1answer
20 views

Overwrote database with old mysql dump. How can I restore it with a more recent backup

Have a server with multiple databases. Imported wrong .sql from over the top of existing database. I Have a rsync copy of the up to date files for that database. What do I need to do to just ...
0
votes
0answers
52 views

Why can't a user in a group with the sysadmin role see any stored procs in SSMS?

A developer who is in a "Developers" group granted the server fixed role "sysadmin" on the development SQL Server installation is unable to see any stored procedures in a database - only the "System ...
0
votes
3answers
41 views

Fix line by line parameterization in a table

This table has a lot of columns but I need to fix "patrimonio". It looks like this: As you can see, there are a lot of different values. The correct way to use this table is with S-1234. But ...
1
vote
1answer
33 views

Copy primary keys/clustered indexes from Prod to DEv/Test env

We followed the best practices of creating Primary Keys/Clustered indexes on tables which are actively queried on prod. Now there is a scenario where we need to get the similar above changes done ...
1
vote
1answer
43 views

SQL Server - Timestamp datatype

I need some information on SQL Server timestamp. I found all the required information here. The article says The timestamp syntax is deprecated. This feature will be removed in a future ...
0
votes
1answer
31 views

Using postgres database from another computer

I have PostgreSQL version 9.5 installed at my machine (Windows 7 Enterprise x64 bit version). I have several databases in schema 'public'. I would like to use/access one of these databases from ...
-1
votes
1answer
49 views

RESTORE DATABASE execution continues restore completed

Today, I faced a strange problem which didn't cause any error or downtime. I executed a query to restore a database. RESTORE DATABASE Database_Name FROM DISK='PATH\FILE1.BAK', ...
0
votes
1answer
27 views

Hash Match in Query has high cost and high number of excecutions

I have the following query: declare @jobID NVARCHAR(20) declare @dataGroup BIGINT declare @lastSyncVer BIGINT set @jobid='P-0001' set @dataGroup= 5637144576 set @...
1
vote
2answers
128 views

Choosing the right storage block size for sql server

There are many articles on what storage blocks size should be used for sql server e.g. Disk Partition Alignment Best Practices for SQL Server. The right blocks size should improve the performance of a ...
2
votes
0answers
34 views

Unable to identify matching rows

I am developing a Bus Route Demo application and I am trying to design the UI based on the below table sqlfiddle: PKID BUS_ID STOP_POSITION STOP_ID ------------------------------- 1 1 1 ...
1
vote
0answers
25 views

MySQL max connections [on hold]

MySQL keeps crashing, but after futher research, I found this error SQLSTATE[08004] [1040] Too many connections but I have this line #max_connections = 100 commented in my.cnf.
0
votes
0answers
7 views

Tungsten Replicator high CPU usage

We are observing CPU fluctuations (sudden increase) in the boxes due to Tungsten Replicator. May I know the cause for high CPU usage?
2
votes
1answer
52 views

Concurrent reads and updates

Let's say I have a table with 50,000 transactions that need to be processed in the background in the same order they were received. I have a Windows service that polls for transactions, picks them up, ...
0
votes
0answers
9 views

IXSCAN is taking long time to execute [on hold]

planSummary: IXSCAN { l_id: 1.0 } ntoskip:0 keysExamined:1 docsExamined:1 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:1 reslen:249 locks:{ Global: { acquireCount: { r: 2 } }, ...
2
votes
0answers
25 views

Select rows based on latest date

This are the tables: Material (Code, ID) Itemtrans (IteID, FtrID, Tradecode) Fintrade (Ftrdate, ID) Material.ID=Itemtrans.IteID Itemtrans.FtrID=Fintrade.ID I want to list the last record on ...

15 30 50 per page