0
votes
0answers
8 views

PostGis - How to handle exception using function?

I am using this code to update a table and when there is any exception it should handle it, So how to do it ?? UPDATE Schema.Table1 SET Column3 = ...
1
vote
0answers
9 views

Too many open connections with MongoDB 2.6 + PyMongo 2.7.2

I was running MongoDB 2.4 with a replica set which contains 1 primary, 1 secondary and an arbiter. We were using PyMongo 2.6 and MongoEngine 0.8.2. Recently, we performed an upgrade to MongoDB 2.6, ...
0
votes
0answers
27 views

How to run a execution plan and how to make use of it [on hold]

I am new to the SQL. Can you please explain about EXECUTION PLAN and EXPLAIN PLAN in TOAD with some examples?
1
vote
1answer
20 views

How to run a job in snapshot isolation?

We have a long running job for report data generation and we are not worried about changes to the source data after the job has started. For this case the SNAPSHOT isolation mode seems to be a good ...
1
vote
1answer
16 views

Decompose this relation into BCNF

Today, I'm reading about BCNF decomposition algorithm. It says that: BCNF Decomposition Algorithm Input: a relation R0 with a set of functional dependencies S0 Output: a decomposition of ...
1
vote
0answers
16 views

UTF8 Trouble while migrating from MSSQL to MySQL with MySQL Workbench

I am tasked with migrating part of our database from an on-site MSSQL server to an Amazon RDS MySQL. This will be my first attempt with a database migration, so I am doing a dry run from our MSSQL ...
1
vote
0answers
28 views

Transactional replication unspecified error SQL Server 2008 R2

I have a set up of Transaction Replication with the Publisher being the distributor. It works on Push mode. While replicating, more frequently for the past few weeks, the data is not being pushed to ...
1
vote
1answer
23 views

How do I deploy an SSIS package?

I am very new to SSIS. I have inherited a bunch of databases and SSIS packages. I notice many jobs utilizing many different packages. When I look at an existing job and try to see where a package it ...
0
votes
1answer
24 views

Raise Multiple Exceptions Postgres

I am using Postgres 9.5, and I am trying to create exception handling in a stored procedure/function. I can't quite figure out how to raise the error should any of the 'INSERT' statements fail. If ...
2
votes
1answer
45 views

CRON and RMAN Backups

We run RMAN backups via CRON jobs, but find the out-of-the-box emails with CRON to almost do what we want. I know we can channel the RMAN output to /dev/null so no email is sent, which for any ...
1
vote
0answers
15 views

Is findOne() in mongoDB deprecated

Is findOne() in MongoDB deprecated? I am asking this because when I use findOne() in WebStorm the IDE puts a line through findOne() and gives a message saying findOne() is deprecated and to find ...
0
votes
0answers
14 views

MySQL failed connection attempts hitting max_connections

I run a couple of websites but I believe one of them is causing too many Connections Failed Attempts that causes max_connections variable to hit. Currently, max_connections=2500 (already large) but ...
1
vote
0answers
12 views

'mysqlcheck' hangs over a database

Sometime ago I noticed my WordPress sites wont load. I found the problem with MySQL. The server I am running on is a VPS server with: Debian 8.1 MariaDB - Ver 15.1 Distrib 10.1.14-MariaDB 2048 MB ...
1
vote
0answers
13 views

Replicating into a Percona XtraDB Cluster

We have a 2 node (plus an arbiter) Percona XtraDB cluster. It is used for data indexing/archiving. It has it's own database called archive but it is also the replication slave for a database called ...
0
votes
1answer
12 views

Restoring postgres backup with WAL-E fills up disk

I am running Postgres and WAL-E in a Docker container built from a custom image based on postgres:9.4. WAL-E works great and I have restored from backups a number of times. However, the backups take a ...
4
votes
4answers
315 views

Summing data based on distinct dates

I am trying to get an accurate count of total days a tool is out for rental. Here is a data sample: CREATE Table #tmpToolRentalDays ( ToolId BIGINT, StartDate DATETIME, ...
0
votes
0answers
25 views

Get the query that caused the trigger to execute

Is it possible with a trigger to get the query or primary id of the query that triggered it? Currently we roughly have: Delete from Table1 where id = 1 (id is the primary id of that table, 1 is ...
0
votes
0answers
18 views

Database logs that contain attack traces [on hold]

Is there a publicly available logs of database queries (could be any SQL or NOSQL) that contains attack traces ( attacks could be exfiltration, misuse, insider, anomaly or any attacks). Needed for ...
-1
votes
2answers
103 views

Retrieve data from two tables where table 2 has multiple entries for one value

I am looking for the best way to create a SELECT statement to pull data from 2 tables. Example below is the table structures: Table 1 | Table 2 ...
0
votes
0answers
9 views

How to synch PostgreSQL databases on separate RDS instances everyday

I have two RDS instances: staging and production with two databases in each. I would like to sync the production instance on the staging instance everyday. Any suggestions?
0
votes
0answers
27 views

SQL Server 2012 on a Windows 2008 R2 cluster, would like to upgrade Windows to 2012 R2

I need someone to help validate a strategy. I have a pair of Windows 2008 R2 server in a active/passive failover cluster with SQL Server 2012 installed. I would like to upgrade the Windows OS to ...
0
votes
0answers
25 views

Replacement for transactional replication

My colleagues and I have to migrate a database from SQL Server 2008 R2 to SQL Server 2012. Schema, triggers, stored procedures etc. are working fine. But we also have to "migrate" the replication ...
0
votes
0answers
54 views

Order by 2 columns with different order behavior [on hold]

I didn't know how to describe the question in the title the best way, but here's my problem, consider this data: ID grade cost 1 1 0.45 2 1 0.3145 3 2 0.054 4 2 0.4165 5 ...
-1
votes
0answers
16 views

oracle join from multiple tables [on hold]

I have to extract data(Table1.Name,Table1.ID,Table2.desc,Table4.desc) from four tables. ->Table1(Name,ID,Group_Id) ->Table2(Group_Id,desc) ->Table3(Group_Id,perm_id) ->Table4(perm_id,desc) In ...
0
votes
0answers
12 views

Searching a text with space in mySql match against Query

I want to search a text in mysql DB with [space] (Ascii 32) as a part of it. But I am not getting the correct result. My MySql Query is: SELECT count(id) as total , MIN(product_price) as ...
-3
votes
2answers
41 views

Select in select [on hold]

I am doing some test on the internet as preparation for my test tomorrow. I would like to know what I am doing wrong here. Thanks a lot!
0
votes
0answers
8 views

Mongodb - save image as bytes or as files

I'm developing a website which allows the user to upload an image per item. I guess there will be hundreds per user. What is more preferred? Save the images: as bytes in the DB (mongodb) as ...
0
votes
0answers
32 views

How can I import a database from MySQL version 5.0.92 to Maria DB 5.5.47

I am using phpMyAdmin to export my database. Everything works on one server but on my other server it will not allow me to correctly import this data. It throws over 15,000 errors, which is pretty ...
0
votes
0answers
12 views

Check MySQL database growth

I need to check the growth rate for my database (MySQL 5.5). So far I found only a query that answers me the current size - despite the title of the article - (How to check growth of database in ...
0
votes
0answers
16 views

Postgresql restore database from file encoding error

I have problem while i import database from backup I gives many output and many "invalid command" messages. In the end it gives an encoding error. what can the reason be? my command: sudo -u ...
0
votes
0answers
34 views

Management Studio Database Space Available

Recently I have installed a fresh version of sql server 2016 RC. I get an error when I try to import a bacpac file from azure. SQL72012 Generate drop statements for objects that are in the target ...
0
votes
1answer
46 views

SQL Server AlwaysOn Error:35250

I am configuring AlwaysOn in my test environment but getting the following error. Msg 35250, Level 16, State 7, Line 1 The connection to the primary replica is not active. The command cannot be ...
0
votes
1answer
31 views

Can I restore only the LOG of a database?

We have a 1.5TB database. I could create some replication strategies do replicate the database to another server in a fixed time.But the developers don't know when they will need to replicate this ...
0
votes
1answer
23 views

MySQL Replication Duplicate Entry for Primary Key

160523 13:07:29 [ERROR] Slave SQL: Error 'Duplicate entry '914166' for key 'PRIMARY'' on query. Default database: 'zo_dev_20121216'. Query: 'UPDATE activity SET activity_type_id = 9, ...
0
votes
1answer
35 views

Syntax help in SQLPLUS

Does Oracle have any builtin SQL syntax help. I find I may have forgotten a few statements and sometimes have no Internet access. I am using Oracle 11g.
3
votes
2answers
154 views

select distinct one column with all instances of another column in a second column [duplicate]

If I have a table with the following information: ParentID | ChildID ---------+-------- 6 | 6 6 | 7 6 | 8 6 | 9 6 | 10 I need to ...
0
votes
0answers
39 views

Rebuilding statistics?

I had built statistics, they are: I need to modify the varchar to int in a field called SituacaoIncial in my Calclientes table. I used DROP STATISTICS ...
0
votes
0answers
13 views

Extract an image from an SQL database using PHP [migrated]

I am trying to extract an image from my database using this code: HTML : ><img src="imagePrevie.php?ID=<?php echo $lastImage2['id'] ; ?>"><?php $lastImage2 return the true value ...
1
vote
1answer
34 views

Diffrence in result from PostgreSQL (PostGIS) and SQL Server (Spatial)

I have two points and I have to calculate difference between them. I using below query in SQL Server. SELECT geography::Point(27.185425, 88.124582, 4326) ...
3
votes
1answer
66 views

Basic question: Simplest way to share company databases

My company is looking to access large quantities of data from another company we have good relations with. Currently we are using a web interface to interrogate their information, however it is quite ...
2
votes
0answers
11 views

MongoDB not using all memory in Windows server

I have a stand-alone MongoDB instance running in windows. It's recently experiencing slowness and my troubleshooting has found the following symptoms. The slowness normally occurs after a full text ...
0
votes
0answers
14 views

Generate DACPAC diff using predefined config

I would like to generate a diff file based on the database vs DACPAC comparison. Currently what I am doing is extracting DACPAC from the target database and trying to create a diff file based on that ...
0
votes
2answers
35 views

A tail-log backup of the source database will be taken ? Why I am seeing this warning

I took a backup of a database from 1st server (which runs SQL Server 2014). When I try to restore the backup to a 2nd server (which runs SQL Server 2012) I get this warning message: Warning ...
0
votes
1answer
29 views

How to select rows that date is in range from ranges table

I have a table1 that hold ranges rangeId, rangeName, fromDate, toDate,cat another table2 has rows rowTitle,rowDate I need to select all rows from table2 that table2.rowDate is between ...
0
votes
1answer
24 views

how to purge / shrink .idb tables

I know this has been asked many times but, what is the proper configuration to succesfully purge / shrink .idb tables? I have tried to use optimize table table_name but after the query the .idb ...
1
vote
0answers
18 views

What counts when purchasing a BI SQL Server the application that connects to the server or the application users

I have a .NET Application (time registration) software that is frequentley used by all our employees and that I deploy on our lan net drive. This application connects to an express sql server. Now we ...
0
votes
1answer
26 views

How to remove datafile from oracle database which is already remove locally?

Created one dbf file from my database using following command, alter tablesapce PAULA_INDEX add datafile '/u02/oradata/hfd1/index/index17.dbf' size 2000M; This dbf file is created in my server ...
8
votes
1answer
121 views

Overcoming the SQL Server Express Edition limitation

Microsoft SQL Server 2014 Express edition has a database size limit to 10GB. Now, is that just for a single instance or the overall size that the edition will allow? Or does that means that I can have ...
1
vote
1answer
23 views

CDC with AlwaysOn Availability Groups

So I just recently got to enable CDC on an always on AG. While many sources claimed enabling CDC on alwaysON AG is as easy as it is on any standalone server, turns out it really isn't. As MS says ...
0
votes
1answer
23 views

problem transforming table to First normal form

I have table named Agent. It has attribute named agent_status. It's value can be on or off. I want to conform this table to first normal form. Do i have to create different table for this attribute?

15 30 50 per page