[how to] MySQL 5.6 DESTDIR not work propely |
- MySQL 5.6 DESTDIR not work propely
- Increased server load after InnoDB deadlock
- Re-mount EBS vol on EC2 instance [migrated]
- Creating mongo 3 node replica set on ec2 problems
- how to create back up in mysql by writing stored procedure in workbench? [on hold]
- Creating a Table with parent_id from a flat table
- Updating a table efficiently using JOIN
- Restore database - maintenance plan task
- How to get rid of "maximum user connections" error ?
- How can I "shift" certain column values to different rows in an existing table?
- Expanding a dataset based on a weight field
- Scaling beyond 16 concurrent connetions
- Cannot Connect Using SSMS to Local SQL Server 2008 R2
- Creating and tuning a materialized view in oracle for use by Cognos BI
- SQL Server: subscriber as publisher and hierarchical replication
- Cannot see Green Button with white arrow in object explorer; DTC config problems?
- MySQL failover - Master to Master Replication
- sql server-percentage calculation
- multi-master to single-slave replication at table level with PostgreSQL or MySQL
- Invalid File Name on login to SQLPLUS
- SQL Server account delegation setup
- Trouble setting up Nagios to monitor Oracle services
- Help with SELECT queries
- Can I use a foreign key index as a shortcut to getting a row count in an INNODB table?
- Query tuning help needed (Hash Match and Table Scans)
- Pattern matching with LIKE, SIMILAR TO or regular expressions in PostgreSQL
- Figuring out database timezone
MySQL 5.6 DESTDIR not work propely Posted: 27 Jul 2013 09:12 PM PDT I'm try compiling MySQL 5.6 from source in Ubuntu 12.04 x64. But when I execute MySQL is installed in What's wrong? Sorry for my english |
Increased server load after InnoDB deadlock Posted: 27 Jul 2013 02:38 PM PDT I am using InnoDB instead of MyISAM for a couple of months right now, and it has really optimized my game database-wise. I was aware of the danger of deadlocks, but hadn't had any problems with it, until about a week ago. I've had a deadlock because two cronjobs were clashing with each other, I believe. Anyway, we've got that fixed by killing both queries and running the cronjobs after each other manually. All seemed good, except for the fact that the server load is peeking a lot since then (about every 5 minutes) which I don't really know why. I've checked the running queries at those moments and they seem fine. Do you have any tips where to look on how to fix this? Couldn't find too many information about this on the internet. Thanks in advance. |
Re-mount EBS vol on EC2 instance [migrated] Posted: 27 Jul 2013 12:59 PM PDT I am new to sysadmin. I am trying to launch a EBS-backed EC2 instance. I did following based on mongodb docs: Now I terminated EC2 instance and trying to re-mount the EBS-vols to newly launched instance. What I was not sure,
On the new EC2 instace, I tried to execute following cmd but then aborted due to warning. I was not sure After going thru warning/errors while executing, I skipped following steps and re-mounted but all the data in EBS vol is lost. If somebody could verify..that would be great help. |
Creating mongo 3 node replica set on ec2 problems Posted: 27 Jul 2013 05:52 PM PDT I'm trying to create a 3 node cluster of mongo replicas on ec2 instances, with internal ips 10.168.xxx.xxx, 10.166.xxx.xxx and 10.188.xxx.xxx, my config file is: I launched I also tried: .log file: UPDATE: added output of rs.initiate() & logs; |
how to create back up in mysql by writing stored procedure in workbench? [on hold] Posted: 27 Jul 2013 06:37 AM PDT i want to create backup on the button click of windows form app by calling a stored procedure of my database. but how to write such stored procedure i don't know in case of MySQL but i have done it before in MSSQL. |
Creating a Table with parent_id from a flat table Posted: 27 Jul 2013 07:29 AM PDT i have a problem concerning MySQL, and i cannot find a solution to it i have a flat table (id, city, county, state), example (1,'Beckingen', 'Merzig-Wadern', 'Saarland') a city belongs to a county a county belongs to a state. first, my attempt was to divide the data into 3 tables cities, counties, and states and to build up the associations via linking tables (cities_counties...) but now i want to create a 'locations' table out of it, where county is parent of city, and state is parent of county. locations: (id, name, parent_id, type) (type is 'city','county', or 'state') What would be best practice to create the adjacent list from the flat list ? i'm working in a LAMP environment, just in case that a php script would fit .. Thanks alot Adrian |
Updating a table efficiently using JOIN Posted: 27 Jul 2013 06:17 PM PDT I have a table that has the details of households and another that has the details of all the persons associated with the households. For the household table I have a primary key defined using two columns in it - Using the sorting dictated by the clustered indexing on primary keys, I have generated a unique ID for each household Now, my next step is to associate each person with the corresponding households ie; map a I have a total of 1928783 household records and 5239842 person records. The execution time is currently very high. Now, my questions:
I have uploaded the execution plan generated by SQL Server 2008 for the whole script to SQLPerformance.com |
Restore database - maintenance plan task Posted: 27 Jul 2013 09:32 AM PDT I need to schedule a task that restores a database once a week from a backup. I have setup maintenance plans for backing up databases (Management > Maintenance Plans) but cannot find out how to make a restore task - does this need to be an Execute T-SQL Statement Task, or is there a Toolbox item for it? |
How to get rid of "maximum user connections" error ? Posted: 27 Jul 2013 01:52 PM PDT I am using MySQLi for my webapp but whenever I want to visit some particular page, I get I tried already to close all connections but this does not improve the situation. Is there a way to know exactly what connections are open at any particular moment or any other useful data that can help me resolve this issue ? BTW, I'm using PHP 5.2.17 and MySQL 5.1. |
How can I "shift" certain column values to different rows in an existing table? Posted: 27 Jul 2013 05:46 AM PDT I'm implementing a queue as a ring buffer in a table along the lines of what Thomas Kejser talks about here: Implementing Message Queues in Relational Databases If the ring buffer fills up, I have to increase the number of slots and possibly shift some of the values around. This is part of my routine to add slots to the ring buffer I have a table that looks like this: I would like to "shift" the values from slots 3 and 4 forward by 4 slots to rows 7 and 8 so the table would look like this: I tried two different UPDATE queries to shift the rows forward and then clear the previous rows. The first query (as reproduced below) doesn't update any rows in my table and I'm drawing a blank on what I must have left out: |
Expanding a dataset based on a weight field Posted: 27 Jul 2013 12:50 PM PDT I have a table that contains records in an un-expanded form. Each record has an associated integer weight that essentially informs us how many times the record should be replicated in order to get the true population. Say, I have 3 records in my table. Once expanded, the dataset will be like this (note - I removed the I have tried to do this using cursors but it is taking a really long time to execute. Is there a clever way to do this really fast? Any predefined T-SQL stored procedure that achieves this? Update |
Scaling beyond 16 concurrent connetions Posted: 27 Jul 2013 06:30 AM PDT I've just adopted a Postgres 9.0 database running on RHEL 6.1 on a rather beefy 256 core, 2TB system with ok drive (Hardware RAID 50). I've started benchmarking the system using pgbench so I can get an idea of what this thing can do. The application spends most of its time reading data, so I used the simple 'select' bgbench tests with the following parameters against a data set initialized with a scaling factor of 300: I recorded the TPS reported from pgbench using n+8 (n = 0 to 16) clients for 16 samples. I produced the following chart from the results: My question is, why the peak at 16 concurrent connections? I ran pgbench from the same host and looked at IO, memory, CPU utilization, all the usual suspects and found nothing that stood out as being a cause. For postgresql.conf I have the following settings: %iowait is ~3.8% w/ 16 connections, 8.2% w/ 32, and 8.9% w/ 48. I recently saw that PG 9.2 has a new 'feature' (http://www.postgresql.org/about/featurematrix/detail/218/) labeled as 'Multi-core scalability for read-only workloads' but this seems like a red herring. I can't help but think it a configuration issue. TIA. |
Cannot Connect Using SSMS to Local SQL Server 2008 R2 Posted: 27 Jul 2013 06:26 AM PDT About six months ago my vendor installed SQL Server 2008 R2 into a clustered pair of servers, DB01 and DB02. I've been logging on, periodically, to DB01 to audit some of the data contained in the database instance. I've been using SSMS the whole time, and for six months there have been no problems. Suddenly yesterday, I am unable to connect using SSMS. I get the following error:
This is very confusing. Very little has changed since the last time I've logged in to SSMS. TCP/IP is enabled on SQL Server, as are named pipes. One thing I know has changed is that for the CLIENT machines that hit it, the TcpTimedWaitDelay parameter has been set to 30, and the MaxUserPort has been set to 10000. But that's on the client machines only. Could there be an issue arising from from these parameters not being mirrored on the database servers? Could there be an issue arising from these two boxes sharing an IP for the clustering? The database is normally accessed through a shared IP, where DB02 takes the IP if DB01 fails. I've considered restarting the SQL Server service but that scares the bejeezus out of me. What if this issue spreads to the application currently using the databases? |
Creating and tuning a materialized view in oracle for use by Cognos BI Posted: 27 Jul 2013 05:43 AM PDT I am currently in the middle of a Cognos BI implementation and am having difficulty in tuning a view in order for SQL Server to The source code for this scenario can be accessed via the following URL: https://github.com/pwl91/source_code I would like to create a materialized view that will use I know that this will not be 100% correct (maybe not even 50%) but I would really appreciate some assistance. Please ask if you require any further information |
SQL Server: subscriber as publisher and hierarchical replication Posted: 27 Jul 2013 03:43 PM PDT In Oracle Streams one way replication from one DB to another is a basic block for many replication topologies (N-way, hierarchical, combined and so on), and changes could be captured and applied for the same table at the same time. But I can't find anywhere in SQL Server documentation whether table (article) could be a source (publisher) and destination (subscriber) simultaneously. Is it possible, for example, to setup bidirectional replication using two pairs of publisher->subscriber transactional replication? Naturally I am more interested in multi-level hierarchy: for example one table is replicated from root node through intermediate nodes to leaves, second one - from leaves to root, and third one - bidirectionally, and for all tables intermediate nodes could perform DMLs to be replicated too. With Oracle Streams it is easy to achieve, and even more sophisticated configurations are possible, but are they with SQL Server? UPDATE: It seems it is with use of merge replication and republishing (http://msdn.microsoft.com/en-us/library/ms152553.aspx), but what about transactional replication? |
Cannot see Green Button with white arrow in object explorer; DTC config problems? Posted: 27 Jul 2013 12:43 PM PDT I have SQL Servers across locations setup for replication. One of the SQL Server instances that I installed, running locally I can see the green button with the white arrow in the object explorer when I connect to it. However, when I connect to it from any other location, I cannot see that or neither can I start or Stop the SQL Serer Agent; even though locally I am able to do that. Additionally, the MDTC doesn't has only 2 items sent both with were rejected, where as other servers have 100's committed and sent. Is there something wrong with the DTC settings? Please help. |
MySQL failover - Master to Master Replication Posted: 27 Jul 2013 04:43 PM PDT My company is trying to implement a MySQL failover mechanism, to achieve higher availability in our webservices tier - we commercialize a SaaS solution. To that end we have some low-end VMs scattered through different geographical locations, each containing a MySQL 5.5 server with several DBs, that for the time being are merely slave-replicating from the production server - the objective up until now was just checking the latency and general resilience of MySQL replication. The plan however is to add a Master-Master replication environment between two servers in two separate locations, and these two instances would handle all the DB writes. The idea wouldn't necessarily imply concurrency; rather the intention is having a single one of the instances handling the writes, and upon a downtime situation using a DNS Failover service to direct the requests to the secondary server. After the primary comes back online, the b-log generated in the meantime in the secondary would be replicated back, and the DNS Failover restored the requests back to the first one. I am not an experienced administrator, so I'm asking for your own thoughts and experiences. How wrong is this train of thought? What can obviously go wrong? Are there any much better alternatives? Bash away! Thanks! |
sql server-percentage calculation Posted: 27 Jul 2013 04:32 PM PDT Sample data : This is my query: This is my sample data actually. I already make the count. As You can see the column header. My problem is I need to sum the count and the for each row I need to get the percentage. For example the total for the above record is 199 so for the first record count is 43 so the calculation should be 43/199 * 100. How can I view the percentage? Please help me I need this urgently. |
multi-master to single-slave replication at table level with PostgreSQL or MySQL Posted: 27 Jul 2013 11:43 AM PDT Here is my scenario I've read similar questions and they recommend to start different instances at Slave1 and simply do MasterN-Slave1(instanceN) replication, as instructed here: Single slave - multiple master MySQL replication That would be piece of cake, but running different instances might be a waste of resources. I really want to achieve this with an single DBMS instance at Slave1, and if possible with PostgreSQL; but can try with MySQL if there is a solution for this. Any help is appreciated. |
Invalid File Name on login to SQLPLUS Posted: 27 Jul 2013 09:43 AM PDT The moment I log into SQLPLUS I get an Any help would be greatly appreciated, thanks.
The issues are that any new scripts I create (that I know work) give a |
SQL Server account delegation setup Posted: 27 Jul 2013 10:43 AM PDT I am try to run bulk insert command on SQL Server 2008 but I am having issues with the security. after researching via internet, the problem has something to do with account delegation and impersonation. However all solutions seems to point to an Active Directory setup which my setup is not. My setup is SQL Server 2008 Express on Windows Server 2008 Standard configured as a workgroup. Despite a SQL Server user account, assigned all the user mappings and server roles and ensuring security set to SQL, I am getting this error:
So, how does one setup SQL Server account delegation and impersonation on a workgroup environment? Thanks in advance |
Trouble setting up Nagios to monitor Oracle services Posted: 27 Jul 2013 02:43 PM PDT I've got an install of Nagios XI that doesn't seem to want to talk to any of my Oracle services here. I've pulled out the monitoring command and am running it manually, after setting I'm still fairly new to Oracle, but my googlings seem to indicate that As a note, there are multiple instances of oracle sharing the target box, but each seems to be intalled to separate partitions and are running their own listeners or various ports. |
Posted: 27 Jul 2013 03:41 PM PDT I need help with some queries. I struggled do find out how to do it, but I think I finally caught on or at least got the results I was looking for in the database. These are the tables (given by my professor): Here are the problem statements and the solutions I have come up with:
|
Can I use a foreign key index as a shortcut to getting a row count in an INNODB table? Posted: 27 Jul 2013 05:43 PM PDT I have a table that has a large number of rows in it. The primary key (an auto-incrementing integer) is, by default, indexed. While waiting for a row count to be returned I did an Since the primary key is guaranteed to be unique, can I just take the number of rows from the BTW, I believe the difference in numbers is due to the fact that more data is continually being added to this table. |
Query tuning help needed (Hash Match and Table Scans) Posted: 27 Jul 2013 03:46 PM PDT I need help optimizing the following query (returning ~8k rows): These tables are on the DataStage and I am not allowed to use indexes. Total rowcounts are: cmdb_ci_appl: ~20k; cmdb_rel_ci: ~1200k; cmdb_ci: ~800k The following image shows a section of the execution plan (I can upload the sqlplan file if needed but there's not much else to see): Any help is appreciated. |
Pattern matching with LIKE, SIMILAR TO or regular expressions in PostgreSQL Posted: 27 Jul 2013 07:07 PM PDT I had to write a simple query where I go looking for people's name that start with a B or a D : I was wondering if there is a way to rewrite this to become more performant. So I can avoid |
Figuring out database timezone Posted: 27 Jul 2013 01:27 PM PDT Does anybody know of a way to alter a time zone on a SQL database? Is there any tool that could find the objects using the date and time? |
You are subscribed to email updates from Recent Questions - Database Administrators Stack Exchange To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment