0
votes
1answer
29 views

MySQL keeps crashing

I've restored my vserver from a backup which was created by my host. After that my MySQL server is not starting anymore. I've tried several ways to recovery my tables, but it's still not working. ...
0
votes
0answers
17 views

How to split task (read and write) between two mysql server via HAproxy load balancing?

I have done some test and setup two (A and B) different database server from the following link - https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-mysql-load-balancing--3 ...
4
votes
1answer
62 views

How to determine if insert or update

Whenever INSERT is happened in the CUSTOMER table,I need to call the "StoredProcedure1"and UPDATE is happend in the CUSTOMER table,I need to call the "StoredProcedure2" in the Trigger. How to ...
1
vote
1answer
20 views

different log file for master and beta mysql

Hi i am facing a problem while shipping my database log I have three database server dev, beta and master and i maintain log files for dev on github and every log file has a version given to it like ...
1
vote
1answer
27 views

Replicating a postgres database for testing

I want to replicate a live server postgres database to our dev server for testing purposes but the problem is in inbuilt postgres replication feature the slave is always read only. Is there any better ...
0
votes
0answers
12 views

pgAgent does not run

I referred this to set up a scheduled job and did everything as it mentioned(ran the pgagent.sql as well) I need a very simple task to run periodically. In the 'Definition' tab in the steps, few ...
0
votes
1answer
16 views

How to connect to Oracle database on VM1 from host with 11gClient

I have a VM running Oracle Linux 6.5, I loaded Oracle server x64bit and created a database. The database functions fine and the listener is up and running for the database. I want to connect to the ...
1
vote
1answer
10 views

Proxy authentication for PostgeSQL

The following seems likely to be a fairly common situation, but I haven't seen any solutions. I have a PostgreSQL database containing views that are specific to the $user, in order to restrict data ...
2
votes
5answers
120 views

Transferring large amount (84 million rows) of data efficiently

I have about 84 millions rows. Of those all of them needs to be transferred to a separate database on the same server, then I delete to delete about 60 millions rows from the source database. The 84 ...
-1
votes
0answers
24 views

Get records that have associations in other tables [on hold]

I have multiple tables such as dataset_tb, dataset_tag_tb, user_dataset_access_tb. I need to get datasets that have a specific dataset_type value in dataset_tb, in which there exists a record in ...
0
votes
2answers
17 views

Set of datetime versioned rows, how to build the most up to date row

I created this SQL fiddle with the sample data The sample data is this: -- -- Table structure for table `dogs` -- CREATE TABLE IF NOT EXISTS `dogs` ( `version_stamp` datetime NOT NULL, ...
1
vote
1answer
18 views

Composite primary key from multiple tables / multiple foreign keys

I want to build a composite primary key made up of foreign keys from two different tables. I'm still pretty green to this... A great answer was given to building a composite key from multiple foreign ...
0
votes
1answer
14 views

updatable entities in the design of databases

I have a question on Entity Relationship design. It is a shop where products are kept in stock first and then go to the store. When the store has less than a certain amount of product, products that ...
0
votes
1answer
10 views

Schema for a reservation system

I'm working on a reservation system schema and have some problems defining availability of resources. I searched for similar question here and on Google but still don't have clear understanding My ...
4
votes
1answer
103 views

Order by bug on SQL Server 2005 vs SQL Server 2012

I have a query generated by entity framework that returns wrong results on a SQL Server 2005 db (Microsoft SQL Server 2005 - 9.00.5000.00 (X64)) but good on SQL Server 2012 (Microsoft SQL Server 2012 ...
0
votes
0answers
9 views

Oracle 11g, MySQL 5.5, SQL Server 2008 [on hold]

In Oracle 11g, MySQL 5.5, SQL Server 2008 What is the Domain for a DateTime attribute? Is it the same for all of these databases?
2
votes
0answers
25 views

Identifying if spid on SQL Server is in rollback after low disk space

On a test box I wanted to get an idea of how long adding an identity field would take to a table with roughly a half billion rows. The process ran for about 10 hours and we noticed it was getting ...
2
votes
1answer
40 views

Detached database file permissions

I have a script that detaches databases for archival when they meet certain criteria. The script is executed by SSIS under the local Administrator account by the Ghost of DBA Past. Per design it (by ...
0
votes
1answer
16 views

Possible to CREATE EVENT NOTIFICATION with a different owner?

We are in the process of removing a previous dba login and he owns all the endpoints and event notification objects. Endpoints were easy to change; Event notification objects not so much. I found ...
0
votes
1answer
48 views

SSIS Get max value in column and create new column?

I'm importing two data sources. The problem is that one data source has a date, the other does not. Everything in the data flow has the same date and is inserted as one transaction into the same ...
1
vote
1answer
25 views

How to export mysql databases with different ENGINE?

I'm setting up MySQL Cluster. As it uses ENGINE=NDBCLUSTER, how could I export my databases from MySQL Server specifying the ENGINE? Is there a way to do this? All my tables are MYISAM
4
votes
4answers
286 views

How does SQL Server determine precision / scale?

I'm running SQL Server 2012 SELECT 0.15 * 30 / 360, 0.15 / 360 * 30 Results: 0.012500, 0.012480 This one is even mor confusing to me: DECLARE @N INT = 360 DECLARE @I ...
1
vote
1answer
29 views

want to find out which databases are used in last 30 days or not

I have about 120 databases in my SQL. I want to migrate so I want to know which databases are not used in last 30 days.
2
votes
0answers
48 views

SQL Server not starting at Windows startup but starts manually

My SQL Server instance's (SQL Server 2008 R2 Express) service has Startup Type = Automatic. The past couple of times I've restarted my computer the service has failed to start on its own, but it ...
0
votes
2answers
46 views

Best Way to Migrate 100 tables To New Database

I need to migrate 100 out of 150 tables (data and structure) and everything else (sprocs, views etc.) to a new empty SQL Server database. I have been using the Import/Export wizard and it has been ...
5
votes
1answer
55 views

Should an INSERT cause an exclusive lock on a foreign key?

I'm working on a deadlock issue. Process A is doing a simple INSERT into TableA which has a FK to TableB Process B is doing a complicated SELECT on a join that includes TableA and TableB I'll ...
-1
votes
0answers
18 views

SQL: How to optimize a 82+GB MyISAM Database? [on hold]

I have a MyISAM DB with some content (users and admins account and thematic content). All query from PHP to my DB with mysql_ library (not mysqli!) have a mid process time 8-12 seconds, if online of ...
0
votes
0answers
18 views

Mysql : too many columns performance [duplicate]

i have a table with 1500 column in my database , my server Ram is 16 and i have 8 cpu , but mysql using 100% of this cpu ,as i traced and checked the slow query logs,i see this problem related to this ...
0
votes
1answer
34 views

Need to Unzip, Unencrypt, and restore a SQL Server DB [on hold]

We need a tool or script that is configurable, and can unzip, decrypt, and restore a SQL Server 2008 DB on a Windows Server 2008 R2 server. Whether script, batch, or app, it needs to be configurable ...
0
votes
1answer
28 views

Count SQL Query

Hi all i'm just wondering if anyone could suggest the easiest way to write this query. The problem with writing the subquery HomePageHits this way is that is bring the same records for the Hits and ...
0
votes
1answer
17 views

How the xlogs files travels form Master to Slave

I have some doubts about how the workflow proccess in PostgreSQL replication using archiving logs. If I have this configuration in Master postgresql.conf: archive_command = 'test ! -f ...
2
votes
1answer
31 views

What is the best storing device for DB transaction log?

I'm using MySQL with InnoDB storing engine. Transactional log is placed to dedicated HDD. Still as it is HDD atopsar shows big load (>50%) to this HDD because of big amount of small IOs (about 50 ...
0
votes
2answers
26 views

for archive_command use an script rather than a command

I want to create a configuration to get a PostgreSQL HA. In my Master I want to configure a postgresql.conf file with this: archive_command = 'local_backup_script.sh "%p" "%f"' instead of: ...
1
vote
1answer
10 views

Speed Up Index Creation in MySQL

In MySQL 5.5, I have a table which is recreated on a daily basis and for which the process of adding an index is taking about 50 minutes which I'm hoping to reduce. At the time when the index is ...
0
votes
1answer
25 views

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

I can't connect to mysql, through my Ubuntu machine. I get this error. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) I've tried many ...
1
vote
1answer
39 views

Searching for array elements nested in MongoDB Documents

I need to store card documents in my database. Cards need to be stored with a set of integers that represent the bundle, box and pallet, or whatever other entity they belong to. The packaging ...
1
vote
1answer
51 views

Reading a SQL Server Execution plan

I am very new to any type of tuning but have been learning more.. One of my specific databases one of the problems identified with slow queries are a number of Implicit conversions. It is my ...
18
votes
3answers
595 views

Are RANK() and DENSE_RANK() deterministic or non-deterministic?

According to official Microsoft BOL DENSE_RANK is nondeterministic (RANK()). But according to Ranking Functions by Itzik Ben-Gan "... the RANK() and DENSE_RANK() functions are always deterministic". ...
0
votes
1answer
7 views

When do I have to use archive_command and when not

I have some doubts about PostgreSQL replication command. I am doing some research and I found severals configurations. first one is: archive_mode = on archive_command = 'cd .' second one is : cp ...
0
votes
0answers
7 views

MySQL Replication problem with VIEWS and “Sub-Databases”

I've got three servers that should do a master-master replication. On server 1 i got "01_maindb" which holds the master tables. I replicate this table to the two other servers without problems. ...
0
votes
0answers
30 views

Why Sub query needed in SQL [closed]

WHAT IS NEED OF SUB QUERY. Instead of that we may use Joins. Give with example. Thanks in advance
1
vote
1answer
35 views

Whats wrong with my index?

I have a table, here is the structure: CREATE TABLE `table_data_cache` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `date` date DEFAULT NULL, `enterTollgateNumber` bigint(20) DEFAULT NULL, ...
0
votes
0answers
23 views

Accessing values of dymanic cloumn

I have a table which has 16 fields whose of alternate name to city. Below is my table structure: CREATE TABLE CITY_DATA_TO_CHK ( COUNTRY_CODE VARCHAR2 (100), REGION ...
1
vote
1answer
125 views

How to reclaim the unused Space in a database

The database is almost of size 55GB. This database should have never grown to this size as some of the maintenance jobs were not running. I have deleted almost 30GB of data. Now the database size is ...
1
vote
1answer
45 views

Still i am not satisfying with Logfile Shrinking in SQL Server? [duplicate]

Already i asked this question but still i'm not getting the very clear answer. In my server holds more than 20 live databases in that my logfile(.ldf) is use to grow more than 5 GB per day. Using the ...
1
vote
1answer
14 views

Does pg-pool-II support two phase commit?

When pg-pool II is used with sharding, what happens if I want to do a transaction which involves two nodes ? Does pgpool support two phase commit ?
4
votes
1answer
83 views

How can “HierarchyID” type work when “CLR” is disabled?

The following statement sp_configure 'clr enabled' returns: name minimum maximum config_value run_value clr enabled 0 1 0 0 I assume this means there are no CLR ...
0
votes
0answers
10 views

period causes results to not display

I have, as an example, the following in a mysql database table: (28,'man vs. wild','discovery',1) Info on my db: mysql 5.5.37 InnoDB utf8_unicode_ci fulltext When I do a search such as this, I ...
2
votes
1answer
65 views

Optimized table design

I am building an advertisements system for websites ( a plugin for a framework ). I am not quite sure how I should set up the table in terms of indexes. Basically there are two options for billing - ...
0
votes
0answers
42 views

Splitting of database in SQL Server [on hold]

One of our clients has a database larger than 3 GB and is facing performance problems. Sometimes applications will not only open because of heavy data load. How can I overcome this problem? If I ...

15 30 50 per page