1
vote
1answer
82 views

Return value formatted similar to if casted as money

My client's system is very outdated, and there is nothing I can do about it. What I'm trying to achieve is to extract values always with at least 2 decimal places. E.g. From 1826.5695600000 ...
2
votes
0answers
138 views

SQL Server Database errors 8935/8934/8977

I received a database from a customer, that i have to try to recover. I'm facing some problems, specifically with the following errors: (Error, Level, State, MessageText, RepairLevel, Status, DbId, ...
1
vote
1answer
94 views

Where is the generic plan stored when using PREPARE statement in PostgreSQL?

According to the document, if a prepared statement is executed enough times, the server may eventually decide to save and re-use a generic plan rather than re-planning each time. My question is where ...
2
votes
3answers
122 views

What is the best way to upgrade a MySQL version in a Linux Server

What is the best way to upgrade a MySQL version in a Linux Server I have database around 14 GB running with 8 -15 GB ram(diffrent deployments) .At present MySQL version is 5.5 and I’m planning to ...
0
votes
1answer
69 views

Issues restoring db [closed]

So I had initially received the 'database in use' error, searched for a solution on Google, was led to believe that I might need to change the default db account connects to, changed it and am still ...
1
vote
1answer
590 views

Use result from table_schema query as <table> in select * from <table>

Is it possible in PostgreSQL to use the result of the query below as table name in a SELECT * FROM . SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'seam_event_%' ORDER BY ...
3
votes
2answers
4k views

Are there advantages to using temporary tables over derived tables in SQL Server?

I read the derived tables have better performance than temporary tables, but anyway many SQL Server developers prefer the second ones. Why? I must do queries with large data (millions records) and I ...
0
votes
3answers
217 views

Inner Join Table (Mapping table)

this is first time i am try mapping table in mysql i write this procedure but not work ? whats wrong ? DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `spr_GetInformation`( ...
1
vote
1answer
37 views

Case when missing line logic

I have a case when statement in a extract query which doesn't seem to be returning what i'm expecting DECLARE @Val1 int, @Val2 int,@Val3 int, @Val4 int, @Val5 int SELECT @Val1 = 5 , @Val2= 2,@Val3= ...
0
votes
1answer
489 views

Configure MariaDB PAM authentication, and enabling remote login from Toad

I am currently trying to integrate Linux services into my Windows environment and have installed MariaDB with PAM authentication following the guidance from MariaDB. I have tested successfully on ...
3
votes
0answers
1k views

How to properly monitor the number of PostgreSQL database connections?

I tried to use a Nagios script for monitoring the number of database connections on a Postgres database and I reached this problem: these are counted as currently open-connections and measured every 5 ...
0
votes
0answers
258 views

Mysql View Performance on Aggregate Functions

I've a table that contains weekly statistical infos. ex. Society - Week - Year - Data AAA Inc - 1 - 2014 - 10250 AAA Inc - 2 - 2014 - 5235 BBB Inc - 2 - 2014 - 3210 ... Over this table i need to ...
-1
votes
1answer
1k views

How to set up a connection in Pentaho Kettle for Oracle using a SERVICE NAME instead of SID?

This error shows up when I try to connect to database string host:port/servicename.
1
vote
1answer
182 views

Postgresql wal saving for standby servers that go offline

I use postgresql 9.1 replication to a lot of workstations that have postgresql on hot standby mode. However sometimes these workstations go offline and disconnect from the master server. If they go ...
0
votes
1answer
377 views

Get the value of one attribute from the reference key of another table?

I have two tables named as ps_order_detail and ps_product_lang in MySQL. I want to get the product name from one table whose reference key is in another table. I have two tables. First the ...
0
votes
2answers
943 views

Can SQL Agent job notifications be sent to one operator for success and another for failure?

We have a requirement that some people are sent notification on success, and other on failure. But the UI seems to only allow a combination of 1 operator + 1 condition. So I was wondering if we ...
0
votes
1answer
194 views

MySQL how to change a slave to a new master?

I have a MySQL active master (lets call it Alpha), a passive master (called Beta), and a slave (called Gamma). Topology before change: I am going to switch the active master and the passive ...
1
vote
2answers
4k views

SSRS Subscription Error: “Failure sending mail: Report processing has been canceled by the user. Mail will not be resent.”

On the report Subscriptions page, under "Status" for Last Run, it has the following error: Failure sending mail: Report processing has been canceled by the user. Mail will not be resent. It's a ...
8
votes
1answer
2k views

How do I determine if a SSIS transform is non-blocking, partially blocking, or fully blocking?

There are several blogs which claim to categorize SSIS Transforms into blocking (asynchronous), non-blocking(synchronous) and partially blocking(asynchronous). When looking into the specific ...
2
votes
2answers
712 views

Dropped the Distibution database before disabling publishing and distribution, how to proceed?

I'm setting up my first Distributor database on SQL Server 2012. I successfully created one and then wanted to blow it away and perform the task again just for practice. This was a brand new ...
0
votes
1answer
2k views

Creating a table if it doesn't exist (old versions of PostgreSQL)

In recent versions of postgreSQL one can use the syntax: create temp table if not exist my_table as ... to create a temporary table if it doesn't exist yet. However, the clause if not exist is a ...
3
votes
2answers
86 views

Find problematic MySQL users and databases

We have a MySQL 5.1 server that is an "open" service: anyone on campus can request a database. As such, we have several thousand databases on this one server. As you might imagine, sometimes one ...
0
votes
1answer
154 views

Calculating Open Days field and stopping with status change

I had a question but wasn't sure where I needed to post or view if someone has done this before. I have a dilemma on my hands. Background Info: I have been trying to figure out what to do since I ...
1
vote
2answers
618 views

MySQL views and table locking (5.1 MyISAM)

I have a large (160 million rows, 50GB) table in MySQL 5.1 using MyISAM. If I were to construct a view defined by a fairly complicated query, would a SELECT on the view lock the underlying table?
1
vote
2answers
7k views

exporting oracle tables on command line as sql files

I use exp and expdp to export database tables on command line but it generates binary .dmp files. I want to export/import tables as .sql* files on command line like pl/sql developer app can do. Is ...
1
vote
1answer
93 views

Reconciling @@TRANCOUNT

Running SS2005. I have a script that calls procedureA which in turn calls procedureB. procedureA has no explicit transactions. procedureB is split up into several small blocks of non-nested BEGIN ...
7
votes
2answers
393 views

Should I nest dependent outer joins in SQL Server?

I have heard mixed information on this and am hoping for a canonical or expert opinion. If I have multiple LEFT OUTER JOINs , each dependent on the last, is it better to nest them? For a contrived ...
0
votes
1answer
38 views

What is the log backup schedule?

I need to see the log backup schedule for a database. Where is this information located in SQL Server Management Studio?
0
votes
1answer
125 views

mysql encryption key storage on file

I have a MYSQL server on a linux server. I am using AES encryption functions to store data in the DB server. Commands are like this ones: INSERT into userc (name, town) VALUES ...
0
votes
0answers
51 views

MySQL - query join returning zero recs from table with data

I've provided a file that has the table structure and some sample data that I'm working with. I don't understand why I'm getting nulls from a joined table, where there is data. Here's my query ...
1
vote
1answer
237 views

CDC not picking up changes [closed]

CDC has been set up for one of our databases in our test environment but it's not capturing any of the changes. I've made sure the capture job is running. I've disabled CDCs for the database, enabled ...
1
vote
2answers
445 views

MySQL High Availability for InnoDB

I am looking for MySQL High Availability with huge transactions. I prefer to go with InnoDB Engine. I prefer to use MySQL Master - Slave Replication. However, this option provides us Manual fail over ...
0
votes
0answers
24 views

Creating MySql feed table

I'm building an application with MySql DB. I want to create a simple feed that will look like Receiver_Id | Sender_Id | Feed_Message | Time example for output: row: 1234 | 5678 | User has joined ...
0
votes
2answers
81 views

How to make a trigger work after a certain UPDATE

I would like to know if it's possible to create a trigger on Oracle that is invoked only when a certain UPDATE is done. For example: UPDATE colors SET tastes_good = y WHERE color_name = 'Apple'; ...
2
votes
1answer
73 views

Result of a query in SQL

Let us say that we have to write a query for: Find the distinct names of all students with percent>90 in courseno=107 given three relations: Students (rolno:integer,sname:string) Courses ...
2
votes
2answers
2k views

pgpool replication not allowing md5 authentication

I have installed both pgpool and postgresql via apt. In pgpool.conf, I have made the changes necessary to use replication mode, as well as my two postgresql databases (currently all running on the ...
0
votes
1answer
101 views

How to use numeric operator between varchar value?

Here detail my table : id | meta 01 | {"key1":"value1","data":"10"} 02 | {"key1":"valuex","data":"15","key3":"y"} 03 | {"data":"20","key3":"x"} *id is primary key *meta is field that store json ...
0
votes
0answers
68 views

Equivalent of old style join with new style

Can someone please help me write the following join expression in new style: Select tb1.col1,tb2.col2 from table1 tb1, table2 tb2 where tb1.col1>=tb2.col2 I know that the equivalent of ...
1
vote
1answer
646 views

GeoNear with Mongoose

This is my mongoose schema - var userDestinationSchema = mongoose.Schema({ uid: String, update_time: Date, location:{ //<INDEXED as 2d> ...
1
vote
1answer
63 views

Master-master database replication on 5 servers

My current project requires immediate replication between 5 databases. Servers are physically distributed across the globe. Currently we use Redis with one master server installed on another 6th ...
0
votes
0answers
51 views

Import and export data from SQL Server table using query [duplicate]

I need to import and export data from a table using a SQL query so I need query example for importing and exporting data. I don't want to export it to txt file as the data is not getting aligned. I ...
2
votes
2answers
507 views

Query hangs forever at first but works after one day

I have two schemas namely A and B. I regularly copy contents of 10 tables from A to B. Here's is how I do it First I rename the original tables in schema B Then, using SQL Developer I copy the table ...
1
vote
1answer
165 views

How to add CYCLE to BIGSERIAL in phpPgAdmin

I'm trying to apply CYCLE to a BIGSERIAL in phpPgAdmin. I've seen how to do it with a query, but I'd much rather be able to do it from phpPgAdmin. Can this be done with phpPgAdmin? If so, how? If ...
1
vote
4answers
4k views

Reset SQL Server sa password

I need to recover my SQL Server 2008 user/pwd. The situation is: I don't know the SA password and Windows Authenticated user is no longer active user (disable user because the user has left job) so ...
0
votes
1answer
169 views

Postgres CYCLE and existing values

I love that SERIALs can wrap around with CYCLE. However, I can't seem to figure out if that there are lingering values, will Postgres skip over them or throw an error. In other words, I have a table ...
2
votes
1answer
57 views

Denormalize Design Modification

Our DBA is on medical leave, I am just a developer trying to do my part. Initially, the bean counters were going to use quickbooks. However, after seeing how much time they could save with custom ...
2
votes
2answers
855 views

Designing database with Category and Tags for Posts - Seeking for guidance/advice

I'm not really a database novice but I'm not an expert either. Problem: I'm having this difficulty on designing my Post, Category and Tags relationship. I've read Normalization many times but could ...
1
vote
1answer
948 views

PostgreSQL - how to rename CamelCase column?

When I tried to rename a CamelCase column like this: ALTER TABLE mytable RENAME COLUMN camelCaseColumn TO camel_case_column; I get the following error: ERROR: column "camelcasecolumn" does not ...
2
votes
1answer
277 views

Postgres: Purpose of archiving in master?

I am reading tutorials on how to setup streaming replication in Postgres from master to slave. Some tutorials recommend setting up archiving in the master (and restoring in slave) . In the master, ...
0
votes
0answers
2k views

'oracle.jdbc.driver.OracleSQLException': ORA-01031: insufficient privileges. (SYS.DBMS_XMLSAVE)

I have this function (written here by someone), placed in the package ENVER.ENCODING_VERIFIER: FUNCTION loadxml_table (p_owner IN VARCHAR2, p_tablename IN VARCHAR2, p_format IN VARCHAR2, p_tmpClob IN ...

15 30 50 per page