0
votes
0answers
13 views

MYSQL Stored Procedure Problem. Need Help

MySQL Stored procedure: Delimiter $$ DROP PROCEDURE IF EXISTS spGetCompanyNames $$ Create procedure spGetCompanyNames (IN Employer nvarchar(75), Out Employer_Namee nVarchar(75)) begin Select ...
0
votes
1answer
79 views

Splitting Columns

I want to ask a complicated question and I think its advanced a little. I have a table has this design, its an attendance system. I need to split the time if the attendance count per day was not 2: ...
0
votes
0answers
26 views

MySQL select query runs forever in Toad

I'm trying to run a simple SELECT query in Toad (for MySQL 7.2.0.2922). SELECT * FROM sometable When I click execute (or press F9) a small timer shows up in the status bar (bottom right) and it ...
-6
votes
0answers
32 views

Absent and Leave [duplicate]

The code you sent me which is show only absent not leave but I have to show those employee leave SELECT DISTINCT subDate.absent_date, SMEmployee.EmployeeID, SMEmployee.BadgeNumber, ...
6
votes
2answers
94 views

Should I add transitive foreign keys?

Simple example: there is a table of customers. create table Customers ( id integer, constraint CustomersPK primary key (id) ) All the other data in the database should link to a Customer, so ...
2
votes
3answers
66 views

Standard Edition High Availability without Shared Storage

I'm a software dev with little experience managing SQL Server so please bear with me. We are developing a piece of software that needs to be highly available, with a significant degree of resilience. ...
4
votes
0answers
50 views

Why is it @@SERVERNAME but not @@DBNAME? [closed]

I'm just curious: To get the server name, I use SELECT @@SERVERNAME but to get the current database name, I use SELECT DB_NAME() Technically, both seem to be scalar functions: @@SERVERNAME is ...
0
votes
1answer
23 views

STDisjoint() = not STIntersects()?

In short, are STDisjoint() and STIntersects() antipodes of each other? According to the documentation, it seems that they are. But there is no explicit note about it. Are there any tricks? Which one ...
6
votes
0answers
82 views

Busy table is not getting vacuumed

We're using Postgres 9.2 on Windows to store low-frequency timeseries data: we're inserting around 2000 rows per second every second 24 hours, 7 days a week with no downtime. There is a DELETE that ...
0
votes
1answer
24 views

Altering a table to add a New Column vs Create table with New Column

I have Table A which i'm tasked to add a new column is_fully_complete bit(1), and i'm thinking: Would it be better to a.) Create a new table Table_A_new like Table_A and add the new column there ...
-1
votes
1answer
31 views

mysql database performance issue

I have a 2x Xeon Quad Core E5410 2.33 GHz with 24 GB of RAM. running 5.5.31 with the following my.cnf file. It supports lots of reads and writes and transactions(all INNODB). Are there any obvious ...
-6
votes
0answers
54 views

Query For Leave and Absent [closed]

SELECT DISTINCT subDate.absent_date, SMEmployee.EmployeeID, SMEmployee.BadgeNumber, SMEmployee.EmployeeFullName, SMDepartment.DepartmentName, MIN(CONVERT(time(0),CHECKTIME)) as Intime, ...
0
votes
0answers
14 views

Understanding correct procedure to recover master in master-slave replication in PostgreSQL

For learning, I have setup master-slave streaming synchronous replication. Pg-pool 3.3.3 is installed in one VM and it connect to 4 VMs which runs PostgreSQL 9.3, one master and 3 slaves. Replication ...
1
vote
0answers
20 views

Can I include extra columns in a m->m mapping table? [duplicate]

I guess this is sort of an odd question, but consider this scenario. table classes (id_pk) table students (id_pk) table students_classes_map (students_id_fk_pk, classes_id_fk_pk, finalExamScore ...
0
votes
2answers
69 views

How can I make this query more efficient?

This is the query: SELECT races.*, tmptimers.last_start_time, tmplaps.updated_at AS last_updated_at FROM races LEFT JOIN (SELECT * FROM timers WHERE timers.user_id = 1) AS tmptimers ON ...
1
vote
1answer
29 views

select query on unique column AND alternate column of “aliases”

I have a MySQL table (~10,000 rows) with a pk id (int) column and a name (varchar) column (as well as a few other unimportant columns for this question). The name column contains unique values that ...
0
votes
2answers
56 views

ORA-12541: TNS:no listener

I've been working this issue all day, reading posts here and other locations. I'm just not able to get past this error. I can connect just fine locally on my server (CentOS), but continue to get the ...
0
votes
0answers
28 views

Tinder database structure?

For those of you familiar with the way Tinder works, do you happen to also know the underlying database structure behind it? How it manages to store all the information, the memory efficiency, etc. ...
2
votes
1answer
42 views

MySQL Replication - Master Master - Single Master write

I am looking to improve our fault tolerance for our persistent store. After reading several online docs about how to set-up master <> master replication, I'd still like to ask the experts about the ...
0
votes
1answer
12 views

mongodb: maxTimeMS ignored

After trying with different drivers and clients, we suffer with mongodb timeout on find query. Even Profiling logs the settings and issue well. 2014-08-13T23:46:43.218+0200 [conn80] query ...
0
votes
1answer
17 views

How to find the last error codes and messages of failed statements executed by a user?

Hopefully, a program that connects to a Oracle DB does sufficient logging of errors on its own, e.g. when doing a bulk insert the error reporting of a program could produce something like this: ...
0
votes
0answers
17 views

Conditional value lists in MySQL

apologies in advance if the language I use here is insufficiently specific. Please let me know if there's anything that I can clarify. Does MySQL provide a means of creating conditional value lists a ...
0
votes
1answer
28 views

Missing Database Diagrams node in Management Studio [on hold]

It seems that I dont see this diagrams node when I log into my database in the testing SQL Server 2008R2 (on a 32 bit server) but when I connect to the same instance from the production SQL Server (64 ...
0
votes
0answers
24 views

prevent sql injection inside stored procedure

I finally found a solution for the following question: reading input parameter values in stored procedures However I'm not sure, whether this solution is resistant to SQL injections. I'm using ...
1
vote
0answers
21 views

SQL Server 2005 CHECKCATALOG fails

CHECKCATALOG is failing on a database that originated in SQL Server 2000. I am getting errors of the type: Msg 3853, Level 16, State 1, Line 1 Attribute (object_id=489156888) of row ...
0
votes
0answers
18 views

Can't execute CreateAll.tt template in SQL Server Express

I have a CreateAll.tt template in a Visual Studio project. All the scripts I try to execute are correct - the template is tested on a different machine with SQL Server 2012 Developer Edition and it ...
1
vote
0answers
20 views

Does cmdexec have additional process isolation beyond cmd.exe?

I have a cmdexec step in a sql agent job that includes a redirection into a file at the end. It works as expected from a CMD shell running in the context of SQL Agent service account and produces a ...
2
votes
2answers
54 views

Why do I need to backup the Database Master Key?

When I make a Database Master Key for a database: CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Some Long Password' This page from Microsoft recommends I back it up offsite: ...
4
votes
3answers
359 views

Why does transaction log continue to grow in Simple recovery mode with nightly backups

Before immediately marking as duplicate, I have read Mike Walsh's Why Does the Transaction Log Keep Growing or Run Out of Space?, but I don't think it gave an answer to my situation. I looked through ...
2
votes
0answers
11 views

Sql Server Backup to URL (Azure) ERROR

I'm trying to take advantage of the new backup to url function in SQL Server. I have created a valid cert and tried a simple backup, but I get the same error every time no matter what I try. I have ...
4
votes
2answers
68 views

Cannot remove SQL Server 2012

I was in the process of installing SQL Server 2012 x64 Express Management Studio and encountered one heck of an issue. I was most of the way through the installation process when my computer locked ...
1
vote
1answer
25 views

MySQL 5.6.17 running out of memory when opening table with many partitions

We are currently setting up a MySQL database (version 5.6.17) on an Amazon db.m1.large RDS instance for storing time series data. Each time series property of an object is stored in a separate InnoDB ...
0
votes
1answer
9 views

SQL Server - linked Oracle server: EXECUTE permission denied on 'xp_prop_oledb_provider'

Inside of our SQL Server, we have created a linked server to an Oracle server. We ave mapped several users to the Oracle server and specified the credentials. On the Linked Server 'Security' ...
2
votes
0answers
40 views

Issue shrinking dev sql server DB's log file

I have a development db that's running on sql 2014 in 2012 compatibility that I'm having an issue with trying to shrink the log file. The mdf is 60+gb and the log is 80+gb but since it's dev like ...
0
votes
1answer
33 views

Change code editor variable highlighting colour

Within the SSMS Code Editor (for SQL Server 2012) I have this code written within the editor, that has a Dark theme applied. When you click on a variable, SSMS highlights all the other occurrences of ...
3
votes
0answers
37 views

Can't use Fuzzy Lookup in BIDS

A coworker of mine was having an issue with BIDS. He's doing a simple fuzzy lookup and is only looking against two rows(For Testing Purposes). The weird thing is that when he tries to execute an ...
0
votes
1answer
7 views

MongoDB Booleans

In MongoDB, I could store a boolean like so: active: True But that doesn't really take advantage of NoSQL, since there's no reason to have the active property at all if it's false. Is there a way ...
2
votes
2answers
65 views

Database events that will cause deletion of index

In SQL server if we try to change a data type of a column having index ,then it deletes the indexes associated with that column and changes the data type . I was not aware of it and was faced problem ...
1
vote
1answer
23 views

SSAS : An error occurred when instantiating a metadata object

Aside from installing SSAS, I have no experience using it. Our developers are saying that it is no longer possible to create a new aggregation, whatever the cube. The error occurs when hitting ...
0
votes
0answers
11 views

DataStax OpsCenter - can't connect with agents [migrated]

I've installed DataStax OpsCenter (Apache Cassandra) and in OpsCenter, there is an error: "0 of 1 agents connected". When I click "fix", enter credentials and try to install nodes, i get error: ...
0
votes
1answer
13 views

Connecting to MYSQL on an EC2 instance

I'm trying to use Zapier to connect to our MySQL database in order to add results from forms (hosting with WordPress) directly into our internal database. The database is working properly and so are ...
0
votes
0answers
11 views

Is it a good idea to store image data URIs in a Mongo database? [closed]

For a small project I built an HTML5 image uploader (FileReader -> dataURI) where the URI string is saved in the database. Is it a good idea to do such a thing for big projects? What are the bad/good ...
0
votes
0answers
39 views

Oracle 11.2 Explain Plan takes too long

I'm using Oracle 11.2 SE on a 16GB Xeon E3 Linux machine as well as 11.2 XE on a 8GB i7 Win8 machine: SELECT banner FROM v$version: Oracle Database 11g Release 11.2.0.4.0 - 64bit Production PL/SQL ...
1
vote
0answers
19 views

Understanding pg-pool in details

I have following problem regarding the pg-pool (3.3.3) When master fails, automatic failover happens and standby is promoted to master. But this new master don't have any replicators. Other slave ...
1
vote
1answer
116 views

What does exec(text) do?

I just found the following function in two RDS PostgreSQL 9.3 DBs: -- -- Name: exec(text); Type: FUNCTION; Schema: public; Owner: adam -- CREATE FUNCTION exec(text) RETURNS text LANGUAGE plpgsql ...
1
vote
1answer
38 views

how to update the value of a period contained inside a bigger range

I have a tsrange like '[2010-01-01 14:00, 2010-01-01 15:00]',20 And want to update the 20 value to 15 in a range inside that, like '[2010-01-01 14:10, 2010-01-01 14:30]',15 My expected outcome ...
1
vote
0answers
53 views

A query that does a lot of reads, but plan is OK [migrated]

I´m experiencing a strange behaviour in a specific query in the SQL Server 2008 R2. I´ve got a query that does 19 million reads and is very time-consuming and when I try to check its cached plan, the ...
2
votes
2answers
126 views

Oracle ROWID, can we assume it is sequential in a insert-only scenario?

How safe is it to assume that ROWID is sequential or ascending when a table is only inserted to? and why? I had a situation where I had to verify whether new records were added to table which has no ...
2
votes
1answer
32 views

Oracle user locks (dbms_lock): guaranteed order of requests granted?

I was wondering if Oracle guarantees that the sequence of dbms_lock.request granted is the same as the sequence in which they were requested. In my tests it always was the case, but I couldn't find ...
3
votes
1answer
33 views

PostgreSQL: Trigger for updating view doesn't work

I'm trying to make the trigger for updating a view work. If I'm doing and INSERT it works! But when I'm trying to do an UPDATE it just doesn't run. CREATE OR REPLACE FUNCTION test_trigger_function() ...

15 30 50 per page