2
votes
1answer
1k views

hstore for versioning fields in postgresql

I have a postgresql database that will hold about 50 tables, each of them having about 15 fields, it would have at least 300.000 rows on each table. In order to track the changes done on each field I ...
6
votes
5answers
12k views

PostgreSQL: The database cluster initialization failed

Both C:\PostgreSQL and C:\PostgreSQL\data have postgres user with full access and admin rights. I ran postgresql-9.1.2-1-windows.exe from postgres user as admin. Target C:\PostgreSQL Every way I ...
0
votes
1answer
59 views

Oracle: calling udf that modifies the data. How to do it right?

Say I have a function : create or replace function test_function return integer as PRAGMA AUTONOMOUS_TRANSACTION; t_test integer :=1; begin update test1 set id = id+1 ; // table test1 has, for ...
4
votes
1answer
320 views

Is there a way to make SQL Server's Database Tuning Advisor use more than one core?

I'm using SQL Server's Database Engine Tuning Advisor to generate recommendations for performance improvements on my database server. For the "consuming workload" step, it appears to use all ...
4
votes
1answer
1k views

SQL Server 2012 replication permissions with virtual user and agent credentials

For development/testing I set up replication in SQL Server 2012 RC0 (11.0.1750) using the default permissions on the agent, and I'm getting this error: Message: Access to the path 'C:\Program ...
19
votes
3answers
10k views

Configuring PostgreSQL for write performance

One of my PostgreSQL servers hosts several (1-3) databases which receive a constant stream of data. The data is not particularly structured, it amounts to the current time and a variety of observed ...
2
votes
2answers
2k views

SQL Server 2008R2 SP1 instance not available for adding features

I need to add fulltext capabilities to an existing SQL Server 2008R2 instance but the one I need to upgrade is not actually available. The combobox shows only the one selected, as in the picture. It ...
2
votes
1answer
401 views

Multiple values in lookup fields

I know newer versions of MS Access allow multiple selections in lookup fields. For example, if I'm collecting information on my students, I can have a field called Race with lookup values that ...
3
votes
3answers
839 views

SQL Server 2008 R2 - Specify the Full Backup to use when doing a Differential Backup

When I backup my Database, I do a Full Backup every day who goes on a tape. I am trying to use the Sunday's Full backup to set up an additionnal Differential Backup, how can I do this? It only takes ...
0
votes
1answer
1k views

Can Microsoft Log Parser 2.2 open SQL LDF files?

From the technet article for Microsoft's Log Parser 2.2 it states that "Can't find an input format you need? The new COM input format makes it possible to create your own custom Input Format and ...
0
votes
1answer
447 views

SQL Server collation mismatch

I have database server with collation: SQL_Latin1_General_CP1_CI_AS I got database backup file which collation is: Latin1_General_CI_AS When I'm restoring this database and executing some SQL, I'm ...
21
votes
4answers
12k views

How should I design a relationship table for friendship?

If A is a friend of B, then should I store both values AB and BA, or one is enough? What are the advantages and disadvantages of both methods. Here is my observation: If I keep both then I have to ...
11
votes
2answers
4k views

SQL Server Frozen Ghost Cleanup workaround needed

I have several tables with amount of rows between 5M and 1.5G Each table has its BLOB field, which size varies from 100 bytes to 30 MBytes and which is stored as 'large value types out of row' = ON ...
3
votes
2answers
1k views

Errors after installing mysql

After installing mysql I get the following errors: > 120105 6:02:49 [Warning] Setting lower_case_table_names=2 because > file system for /usr/local/var/mysql/ is case insensitive mysqld: > ...
5
votes
1answer
1k views

Nested queries or temp (#) tables in SQL Server

I have written a web application which aggregates and presents data from a SQL Server. The data involved is large, and there is a lot of aggregation involved. Currently, under advice from an 'expert' ...
1
vote
1answer
92 views

Basic sql query problem [closed]

Here is the scenario: lets say I have a database named sqlprac that contains a table named dept. There are two ways to write a query: use sqlprac /*1*/ SELECT dept.deptno, dept.deptname, ...
1
vote
1answer
6k views

MySQL Replication Error

I am getting an Error on Slave as: could not execute Write_rows event on table mydatabasename.atable; Duplicate entry '174465' for key 'PRIMARY', Error_code: 1062; handler error ...
2
votes
4answers
17k views

How to create and send mail in SQL Server 2008?

I want to send E-mail from SQL Server 2008. What are the basic steps for that? Can you explain me if someone used this facility. Any help will appreciated. this link will helpful as commented by ...
8
votes
5answers
1k views

Inclusion of ORDER BY on query that returns no rows drastically affects performance

Given a simple three table join, query performance changes drastically when ORDER BY is included even with no rows returned. Actual problem scenario take 30 seconds to return zero rows but is instant ...
18
votes
7answers
7k views

Does a DBA need to know how to program in a system language besides SQL?

To what extent does a Database Administrator need to know system or application level programming languages (for example .NET or PHP) besides "just SQL"? For the purposes of this question, no ...
4
votes
1answer
1k views

How to UPDATE just one record in DB2?

In DB2, I need to do a SELECT FROM UPDATE, to put an update + select in a single transaction. But I need to make sure to update only one record per transaction. Familiar with the LIMIT clause from ...
4
votes
2answers
3k views

Microsoft SQL Server 2008 Memory

I am running MSSQL 2008 Enterprise and in the configuration of the server the Max memory amount is set to 2147483647 MB. My Question is, the server has 192 GB of ram,the number in the config can't be ...
6
votes
4answers
861 views

Four db servers all identical, one is much slower than the others

The setup We have an application loading a lot of transaction data for later querying. It's sharded on 4 SQL Server 2008R2 Enterprise Edition on Windows Server 2008 64 bits. All servers are ...
4
votes
2answers
2k views

Is there a way to ensure that a SQL Server trigger will be executed?

My supervisor is hesitant to use a trigger in a process because if there is a network interruption at just the right time, the process would not complete. Does SQL Server include the trigger in the ...
1
vote
3answers
5k views

Select Which Database Mail Profile is used in SQL Server 2008 R2

I am confused about Database mail profiles in SQL Server 2008 R2. When setting up severity notifications as well as "notify operator tasks" in maintenance plans, what determines what mail profile is ...
3
votes
1answer
944 views

fetching externally hosted db's table from within the local mysql server

Let's say we have a mysql database on localhost with table A and table B. Is it possible to fetch details from a 3rd party mysql server to which we have login info and which allows external access? ...
2
votes
1answer
6k views

Mysql Slave replication: Need to determine where replication left off to start slave in correct location

Idiotically I rebooted a machine that is used as a mysql slave without running STOP SLAVE, FLUSH TABLES first. I had thought mysql automatically handles all of this during a machine reboot, but ...
5
votes
3answers
6k views

Shrink database after drop table?

I had a table with 70+ Million records in a msSql database, I drooped that table to free up space on the disk. But it looks like the size didn't change much. but I do see that I could shrink the db ...
2
votes
4answers
777 views

Does a full transaction log cause a rollback?

Will a transaction that is trying to write something into the transaction log be rolled back if the transaction log is full?
3
votes
3answers
572 views

Why does 'sysfiles1' show up in the sys.objects catalog view in SQL Server 2008?

We were recently using this query to find tables in our database that didn't have clustered indexes and found that one of the results it reported back was the 'sys.sysfiles1' table. We're running SQL ...
2
votes
1answer
1k views

How to make it impossible for a postgres user to delete databases?

What yould be the sql statement (that the user postgres will execute) so it will be impossible for the postgres user user1 to delete (drop) databases? Or can I add a rule into some config file?
3
votes
2answers
281 views

How to check the pre-allocated database file of MongoDB is Used or not?

We have been using MongoDB for a few weeks. One thing we could not understood is Pre-allocated file. Is there any way to check whether the pre-allocated file is currently used by MongoDB or not? We ...
2
votes
1answer
2k views

Has somebody got a function that will extend hashbytes to strings of arbitrary length?

I want to apply it to procedure definitions. My basic idea is to split the string of type nvarchar(max) into chunks of nvachar(4000) and concatenate the results of HashBytes('MD5',chunk). I can't ...
5
votes
1answer
369 views

Replication of database used by two programs

I have a peer to peer transactional replication set between two identical databases, each one of the databases is being used by a different program on two different servers. Since we implemented the ...
5
votes
7answers
791 views

Database table and NULLs

I know that there have been many opinions/sides concerning NULL values in a database. I have not understood though what is the best practice for this. I.e. if I have a relational table with an ...
2
votes
2answers
500 views

get column from too many tables in mysql

.I have too many tables X1,X2,...Xn (they might exceed 75 tables) in Mysql DB to represent departments of a very large company. every table has structure something like this desc X1; ...
2
votes
1answer
2k views

Why is mysql logging to syslog?

I have installed Multiple MySQL instances and i have two configuration files one for each one is using default location of /etc/mysql/my.cnf. other server i have started like ...
7
votes
3answers
14k views

How to prevent transaction log getting full during index reorganize?

We have multiple machines where we have pre allocated the size of the transaction log to 50gb. The size of the table that I am trying to reorganize is 55 - 60 gb but is going to continuously increase. ...
0
votes
1answer
949 views

Database design : multiple category of users login into same system

In our new system we have three type of people Business owner Assistant of business owner Staff (a skilled employee) I am having following entity [Business] - include detail about business ...
5
votes
2answers
3k views

Most Efficient Way to Retrieve Date Ranges

What's the most efficient way to retrieve date ranges with a table structure like this? create table SomeDateTable ( id int identity(1, 1) not null, StartDate datetime not null, EndDate ...
1
vote
2answers
311 views

SQL Server database mirroring on different servers [closed]

I have two different Windows Sever 2008R2 instance located at different places such as db1 and db2. I need to make db2 as mirror server of db1 i.e. all the database on db1 will have a mirror copy on ...
3
votes
3answers
4k views

Can I specify a different disk for a specific MySQL table?

I use my home machine as my personal database for my hobby analytics project. This machine has an SSD for the main drive where MySQL stores its data. It also has a secondary hard drive that is ...
2
votes
1answer
540 views

Is it possible to automate the configuration of dataguard broker?

We deploy a number of oracle databases every year and a good percentage of them require a dataguard configuration. I've developed a script which is able to perform the database synchronization very ...
2
votes
1answer
903 views

Repartition Primary Key Index online in Oracle

I have an 24x7 OLTP (11gR2) application that endures heavy inserts on particular tables, traffic has increased to the point where we are getting heavy index contention. We use sequences for the ...
3
votes
2answers
1k views

How to select a subset of data from a large ER model?

I have a quite large ER model in my database and lots of data. Now I would like to take a subset of this data into a different database for testing purposes. The problem is how to get a subset from ...
9
votes
3answers
6k views

How to convert mysql to postgresql? [closed]

I am desperately looking for a conversion tool to convert a big mysql database to postgresql. I need the tool/script to be: Free Works under Linux Simple to use and not buggy You actually tried and ...
1
vote
1answer
628 views

Insert bulk Parent and Children rows using SQL Query

We receive bulk data from our customers in a spread sheet. I loaded them in a temporary table as of now. I tried to normalize the data and create a parent table and each parent to have 4 or 5 child ...
5
votes
3answers
2k views

What is a good way to verify that a restore completed successfully in SQL Server?

Right now, we test our SQL backups once a month by pulling the most recent backup file and restoring it onto a test database. If SQL Server says the restore is successful, we spot-check a few tables ...
5
votes
2answers
320 views

SQLAgentReaderRole and SQL AD ID login case affecting ability to edit jobs

I have AD ID users on a SQL 2008 server that can't edit their own jobs. They can create them, but in order to edit them, they have to delete them and then re-add them. The issue is explained here: ...
1
vote
2answers
519 views

Can I send a string over TCP using T-SQL?

I've set up some alerts, based on this article Now I would like the Job that is triggered by the alert to send some information to a c# application (this application, can be running in the same ...

15 30 50 per page