[how to] Subselect dependent on first select value |
- Subselect dependent on first select value
- MySQL Replication VS MySQL cluster for high availability
- MCSE: BI - Advice?
- Truncated copy of a DB for a developer
- Inserting and updating records from one table to another
- What does "Remove fully qualified host names from /etc/hosts and use these in config.ini for all clusters hosts" means?
- Oracle 11G Startup failed after altering the number of system processes
- Creating a USER using the imp command [duplicate]
- MySQL Cluster - strange syntax error
- hbase vs postgres performance comparison? [on hold]
- Why am I losing rows on left join?
- SQL Server 2012 High Availability on VMware virtualization [duplicate]
- SQL Server 2012 Express fails at repair install, produces error 5178
- Postgresql Streaming Replication - pgpool2 - failover
- Why set up static data in views vs. using tables in mysql?
- What is the difference between NULL and \N while loading data from a csv using load data local infile
- Create spfile from pfile
- The InnoDB log sequence number is in the future
- Why are there different levels of MySQL collation/charsets?
- how to verify mysql backup file
- Service Broker stops working
- Hierarchical Structure
- Error AWR Operation failed: CATPROC not valid when creating database with dbca
- Why does that query cause lock wait timeouts?
- SQL Server 2005 not collecting logins in the log file
- SQL Server 2008 R2 corrupted after changing MAXDOP
- Applying user-defined fields to arbitrary entities
- SQL Azure: More Intermittent Timeouts
- Import a Oracle DMP file into a Fresh install of oracle
Subselect dependent on first select value Posted: 18 Aug 2013 05:58 PM PDT I wish to do a select of all data matching a particular id. I would also like to return a selection of all data matching the This example works fine for the main query of two tables and their data based on the contact_id I feed it, in this case '1': However, one of the fields in So, I would like to have a second row of data returned for that This is the table structure: I'm completely uncertain how to accomplish it. |
MySQL Replication VS MySQL cluster for high availability Posted: 18 Aug 2013 03:08 PM PDT I need to figure out a solution for high availability in MySQL and I don't know what to use -master master replication -NDBCluster Thanks |
Posted: 18 Aug 2013 01:56 PM PDT I recently got interested in Data Analysis but have no formal maths background so the road to a career seems long and arduous with respect to getting on board with the maths. Then, I am introduced to the world of BI and Microsoft's BI qualifications seem to be the gold standard around my neck of the woods being listed on every job description. So, my question to you is, as a person with little to no experience of SQL Server (outside of a masters degree module in T-SQL, stored procedures and such like), how long would it take to pass the 5 exams required to attain this certification if I studied in my own time after work. I currently work in a support role at a large university and have tech experience but no opportunity to work with data or SQL. Does anyone have any advice with regards to the best way to study or prep for these exams in terms of training material online or course etc, any first hand experiences? In particular I was worried by the statement in the official training manual that reads: Although this book helps prepare you for the 70-461 exam, you should consider it as one part of your exam preparation plan. Meaningful, real-world experience with SQL Server 2012 is required to pass this exam. |
Truncated copy of a DB for a developer Posted: 18 Aug 2013 03:19 PM PDT I have an access to a DB (SQL Server 2008 R2). The size of the DB is about 40GB. I am a developer and I'd like to have a local copy of that DB to be able to work offline. Is there an easy way to get truncated version of that DB (all db objects and about 1000rows per table)? I have a backup of that DB on a test server, but I am not able to copy 40GB over my slow connection. I don't have permission to restore that backup and delete rows manually and backup again after. I probably can script schema by Task -> Generate scripts, but how to script data and limit it to ~1000 rows per table(taking into account the fact that there are about a hundred tables and bounded through FK rows should remain safe without loosing a row at one end) |
Inserting and updating records from one table to another Posted: 18 Aug 2013 11:48 AM PDT i want to insert record from one table to another but there is 11 conditions for that below is my tables and below are the conditions so any one suggest me how to write procedure for that |
Posted: 18 Aug 2013 09:29 AM PDT
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-installation.html I understand localhost can't be used in config.ini but I'm confused as to what has to be removed. I would think that a fully qualified name has to be defined for 127.0.0.1 then used in config.ini even though it's local. I think that this note is off. Can someone with some mysql cluster experience explain a little? |
Oracle 11G Startup failed after altering the number of system processes Posted: 18 Aug 2013 11:25 AM PDT When I alter the number of system processes to 100000 and restart the database, I get the error below: How can I return it to the normal processes? |
Creating a USER using the imp command [duplicate] Posted: 18 Aug 2013 04:39 AM PDT This question already has an answer here: I was told I can use
I already have an ADMIN user with just about all privileges (there are 204 of them if it matters). I tried various options of exporting the USER with the ADMIN account or with the USER's account, but no matter what I do the Example command: |
MySQL Cluster - strange syntax error Posted: 18 Aug 2013 07:41 AM PDT I have MySQL Cluster instance and want one column (BLOB) to be stored on disk instead of memory. Here is syntax for this command: http://dev.mysql.com/doc/refman/5.5/en/create-logfile-group.html |
hbase vs postgres performance comparison? [on hold] Posted: 18 Aug 2013 03:09 AM PDT I know that this is comparing apples to oranges, but sometimes you have to choose what to eat... I'm trying to find a rule of thumb as to the magnitudes for which to choose hbase over postgres. E.g., I want to do 'select sum(x) from t group by y'. Obviously this can be done with an HBase scan, but at what volumes is the performance difference substantial. Looking for any information. |
Why am I losing rows on left join? Posted: 18 Aug 2013 11:17 AM PDT I have a feed that comes in with all employees. It has their supervisor's uid but no email. Just trying to add an supervisor email column on using a Left Join. Problem is that I lose a few rows doing this. Note that some user's supervisor uid will be NULL and we have seen employees that report to themselves. I would just like to take my existing table and add on supervisor email and if nothing then NULL. |
SQL Server 2012 High Availability on VMware virtualization [duplicate] Posted: 18 Aug 2013 03:58 AM PDT This question is an exact duplicate of: We're going to host a large SQL Server 2012 under a VMware virtualization and we need it to be highly available. These are the three options I found supported, but couldn't find a lot of info and comparison on who's better and why (and mostly - what's the disadvantages):
That's pretty much it. I would appreciate any info you may have about this, and would appreciate even more recommendations (hopefully based on test cases). ~Thanks. |
SQL Server 2012 Express fails at repair install, produces error 5178 Posted: 18 Aug 2013 09:04 AM PDT My SQL Server Express Service will not start up. To produce this problem, I basically cloned my old hard drive (Which had SQL Server Express 2012 installed) to a new hard drive (Seagate Momentus XT 750). EDIT: I am adding info on how I cloned my hard drive as per request of SQLRockStar. I used Seagate DiscWizard. The program was producing errors when trying to clone the HD when using the simple "clone HD" command. So I "cloned" it the following way with the help of SeaGate Tech support:
Afterwards, I tried starting SQL Server Express 2012 on my Momentus XT and it would not start. So, I tried performing a repair installation of SQL Server, and it failed: see summary below: I looked at the error log and it said
I read that last error message and am really confused. I'm led to believe that this is a problem with SQL Server, My HD has 4096 sector size. UPDATE:More information: I have discovered that My old hard Drive was 512 physical sector size and my new HD is 4096 sector size. I hear that there are conversion issues between the two sector sizes, but SQL Server is the only program that is producing errors on my system, I don't understand it. UPDATE:To fix this problem, I am willing to delete the MasterDB File and recreate it through reinstall, but I don't know how to delete it. |
Postgresql Streaming Replication - pgpool2 - failover Posted: 18 Aug 2013 08:41 PM PDT In my scenario I want pgpool to forward read only queries to slaves when the master goes down - I want my app to be in the "read only mode". How do I setup pgpool to accept read only queries when master fails (streaming replication) ? Currently I when the master goes down, pgpool waits for the master and doesn't forward any queries to slaves. |
Why set up static data in views vs. using tables in mysql? Posted: 18 Aug 2013 11:35 AM PDT I get an LDAP feed nightly. I get it as a text file and dump/create my LDAPALL table. There are roughly 75K employees times about 50 fields. I have the following too: LDAPIMPORTANT - view that stores all 75K but only 15 fields LDAPSHORT - view that stores all 75k but 5 fields LDAPAB - view that only stores 9k employees based on two groups (field lookup) Each of these are used a lot and for different apps and also there are a lot of views written against these views. But there is no updates to them. We do not update employee data. It is just LDAPALL update once a night. In this circumstance should I create tables from the LDAPALL table instead of views? I could set up jobs to create these tables once a night. What is best practice behind this? Speak in layman's terms because I am a PHP developer made to do all DB admin stuff. |
Posted: 18 Aug 2013 10:08 AM PDT I have a table which has four fields Now, I am trying to load following data and the third field in table is coming out as NULL, which is the expected result. In another case, I am trying to load following data and it is also loading the third field as NULL. Here is my question : What is the difference between using the two(\N, NULL) ? I am using Any help is appreciated. Thanks |
Posted: 18 Aug 2013 03:08 PM PDT I'm having a problem in creating spfile from pfile.I think I don't have permission to write on Oracle Home. I'm using Windows 8 Any workaround for my problem? |
The InnoDB log sequence number is in the future Posted: 18 Aug 2013 07:08 PM PDT Our site was getting intermittent database errors and I asked my webhost to check what's happening. After some inspection they found that the database has few issues and tried repairing it. Finally I got following message from them-
Can someone tell me what'd be the best way to address this issue. I really don't want to lose out on any data and want the dB to be repaired. PS: If you need more information, please let me know and I'll get it from our web hosts. Would really appreciate your help. |
Why are there different levels of MySQL collation/charsets? Posted: 18 Aug 2013 09:08 AM PDT Looking at the MySQL server variables the server and database collation are set to latin1_swedish_ci but the collaction_connection is utf8_general_ci. Additionally, the collation/charset is set at many levels: server, database, table and column. You also have the charset of the PHP MySQL connection to consider. My question is fourfold:
Many thanks. EDIT: Regarding the comment: "You can use either, the former one only to set results charset and the latter one to set either PHP internal encoding for use with mysqli_real_escape_string and results encoding." I thought you aren't meant to use real_escape_string and SET NAMES together. See: http://www.php.net/manual/en/mysqlinfo.concepts.charset.php |
how to verify mysql backup file Posted: 18 Aug 2013 06:08 PM PDT Is There any tool to verify the backup taken using mysqldump without manual restoration ? I have to take full backup daily so it is difficult for me to verify the backups daily by restoring them. As it will take time and also temporary disk space. Please suggest me how to verify my backup online |
Posted: 18 Aug 2013 07:08 AM PDT I'm new to Service Broker. Our existing Service Broker suddenly stops working and I can't figure out why. When I try to enable Service Broker (which is already enabled) I get this in SQL error log:
Also tried creating new message queues. I am able to see the created queues under |
Posted: 18 Aug 2013 05:08 PM PDT Every single user has say, 3 of I'm not an expert, but I've done research but it's all theoretical at this point of course, and I don't have hands on experience with the implementation that's for sure. I think my options are something like 'adjacency lists' or 'nested sets'? Any guidance into the right direction would be very much appreciated! |
Error AWR Operation failed: CATPROC not valid when creating database with dbca Posted: 18 Aug 2013 06:08 AM PDT I have a fresh installation of Oracle 11g enterprise edition on CentOS 6, both 64 bits. I have installed Oracle and so far everything looks fine. I have already added an started a listener. The problem I have now is when I try to create a test db using The creation of the DB cannot continue and it stops here... I have searched everywhere in internet but not luck so far. I have no clues what it can be. Any suggestions? Thanks in advance, |
Why does that query cause lock wait timeouts? Posted: 18 Aug 2013 02:08 PM PDT From time to time, I find a lot of these errors in my PHP error log: The problem persists for about 2 or 3 minutes. Thanks to stackoverflow, the reason was quite easy to find: What I do not understand is: Why? The locked table is very small, only 61 entries (about 30 new and 30 deleted per day, the auto-incremented primary index is near 800.000). No column is especially large. I use the InnoDB enging for this table (one key refers to another table with approx. 20.000 entries) and the problem occurs from time to time. RAM should not be an issue.The webserver and MySQL server run on the same (virtual) machine that usually does not suffer performance problems. Other transactions (there were thousands during the locked minutes) in large tables (1-2 mio. entries) did not make any trouble. Thanks for your hints! |
SQL Server 2005 not collecting logins in the log file Posted: 18 Aug 2013 01:08 PM PDT I am currently running SQL Server 2005 Standard Edition on a Windows 2003 server machine. I have gone to the properties of the server and confirmed that the Login Auditing is set to both failed and successful logins. For some reason though there is nothing in the logins for fails or successes in the SQL Server logs when I know there have been logins for both. I have searched out the reason for this and have not been able to come up with anything helpful, so I am hoping that someone here could give me a little direction. This is working on my other SQL Servers, so I know where to look for the results, but there are none there. |
SQL Server 2008 R2 corrupted after changing MAXDOP Posted: 18 Aug 2013 04:08 PM PDT My SQL Server 2008 R2 doesn't work after changing the I have 6 instances located on the same physical server and I changed
In Event Viewer I didn't find anything useful, also error log wasn't updated when I tried to run instance. Also I noticed a strange thing. When I open the Configuration Manager and open properties of instance, I don't see the fonts of parameter's name in Advanced tab. In another tabs everything is fine. The screen is attached. Does anybody faced the same problem? I don't have any idea how repair this... upd: By the way, i tried start sql server manually from command line with -f or -m parameter but nothing.. I just see empty error window |
Applying user-defined fields to arbitrary entities Posted: 18 Aug 2013 08:08 PM PDT Currently we have an old (rather crude) system that has user-defined fields, which are mapped against rows in arbitrary tables. This was an after-the-fact modification based on a customer request, and it wasn't really designed to scale well. Our system has around 60 different types of entities, which makes things even more complicated. Essentially the implementation looks like this:
etc... This gets nice and fun when we generate our own ways to index compound primary keys, but that's another DailyWTF-worthy story. Obviously this is pretty hideous, and leads to some spectacularly horrific queries being generated, but it's worked alright for now because we limit each entity to a maximum of 5 user-defined fields. As a quick disclaimer, I wasn't with the company when this design decision was made! ;) Anyway, we're about to start a shiny new project and will inevitably need a better way of doing this, with no restrictions on the number of UDFs we can apply to entities, increased performance, and less horror in the generated query department. If we could run a NoSQL solution like Mongo or Redis I'd be happy and wouldn't need to bother you all, but sadly that's not an option. Instead, I need a way to do this from within SQL Server 2008 R2. So far, I've come up with the following options:
So, do any of these ideas have merit? Is there a better alternative? |
SQL Azure: More Intermittent Timeouts Posted: 18 Aug 2013 08:21 AM PDT (also posted on MSDN forums http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/79058c06-d3c5-4073-8571-c29d1f43f7ae) Hi guys, We have a set of 5 online auction systems running on Windows Azure & SQL Azure. Each system consists of a single web worker and one or more web roles. Each system is using ASP.NET MVC 3 and Entity Framework, Repository Pattern and StructureMap. The worker role is responsible for housekeeping and runs two groups of processes. One group is run every ten seconds, the other every second. Each process will likely run a database query or stored procedure. These are scheduled with Quartz.net The web role serves the public interface and back office. Among other basic crud functionality, both of these provide screens which, when open, will repeatedly call controller methods which will result in execution of stored procedure read-only queries. The frequency of repetition is about 2-3 seconds per client. A typical use case would be 5 back office windows open, and 25 end user windows open – all hitting the system repeatedly. For a long time we have been experiencing intermittent SQL timeout errors. Three of the most common ones are: System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The only predictable scenario is during an auction where a specific controller -> sproc starts to timeout during the event (presumably due to load). All other times the errors appear to be completely random and come in singles, two's, and three's etc. even during periods of user inactivity. For example the system will go 18 hours without an error and then could be 5 – 10 errors from different housekeeping methods, or perhaps a user logged on and viewed their account. Other info: I have tried to run the affected queries/sprocs on SQL Azure using both local SSMS and Azure web-based query tool – all seem to execute quickly, 1 second max. Query plans not showing anything too suspicious although I am by no means a SQL query performance expert, or any other kind of expert for that matter J We have wrapped all affected areas in Azure SQL Transient Fault Handling Blocks – but as is discussed here http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/7a50985d-92c2-472f-9464-a6591efec4b3, they do not catch timeouts, and according to "Valery M" this is for good reason. We are not storing any session information in the database, although asp.net membership information is stored in the database. We use 1 "SQL Azure server instance" which hosts all 5 databases, two for staging and three for production. All 5 systems are generally active at the same time although it is unlikely that more than one will be in a state of live load use at any given time. All web roles, worker roles and the SQL Azure server reside in the same Azure Geographical Region. Any thoughts on where we should be looking? Would it help giving each system it's own SQL Azure server? ... Failing a solution by ourselves - is it possible to get Microsoft to open a support ticket and take a look under the hood at what's going on in with our application – how does one go about this? Thanks in advance. Ilan |
Import a Oracle DMP file into a Fresh install of oracle Posted: 18 Aug 2013 04:01 AM PDT A client sent us a oracle database we need to test against. We don't use oracle or have any oracle expertise in house. We need to setup the database so we can connect to it and debug a problem. I did a fresh install of oracle 9 (the version the client is running) and the management tools. I cannot for the life of me get it to import the data. It cannot be this complicated. I must be getting something wrong. I've tried: and got: But nothing shows up in the manager as far as tables in any schema and I'm at my wits end. |
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 |
Cause or Reason for MySQL Error 1064 and Solve through MySQL Technical Support
ReplyDeleteAt whatever point you discovered blunder 1064, which appears that there is a grammar mistake. Because of this issue the MySQL can't comprehend the summon which you are issuing. The fundamental driver is, your charge isn't legitimate one inside the organized inquiry dialect or SQL. The language structure blunder happens because of syntactic oversights and the outcome will be in the failure of parser to comprehend the order and neglect to do anything with it.
Be that as it may, on the off chance that you need to explain this language structure blunder then you need to connect with MySQL Remote Support or MySQL Remote Service. Improve your MySQL execution with our accomplished specialized specialists.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801