-1
votes
1answer
281 views

Selecting the right data type for text

In my database, I have columns that should contain text pieces. What is the best data type used for texts in SQL? How can I show that text as a numbered or bullet list? Can I search for a certain ...
1
vote
2answers
13k views

Foreign Key Constraint fails

I have the following tables: // Base Scans CREATE TABLE `basescans` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NULL DEFAULT NULL, `status_id` INT(10) UNSIGNED ...
1
vote
4answers
771 views

database sharding on mysql

I need to do database sharding(horizontal) based on MySQL. My database schema is as following: I have tables A,B,C A,B is Global(which need not to be sharding) C have huge data so it need to be ...
1
vote
1answer
419 views

Best structure for user-level versioning of data in mysql

I have an application I'm building that allows users to upload data files and I read the contents of the data file into a database. All the data files have the same fields, but there may be slight ...
2
votes
0answers
1k views

Why is SSMS 2008 prompting me “if you are certain that you have added all the necessary full-text catalogs, click OK”

When I try to attach a database in SQL Server Management Studio 2008 (SSMS), I get prompted by this message: If you are certain that you have added all the necessary full-text catalogs, click OK. ...
3
votes
9answers
2k views

Is there any way to run the definition of multiple stored procedure at a time?

I have created the definition of more than 200 stored procedures. My problem is that I have to execute them on a different server and on a different database. The process which I am following is that ...
2
votes
2answers
453 views

Implementation Idea for login structure (login id with two different tables)

I am creating a sample web application for a business and I am stuck at the login implementation. There is supposed to be two different users (login types?). I will have employees and customers. I ...
-2
votes
1answer
1k views

How to run 2 separate sql server engines on the same server?

I have a Windows server, and on this server there are many websites running and most of them connect to the installed SQL Server, some of them connect to SQL Server Express and some to local. My ...
6
votes
2answers
5k views

How do I query to pull all data in row based MIN and MAX service date?

I'm very new to Oracle SQL especially in the Pentaho report builder. It lets you do some things and block others. PL/SQL is not available so I must do this in a query. I need to be able to pull ...
5
votes
1answer
1k views

Do I need to index a key that I partition by?

I have an InnoDB table of customers, partitioned by KEY, with each partition being one US state. I have an index on phone number, and the performance is great. We also need to SELECT by last name in ...
7
votes
3answers
3k views

Separate archive tables or soft delete for inventory database

I'm building an inventory database that tracks computer equipment and other hardware devices. At some point in any device's life it is retired and gets archived. After it becomes archived it needs to ...
0
votes
1answer
97 views

get query from 4 tables

I have three tables: User (Table) - Email - Moblie - User_id Invoice_product (Table dbo.payware_factor_product ) - invoice_id - Product_id Invoice (Table dbo.payware_factor ) - User_id - Mobile - ...
1
vote
1answer
588 views

MYSQL MyISAM data recovery implementation

I am creating integration into eshop script, shop is using MyISAM tables and I need to implement something like transactions in InnoDB, what I actually need is full recovery of data after modifying or ...
5
votes
1answer
6k views

Export table without BLOB column

I have a big table with BLOB objects and some references from other tables to this one. I prepare dev and test schema for my app by making expdp (data pump) from production, then anonymizing data on ...
1
vote
2answers
3k views

help in multi-language medical database?

My project is to design a medical database for many countries. This database contains many parts: medicines, medical centers, patients, etc. for every country with its own language. I started my ...
2
votes
1answer
3k views

Can't start mongodb in ArchLinux

I have installed mongodb using sudo pacman -S mongodb in my 32-bit arch . At first I run this sudo mkdir -p /data/db to create /data/db ,and then run $ mongod ,then I got the following message : ...
2
votes
1answer
511 views

Move DTC from one node to another in Windows 2003 R2 Clustering

I have a Windows 2003 R2 two node cluster that is running MSDTC as part of the Cluster Group. Is it possible for me to change the current MSDTC owner without moving the entire Cluster Group to the ...
0
votes
3answers
1k views

SQL Server 2008 R2 Remote Connection issue

I have installed SQL Server 2008 R2 in mixed mode, but currently issue is I can't use SQL through ip nor ip with port, even I have enabled TCP/IP and open port in firewall too. I tried to telnet 127....
0
votes
1answer
412 views

Structuring SQLite database with 2 relationships?

I'm current working on a SQLite-database in a android project which will store 3 types of objects; feed, users and posts. There will be several feeds containing several varying users(a user can be ...
6
votes
1answer
1k views

Deadlock on Merge replication

I'm having a really confusing problem on the msmerge_contents table on some of my merge replication databases. It seems I'm receiving a dead lock on the exact same row on the same index on the table ...
10
votes
2answers
3k views

PostgreSQL Index Caching

I'm having difficulty finding 'lay' explanations of how indexes are cached in PostgreSQL, so I'd like a reality check on any or all of these assumptions: PostgreSQL indexes, like rows, live on disk ...
1
vote
1answer
976 views

How to create database, and add user linked to login?

created a login and a user in the master database and linked that user to the login. I created a new database, then went to that database and immediately tried to create a user linked to the same ...
0
votes
1answer
5k views

Split CLOB into multiple VARCHAR2

I currently am working with some data that is being stored as a CLOB between 4000 and 6000 characters. I would like to perform the TRANSLATE function on it but I learned that it's not possible with a ...
2
votes
2answers
80 views

How can I make this backup scheme more friendly for reporting?

Currently, we have around 50 remote servers, each with a production database. Each night, all 50 of these servers run a backup job and zips the backup. Each morning, a local server runs a job for each ...
4
votes
3answers
270 views

How does the T-SQL optimizer handle “and false”

In SQL SERVER 2008 I'm thinking about a query such as: SELECT ... FROM ... WHERE ... AND @a=1 UNION SELECT ... FROM ... WHERE ... AND @a=2 Given that @a is clearly the same value, and therefore ...
4
votes
2answers
974 views

Multicolumn extended statistiscs, NLS_SORT and NLS_COMP, CHAR columns, and the bane of my existance

This is as a result of this question. So I'm working with a query that looks like this: select count(*) from table1 where col1 = 123 and col2 = '1'; The problem is this: col2 is defined as a ...
4
votes
1answer
655 views

PostgreSQL psql command line tool and SET CONSTRAINTS DEFERRED

I am using PostgreSQL 9.1.5 and the psql to run a scipt containing a series of INSERT statements in various tables: psql -U usernamefoo databasenamefoo -f dml_script.sql The table constraints have ...
2
votes
1answer
354 views

MySQL: Show Unique key definition by name

I get the following error: ERROR 1062 (23000) at line 1901: Duplicate entry '3-3820-50-0' for key 'UNQ_CAT_CTGR_ENTT_DTIME_ENTT_TYPE_ID_ENTT_ID_ATTR_ID_STORE_ID' How can I find out which table ...
0
votes
1answer
150 views

myISAM data loss at DELETE / INSERT

I have a linked table id_group | id_user. Every time I add a one or more users to a group I DELETE all the links and INSERT the users again including the new one(s). This is how the framework of the ...
12
votes
1answer
3k views

Commit vs Fast Commit vs Commit Cleanout in Oracle Database

I was wondering whether someone could verify my understanding regarding the differences between those 3 terms as pertaining to Oracle Databases. Many sources confuse these terms and do not explain ...
7
votes
2answers
38k views

How can I get the actual data size per row in a SQL Server table?

I found this script sql-server-2005-reaching-table-row-size-limit that seems to return the row size per defined data type lengths. I need a script that would give me all the rows in a table that ...
2
votes
1answer
2k views

Collect performance information on high CPU condition in SQL Server

I have a SQL server cluster that is often reaching 100% CPU out of working hours. I want to gather some information to help troubleshooting when the actual condition is taking place. I'm thinking of ...
1
vote
2answers
54 views

Do I need an index on this?

I have a sql server db and have a question regarding foreign key indices. Here's a snippet from the db: In programme_affiliates, I have a computed field, this is always set to '2' in this instance....
3
votes
1answer
1k views

What should one do if the auto increment primary key exceeds the maximum?

I have a primary key for a table with the following structure, **Field** **Type** nid int(10)unsigned I know the maximum limit of int(10) is 4294967295. But What ...
2
votes
2answers
185 views

MySQL Server Config, Small Timeframe, Extreme Usage-Scenario

I want to configure a MySQL server for the following scenario. A large amount of users will need to sign up for a university course selecting individual "timeslots". The signup page will open at a ...
5
votes
3answers
158 views

How to join the updated result set of multiple servers

I have got 4 different servers and I want to get the free diskspace of all those in a single output. using xp_fixeddrives we will get the free space in each drive . Its not possible to get into all ...
3
votes
2answers
741 views

Help with a multi-language medical database

My project is to design a database for medicines in many countries. Medicines have various criteria like composition, price, manufacturer. Database will be multi-language; related to each country. ...
0
votes
1answer
2k views

Getting error when using Oracle imp command to import dmp file

I am importing a dmp file using the following command: imp user/pass file=file.dmp log=logfile.log full=y ignore=y destroy=y I get the following errors: . . importing table "...
2
votes
2answers
2k views

Select rows with repeat data within certain timeframe

As a follow-up question to my previous question on difficult row categorisation, I have another problem which I'm sure will be easily solvable. After this I plan on reading a good book or two on ...
7
votes
2answers
13k views

How can I configure MySQL Innodb to handle 1000s of inserts per hour?

I have a very high traffic website where it is possible that 1000s of new records are inserted every hour. This one error is crippling the site: PDOException: SQLSTATE[40001]: Serialization failure: ...
1
vote
1answer
852 views

ORDER BY on aggregate field on a closure table giving unexpected results

I am updating my companies product database and I'm looking into different ways to do design our faceted navigation "selector" tables. The idea of faceted navigation might look like this: It's ...
1
vote
2answers
70 views

How to change type from one owner to two different types of owners

I currently have (tables changed): User UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) UserRating UserID uniqueidentifier, ...
5
votes
1answer
306 views

Can We Perform an “Up-To-The-Minute Restore” After Taking Transaction Log Backups?

The Setup: Say we have a Database in Full Recovery Mode that does a nightly Database Backup, Transaction Log Backup, and Transaction Log Shrink. Now the Transaction Log grows so quickly during the ...
0
votes
1answer
778 views

Slow backup and extremely slow restores

I don't normally work with MySQL but with MS-SQL and am having issues restoring a dump backup of a 9 GB database. I converted it to MS-SQL and it takes a grand total of 4 minutes to restore but the ...
6
votes
4answers
442 views

How to troubleshoot orm queries interfering with other applications

Well, it's hypothetical scenario but what I'm trying to understand is the path to go from a post-morten log (say, an SQL Server Profiler trace) to identify the code on a ORM situation. To make it not ...
2
votes
1answer
3k views

MariaDB and XtraDB/InnoDB plugins

In my vps, I thought of switching from MySQL to MariaDB (using Monty's repository for Debian Squeeze). Copying over my.cnf from MySQL to MariaDB, I saw that the new config file (the one from the ...
1
vote
1answer
65 views

Supporting Multiple Oracle Clients

I have an application where the data repository is moving to Oracle 11g. This means we need the new Oracle 11g client on the application server to support the retrieval of their data. Is it ...
5
votes
4answers
3k views

SQL Server DB restore fails

I am trying to do a SQL Server database restore using this T-SQL code: ----Make Database to single user Mode ALTER DATABASE xyz SET SINGLE_USER WITH ROLLBACK IMMEDIATE ----Restore Database RESTORE ...
3
votes
2answers
713 views

Is the speed of a PostgreSQL SELECT adversely affected by too many indexes on the table?

I have read that when having a lot of indexes on a database It can seriously hurt the performance but in the PostgreSQL doc I can't find anything about it. I have a very big table with something like ...
4
votes
2answers
4k views

How to execute a query from psql without waiting for the result?

My query (to create a new table from existing table) takes a very long time. So I've set up a remote database in my office - more RAM there. I can connect to my database from home as usual with psql. ...

15 30 50 per page