0
votes
2answers
2k views

Can't backup a Postgres database: FATAL: Peer authentication failed for user “postgres”

I can connect to my database no problem remotely, either from PHP scripts on our webserver or using PGAdmin3. Unfortunately, when I try to run pg_dump backups locally on the server itself, I get: ...
0
votes
1answer
95 views

Query multiple rooms with different conditionals (Adults, Children)

I have a simple query where I select available x Rooms with x Adults + x Children per hotel that matches a date range, but I'm having a hard time trying to figure out how to query a list of rooms per ...
1
vote
1answer
16 views

Rebuilding an entire Microsoft SQL Database

Is there a suggested way to rebuild an entire SQL Server database from another database in SQL Server 2012 SP2? Let me explain... we have a database that we are trying to enable partial containment ...
2
votes
4answers
124 views

Casting fails on subquery result

I'm in a bit of a pickle, I have to perform a query on a database with rather poor data quality. I am trying to evaluate a field which contains a date, but which was defined as a nvarchar. I thought I ...
1
vote
1answer
9 views

What folders should I check to see if these MongoDB applications are installed on my server?

I have a CentOS (Linux) server and looked at the /bin directory, but don't find the applications listed below. What folders should I check to see if these applications are installed on my server? I'm ...
5
votes
2answers
70 views

Adding a sequence number to existing rows

I have a table with an OrderSequence column. The schema looks roughly like this: id Name OrderSequence I have an array of ids ["1", "2", "3", "4"] from an application, and I want to set the ...
6
votes
4answers
4k views

Formatting T-SQL in SSMS 2012

According to this Microsoft document: http://msdn.microsoft.com/en-us/library/ms174205.aspx I am supposed to be able to use ctrl+K then ctrl+D to format my SQL documents in SQL Server Management ...
1
vote
1answer
86 views

SQL Profiler Shows Update (EventClass) with No Errors, But Data in Table is Not Changed

I am trying to debug a web app that uses a database and I need a little help. The problem is that part of the code throws a timeout error. I started using SQL Server Profiler to check the ...
0
votes
1answer
24 views

Create Meaningful Visualization for Large Set of Tables

I'm trying to create a meaningful, usable visualization for my company's ERP database. I've extracted a skeleton of the database so I can make changes without modifying the production environment. ...
0
votes
1answer
15 views

MySQL root changed password went wrong

So basically this is what I did: mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database ...
0
votes
0answers
8 views

Updating +150,000 rows using .sql file causes ERROR 2013 Lost connection to MySQL server during query

I am using ubuntu 12.04. I have a .sql file that is around 5 megabytes. When I use the command: mysql -u -p -v database query.sql The server prints out the content of the file (because of --verbose) ...
2
votes
1answer
303 views

Why Django session table grows on PostgreSQL

I use PostgreSQL 9.1.6 via PgBouncer 1.4.2 in my Django 1.4.8 project. django_session table grows all the time. VACUUM does not help. VACUUM FULL runs for hours. Only TRUNCATE helps usually. The ...
10
votes
3answers
117k views

How to use sqlplus to connect to an Oracle Database located on another host without modifying my own tnsnames.ora

I want to connect to an oracle database located on another host using sqlplus. This page suggested adding an item on my tnsnames to conenct to that database local_SID = (DESCRIPTION = (ADDRESS ...
0
votes
1answer
93 views

Is searching an alternate index on a partitioned myISAM table concurrent or serial?

I have a myISAM table with 30 partitions. The primary key is a SHA1 hash value, which is also used in the partition selection function. I also have an alternate key - an autoincrement integer. Since ...
1
vote
0answers
14 views

Strategy to find the unique bivariate polynomials

I have table that stores Tutte polynomials of a large set of graphs. These are bivariate polynomials with integer coefficients. An example of a polynomial taken from Wikipedia is: Since the ...
0
votes
1answer
596 views

consequences of using “innodb_flush_method = O_DIRECT” without having a battery backed write cache? or on a KVM guest?

Mysql 5.5.29 Innodb- 128GB Ram - 32 cores - Raid 10 SSD. Our server which is a dedicated KVM guest on a 'baremetal' is hosting our heavy read-write DB server. Everything is file-per-table. ...
1
vote
3answers
41 views

How to separate Stored Procedures (i.e. all the business logic) from Client Database so that it only contains client data?

Scenario: Our Application Database (in SQL Server 2012) contains entire business logic in the Stored Procedures (SPs). Everytime we have to publish the DB to the client, it unnecessarily results in ...
0
votes
0answers
39 views

Gap in autoincrement column when using “insert into … union …”

I have a table obj: +----------------+------------------+ | Field | Type | +----------------+------------------+ | obj_id | int(10) unsigned | ...
0
votes
1answer
38 views

MySQL 5.1: change datadir variable value in my.cnf

Below is my system configuration: OS: RHEL5 MySQL: 5.1.73 Default datadir=/var/lib/mysql/ But, the above directory has space crunch. So, I decided to change the path. I found /u000 directory has ...
0
votes
4answers
27 views

Disable MySQL binary logging with log_bin variable

Default MySQL config file /etc/mysql/my.cnf installed by some debian package using APT often set log_bin variable, so binlog are enabled: log_bin = /var/log/mysql/mysql-bin.log When I want to ...
0
votes
0answers
21 views

Index on fields with a function

I have a log table. It logs visitor data (time of visit, browser, window size ...). I want to create reports. I use a query like this (MySQL): SELECT COUNT(*) as raw_views ... FROM logs WHERE ...
0
votes
0answers
15 views

Remove question marks from database(latin1_general_ci table)?

How can I remove question marks(not diamond shaped) from a latin1_general_ci MyISAM table? I tried going back to utf8 and tried to apply things in ...
0
votes
2answers
3k views

MySQL tuning (my.cnf) for very large tables and ad hoc queries [duplicate]

We are an email marketing company and recently switched our setup to MySQL. We need to configure mysql (my.cnf) for extreme performance. We have tried to configure my.cnf but heavy queries can get ...
0
votes
1answer
29 views

Text Storage and Database Design Optimization in a SQL Database

Given a database with a number of columns (c), where some of these columns contain text that is one of multiple values due to a set CONSTRAINT on the columns, what is the most efficient way to ...
1
vote
1answer
701 views

Fixing wildcard expansion resulting in too many terms error (DRG-51030)

How can I resolve the wildcard_maxterm problem in Oracle 10g? My index creation syntax is: begin ctx_ddl.drop_preference('SUBSTRING_PREF'); end; / begin ...
0
votes
0answers
14 views

Oracle : Is there a way to grant the ability to run a job to a role?

We have several dbms_scheduler jobs in an 11.2 database that we would like users with a certain role to be able to run. As such, we don't want to grant the ability to run directly to the users, as it ...
1
vote
2answers
37 views

Give every user 3 default 'bookmark' entries

I've got a table users and a table bookmarks. The table bookmarks obviously contains pages the user wants easy access too. But, there's a new requirement now: every user gets 3 unmutable bookmarks. ...
0
votes
2answers
13 views

Is it safe to copy DB files directly from an LVM snapshot?

I saw two different approaches for backing up database with LVM snapshot. This article suggests spawning another MySQL instance to do an SQL dump. MYSQL Performance Blog suggests that it is safe to ...
0
votes
1answer
16 views

Modify text file with Oracle PL/SQL

I'm trying to open and replace a string in a text file with the following procedure: BEGIN v_file_name := 'text_file.txt'; v_filehandle := utl_file.fopen(v_file_dir, v_file_name, 'W'); v_id_nextval ...
0
votes
1answer
23 views

Can a connection's prepared statements be altered by Postgres's admin functionality?

I am trying to tamper proof as best as possible a peer to peer application. I am concerned that the prepared statements will be altered. Can the Postgres admin alter a connection's prepared ...
2
votes
1answer
260 views

Alter mysql database engine doesn't work from cluster to other

I got into this issue when I tried to alter my database table engine to InnoDB from ndbcluster, It did not work. But When I changed engine from InnoDB to ndbcluster it worked. It did not throw any ...
0
votes
0answers
7 views

MS SQL Management Studio hangs when connecting over Bitvise

I need to connect to product servers across a WAN. The accepted method to do so here is with Bitvise Tunnelier, mapping specific ports on localhost to the SQL Server server's IP address. This works ...
1
vote
1answer
38 views

HierarchyID: Get all descendants for a list of parents

I have a list of parent ids like this 100, 110, 120, 130 which is dynamic and can change. I want to get all descendants for specified parents in a single set. To get children for a single parent I ...
2
votes
2answers
3k views

Linked servers: Transaction context in use by another session

I'm using linked servers to perform some queries in a distributed transaction. It doesn't work in a distributed transaction. I get the following error: Transaction context in use by another ...
0
votes
1answer
428 views

multi-master to single-slave replication at table level with PostgreSQL or MySQL

Here is my scenario Master1 hosting DB1 Master2 hosting DB2 ... MasterN hosting DBN replicate to: Slave1 hosting DB1,DB2... DBN I've read similar questions and they recommend to start different ...
0
votes
0answers
10 views

sqlplus: ORA-01017 logon denied from one host but OK from another [duplicate]

I have a strange behavior for remote sqlplus login to Oracle 11.2 that I cannot explain: 1) I have an Oracle 11.2 server running on a virtual host, say host1 2) I set up another VM, say host2 (CentOS ...
6
votes
3answers
3k views

Performance Hit using CAST() in TSQL (SQL Server)?

We have a SQL generator that emits SQL conditional statements generically for specified fields (which for the sake of discussion: we will label as myField). So, if myField is of type NVARCHAR, we ...
0
votes
1answer
523 views

What's a good way to model user authorization to hierarchical data?

I'm wanting to implement something that's basically an ACL in SQL Server (2008, we'll be moving to 2012). We're working with farm production information. We will have users who need to be authorized ...
12
votes
1answer
7k views

Create index if it does not exist

I am working on a function that allows me to add an index if it does not exist. I am running into the problem that I cannot get a list of indexes to compare to. Any thoughts? This is a similar issue ...
1
vote
1answer
26 views

sqlplus: ORA-01017 logon denied from one host but OK from another

I have a strange behavior for remote sqlplus login to Oracle 11.2 that I cannot explain: 1) I have an Oracle 11.2 server running on a virtual host, say host1 2) I set up another VM, say host2 (CentOS ...
0
votes
1answer
8 views

Mysql closing immediately after new installation

I am using mysql as an backend for my webapp ,the software ran without any glitch but today it gave unexpectedly ERROR:2003 i tried many solution on the internet but none worked. so reinstalled the ...
0
votes
2answers
56 views

DB Design Payments Table

I'm working on a Desktop application that uses a DB to store information i.e (customers, houses, proprietors, payments). So the application must accept payments from customers to company, company to ...
0
votes
0answers
22 views

Postgres Order By [on hold]

I am attempting to run a Query to sort by one of our columns study.version. However every time I run this query, I get hit with a syntax error and can't seem to find out why this would be wrong: ...
1
vote
1answer
329 views

SQL Server 2008 R2 Database Diagram Error Code

I have sysadmin privileges on a SQL Server 2008 R2 server. I'm working with the development database and want to save a database diagram I created. When I try to save I get the following error ...
0
votes
0answers
13 views

Can we use mysql database for crore of data available in tables? Which database is better to use for huge data and more number of joins are used? [on hold]

Kindly give answer with explanation? I used mysql database for 2 crores of data present in mysql table. And my application needs more analysis on this data with join queries and string matches. How ...
0
votes
0answers
8 views

Restrict users from modifying datasources in SSRS

We had a situation lately when a particular user of the SSRS reports modified the datasources defined on the reporting server. These users have access rights to create ad-hoc reports using ...
0
votes
4answers
4k views

MySQL - Connection blocked because of many connection errors - How to find root cause?

I am developing a web application and am running into the dreaded host xxx blocked because of many connection errors message. There have been numerous questions on SO pertaining to this error and ...
0
votes
0answers
5 views

Problem with SSIS Variable Expression containing getDate()

Brief Architecture My SSIS package is generating dynamic excel files through Data flow. The file name format is "XYZ_Year_Month_Day_Hour_Minutes.xlsx". So I am using variable with expression which ...
0
votes
0answers
4 views

Postgres-9.1 having more Idle connections

The connections were created 2 days before. Can I kill the process manually by using the below query? select pg_terminate_backend(procpid) from pg_stat_activity where datname = 'mydb' and procpid ...
-1
votes
0answers
49 views

TempDb Growing Big on Staging sql server 2005 [duplicate]

I have a concern regarding Tempdb growth on one of my staging servers. Current size of Tempdb has grown to nearly 42 GB in size. Per standards we have split the data file into a primary .mdf and 7 ...

15 30 50 per page