2
votes
1answer
903 views

DB2 Server Table Space Locked

At work we keep receiving the following DataException seemingly at random when one of our processes tries to write/access a table for one of our clients: com.ibm.db.DataException: A database manager ...
3
votes
1answer
100 views

How can we achive the replica of databases for SQL Server?

I have been working in VB6 to VB.NET migration project.In VB6 project they have individual databases (access db .mdb) for every user now we made that to centralized database using SQL Server. In the ...
4
votes
2answers
3k views

PostgreSQL Sequential Scan instead of Index Scan Why?

Hi All I've got a problem with my PostgreSQL database query and wondering if anyone can help. In some scenarios my query seems to ignore the index that I've created which is used for joining the two ...
4
votes
2answers
14k views

“ORA-01950: no privileges on tablespace 'SYSTEM' ” : What error is it?

Earlier I created a user : SQL>create user suhail identified by password SQL>User created. SQL>Grant create session,create table to suhail; SQL>Grant Succeeded. but when I login as ...
4
votes
1answer
20k views

Oracle 11g listener fails with ORA-12514 and ORA-12505 errors

I run an instance of Oracle 11g locally on my development machine and can connect to the local instance directly via SqlPlus: c:\>sqlplus ace SQL*Plus: Release 11.2.0.2.0 Production on Mon Mar ...
2
votes
2answers
62 views

Best practice for database where the values can't change

Suppose I have a table Inspection with a field for Place (the location where the Inspection occurred). The field is a foreign key to a Place table, where each place has a Name, among other things. The ...
2
votes
2answers
943 views

Oracle 11g R2 - same query sometimes fast, sometimes slow

I have a simple update query on a table with about 100 rows in it: UPDATE RESULTS_DATA SET IMAGE_BLOB=:myBlob WHERE MEASUREMENT_INDEX=:mIndex AND BATCH_ID=:batchId AND SYSTEM_ID=:sysId ...
0
votes
1answer
161 views

Mysql Join with filters

I have two tables: MAINCOLOR and SUBCOLOR with the data as: MAINCOLOR : MAINID COLOR 1 RED 2 BLUE 3 GREEN SUBCOLOR: SUBID MAINID SUBCOLOR STATUS 1 1 PINK 0 2 1 ...
3
votes
3answers
592 views

What is the best way to store X509 certificate in PostgreSQL database?

I'm working on web authenticate system where users will digitally sign random tokens and this will be checked with X509 certificates stored on the server. Therefore I have to store several X509 ...
2
votes
1answer
314 views

SQL Merge Replication: Cannot resolve conflict

I have a SQL Merge Replication over HTTP (Replisapi.dll). I'm not very familiar with the internas of the replication conflict solving because it was always working so far. Now I have two conflicts in ...
1
vote
2answers
12k views

How to sync MySQL database between two servers

I need to sync a MySQL database between two servers. If a new record will be added in server A, then server B fetch new record. If a new record will be added in server B, then server A fetch new ...
0
votes
1answer
275 views

Postgresql Run 'Jobs' At Specific Times

I have a normal problem to anyone that can't trust on applications to do their 'work/ AKA be online' and needs a DB Stored Procedure to run every minute . Scenario : PostgreSQL 9.2 Need To Run A ...
0
votes
3answers
284 views

Mysql - How to Optimize Retrieval Time in a Table

I have query like this! which has 200 million Records in a single table.. I am using BTree Indexes in my table... mysql> select COUNT(DISTINCT id) from [tablename] where [columname] >=3; ...
0
votes
2answers
7k views

“ORA-01017: invalid username/password” : Why is that?

What is the difference between the two : SQLPLUS / AS SYSDBA and SQLPLUS Enter user-name: SYSDBA Enter password: If I use the first command I get connected and see the prompt SQL> but upon ...
1
vote
0answers
142 views

Most efficient way to sort data fields into SQL

I'm trying to decide on the most efficient way to sort various data values. Here's how the data arrives: Device X sends a text string "name=value&name2=value&name=value" On arrival that ...
1
vote
1answer
544 views

SQL Azure: Drop Constraint and Index

This may be a stupid question, but I'm not a DBA and just wanna make sure of what I'm doing before I make a mistake. Here is my question: When dropping Constraints, are their indexes dropped as well? ...
4
votes
3answers
4k views

How to model inheritance of two tables mysql

I have some tables where I store data and depending on the type of person (worker,civil) that did a job I want to store it a table 'event', now these guys rescue an animal (thereis a table animal). ...
2
votes
1answer
128 views

Physically migrate MySQL without a dump

A client ask me to migrate his MySQL DB: The server doesn't have free space and it also has a very big table that is broken, so I can't dump it. I can't REPAIR it because of lacking of free space. ...
3
votes
4answers
756 views

Stress Test to Saturate Memory for MySQL InnoDB

I'm investigating windows 32bit memory problems (the 2G limit) and am after a test which will max out MySQL's memory including InnoDB Buffer Pool, per connection memory and/or any other uses of ...
4
votes
2answers
3k views

How should I tune Postgresql for 20 GB of RAM?

I've been fortunate enough to have the use of a 20GB Linode instance running Ubuntu 64 bit. I want to try to optimize PostGres for this service, but I don't know what I should prioritize changing. I ...
5
votes
1answer
331 views

SQL availability groups log maintenance

I have a AG with 2 nodes in a site in sync mode and 1 offsite in async mode. I'm having trouble understanding how the logspace is maintained in this scenario. For instance, I'm taking log backups ...
1
vote
0answers
934 views

“Lost connection to MySQL server during query” error

I have MySQL 5.5.20 and this table: mysql> desc country; +----------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
1
vote
0answers
2k views

'Incorrect datetime value: for column 'last_login' at row 1'

i am getting below error: Last_SQL_Errno: 1292 Last_SQL_Error: Error 'Incorrect datetime value: '2013-03-10 02:00:00' for column 'last_login' at row 1' on query. Default database: 'platform'. ...
2
votes
1answer
179 views

How do I know if my database partitioning is done well? [closed]

I have a sneaking suspicion that the guy who wrote the partitioning functions at my place of work did a fairly poor job. For certain queries (maybe 20% of them) we see incredible performance boosts ...
5
votes
2answers
670 views

Finding stored procedures with missing indexes

How to scan for stored proc that need indexes to be created. Anyone have any idea? Basically we have stored procedures that run very slowly. I'm wondering if there is some kind of automated script ...
2
votes
3answers
777 views

Simple scenario needs to go from Unnormalized Data to 3NF - Review Please

NOTE: The Question has been updated. View Edit Revisions to view original question. The scenario. An animal charity that at the moment, track their establishment's costs via a spreadsheet like so: ...
2
votes
1answer
345 views

Storing multiple settings for multiple users in a SQL Server table

I'm using SQL Server 2012 to store the account settings for multiple accounts (each user account will have a set of settings). These settings could have any number of fields (has not been completely ...
1
vote
1answer
164 views

table design to track significant events associated with an item

An Orders table I'm dealing with at present in design phase has about 10 or more columns. Each OrderID in the Orders table will have certain significant events or milestones. The number of Orders ...
1
vote
1answer
146 views

I would like to query a range of criteria on multiple columns in MySQL

I have 3 columns in a mysql table. I'm using Innodb engine. I want to be able to search for some values on those columns and also anything close to those values. For example : We have 3 columns as ...
4
votes
1answer
2k views

mysql_connect() system error :111

I have 2 VPS. I would like to connect from the frist to the second's mysql db like this : $db = mysql_connect("94.xxx.xxx.xxx:222", "user", "pass"); I got this error: Warning: ...
2
votes
1answer
631 views

Fast paginated result, for various filter clauses

I have been working on obtaining a paginated result from a table in my database (11g). While I have a query that does work (ie, the result is correct) it does not perform as well as I'd like to and I ...
1
vote
1answer
2k views

What are some best monitoring tools available for mysql? [duplicate]

I have a setup a linux mysql server and would like to monitor it. I found percona plugins for nagios and cacti. Are there any other tools available?
0
votes
0answers
45 views

Email alerts and Server Side Tracing

This question is in regards to SQL 2005 and email alerts on long running queries. Does this sound like the best approach (with the least impact to the server) to receiving alerts to long running ...
1
vote
1answer
943 views

Permissions for a MySQL user which will monitor replication status?

I'd like to use a script to monitor the replication status of a MySQL database like in this bash script: https://gist.github.com/wesdeboer/1791632 I'd like to create a user which will only be used to ...
3
votes
1answer
1k views

Schema design: Use of association (aka: bridge/junction) table vs foreign key constraint with composite index containing a non-key field

This is an inventory database for IT assets. The models used are trimmed in order to focus on the problem at hand. Using SQL Server 2008. Thanks for taking the time to read and for any input you can ...
2
votes
4answers
4k views

Search every column in every table in Sybase Database

I'm been taxed with the task of creating an application that pulls data from our Micros Point of Sales system. The POS is using a Sybase database running on one of our servers. The database schema is ...
0
votes
1answer
31 views

Why isn't my includeThreadNamesAsStatementComment JDBC parameter working?

The JDBC API lists a includeThreadNamesAsStatementComment parameter that seems to indicate it will prefix all queries with the Java thread ID. I thought this would be useful in tying back DB activity ...
0
votes
4answers
250 views

Update Table A row if Table B row is changed

Is is anyhow possible to tell the database to execute a little script, if a row is changed in a table? Scenario: The database constantly monitoring Table B to see if rows are inserted, updated or ...
0
votes
2answers
392 views

How are DB locks tied to connections and sessions?

I've heard of page- and row-level locks, but never heard them used with regards to sessions and connections. Today, our (MySQL) DBA was talking about row locks and implied that their scope can be set ...
5
votes
1answer
411 views

Does large table variables fill up logs in tempdb?

I'm running into an issue with a DBA who claims that table variables reside in ldf of the tempdb and when large amount of data is loaded into the table variable, the tempdb's logs fill up. The DBA's ...
0
votes
1answer
84 views

Do I need tweak something for this MySQL setup?

I'm running a fairly popular website with the following stats and setup. stats: ~250,000 pageviews per day, rendering ~47 queries / second to MySQL setup: the MySQL instance is running alone on a ...
0
votes
1answer
326 views

UPPER Case issue postgreSQL when importing from text file

I have ruby and rails app, and I have cron task to download text file and import it to the database using \copy hotels FROM 'db/ActivePropertyList.txt' DELIMITER '|' There is a header field which ...
1
vote
1answer
232 views

Update field1.table1 based on compound join between table1 and table2 - Oracle

I want to run update statement on Oracle 11g, but it fails with the following error: SQL Error: ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery ...
1
vote
1answer
897 views

Creating indexes with t-sql scrips vs rebuild indexes in maintenance plan

I’m using SQL Server 2008 and I am running several (15) scripts each day to bulk insert to tables. Each script drops the table at the beginning. I create indexes in the scripts. Some of the scripts ...
1
vote
1answer
230 views

Moving site to amazon EC2 - better to have 1 large instance or 2 medium instances?

I currently have a website which is running on windows 2008 r2 standard along with sql 2012 express. All on the same box. The site gets around 700-900 visits a day,although that is slowly going up ...
0
votes
0answers
181 views

TimesTen performance as compared to 10g

I am new here, so please be nice... I have a question regarding TimesTen & Oracle. I have attempted an experiment with both pieces of software, and realize that the query speed on a table is ...
1
vote
0answers
237 views

Why would running DBCC FREEPROCCACHE result in different data being returned? [closed]

I experienced a situation where a query run directly in SSMS was giving a different result set than the same query run from code on a web server, using the same database. After spending a lot of time ...
3
votes
1answer
137 views

Delete a variable number of records by a chronological order

Our developers have been using a cursor within a stored procedure to delete old password history. The number of records to delete is being passed by variable. DECLARE hist_cursor CURSOR LOCAL FOR ...
1
vote
3answers
386 views

Complex query with multiple normalized fields

We have a fairly simple table structure, but with a LOT of fields per table (talking 40+). This data is initially produced in plain-text, user-readable tables, but then it is translated into ...
1
vote
0answers
54 views

Will Startup Procs Run Again After Database Recovery?

We have a number of stored procedures that run on startup via the sp_procoption startup: exec sp_procoption 'ProcName', 'startup, 'true' A customer's server started up with a very large database in ...

15 30 50 per page