[how to] How to properly kill MySQL? |
- How to properly kill MySQL?
- RSExecRole missing
- Web based tool to backup PostgreSQL
- Run job in agent based on table data
- Error while connecting SQL Server management studio 2008
- What does the bit data type map to in a Java Domain Object
- MySQL Fulltext match with forward slashes
- MySQL Table not repairing
- How do I get more details on a full text catalog error?
- Optimizing an audit table for inserts and deletes
- Error 1044 Access denied to user
- How do I understand this deadlock?
- Slow Queries Not Logging
- Sleep Processes are Running Longer Than Allowed
- Multiple database servers for performance vs failover
- Join To a @Table Variable is running ineficiently
- How can I configure SQL Server 2012 to use multiple NICs?
- Two dichotomy views of a table, and means to express this as a stored procudure?
- How to restore mysql dump file?
- How to avoid deadlock while updating 2 rows in MySQL
- Restore SQL Server database using Windows Powershell 3.0
- How can I set a default session sql_mode for a given user?
- Which RDBMS has the most advanced "table-valued" functions?
- MySQL generic trigger to save identification data for later accessing of the changed row
- How do i subtract a number of days from a prepared statement parameter in db2?
- Determining the optimal Column Widths from a .csv File
- MySQL GRANT control
- Postgres PgAdmin III Query Builder crash
Posted: 05 Mar 2013 09:27 PM PST I have CentOS 64bit with CPanel installed and I use However, it keeps doing ..... for minutes and it never stops. It used to be instant. Any idea why it does that and how to fix? Right now I have to do The server is also very very active. |
Posted: 05 Mar 2013 09:23 PM PST I have multiple servers and 4 of them have reporting services installed with the A few days ago I was setting up security for a new login and I found out that the I have found a way to create it on the Has anyone encountered this problem before? Can anyone help me with a script and an explanation about this role? |
Web based tool to backup PostgreSQL Posted: 05 Mar 2013 09:14 PM PST Please suggest any web based tool to take an hourly backup of PostgreSQL database. |
Run job in agent based on table data Posted: 05 Mar 2013 09:19 PM PST Is there a way to start a SQL Server agent job if a table is not empty? Basically, first I want to check a table, and if the table is not empty then start the job. If it is empty, then check every 1 hour to see whether it has the required information. I want to run this job once a day once I have data in the table. |
Error while connecting SQL Server management studio 2008 Posted: 05 Mar 2013 09:12 PM PST I have installed SQL Server 2008 management studio. When I connect, it shows an error. Also when I go to the SQL Server configuration manager and click on SQL Server SERVER services, this message is shown:
No connections are found in the SQL Server configuration manager while my local network is connected. How can I fix this? |
What does the bit data type map to in a Java Domain Object Posted: 05 Mar 2013 07:25 PM PST When you have a column of the I tried
EDIT: a Java boolean does map to the bit data type in SQL Server. I had a column name with a dash in it that I had to change. |
MySQL Fulltext match with forward slashes Posted: 05 Mar 2013 06:20 PM PST I'm trying to run a fulltext match against a product database, where the product names have forward slashes in them. These are staple sizes, so it's quite important that they get matched. However, for every query I execute with a forward slash, I get 0 results. The query I'm using is: I have also tried However, running the following returns 6 results, as expected: The table is MyISAM and the product.name is varchar(255), with a FULLTEXT index on that column alone. If I search using fulltext for something else, like 'tool', I get the results as expected, and the server is configured for 4 character or more matching. What do I need to do to make this fulltext match work? |
Posted: 05 Mar 2013 09:06 PM PST Table info: when I do a mysqlcheck -r --all-databases it gets hung on that table even if you let it sit all day. Is there anther way to fix/repair/recover that table? Should I use myisamchk? I saw something like: My config on a 16GB ram box and could this have happened because of a crashed table from doing killall -9 mysqld because it would not shutdown and restart? EDIT: Does this mean that it is now fixed? If so how do I move it back? (this was done on a different server) Is there a way to maybe bring MySQL down on the main server and run a command to fix all the files? |
How do I get more details on a full text catalog error? Posted: 05 Mar 2013 11:55 AM PST I have an error that is repeatedly generated on a SQL Server 2005 instance running the databases for MS Team Foundation Server. Looking in the SQL Server logs gives me And the actual full-text crawl log (\MSSQL\LOG\SQLFT0001300005.LOG) gives me: If I rebuild the full-text catalog like so... The error will stop happening for a while, but it will start up again days later. I have searched for hours and cannot figure out what is causing this. Any suggestions? |
Optimizing an audit table for inserts and deletes Posted: 05 Mar 2013 12:15 PM PST I'm trying to identify the best way to design a table for audit purposes. Basically I log several last events for many users in one table. There's a limit on the number of records for each user. The new records come, the older go. Something like this: The question is what to do with indexes. I'm thinking of creating the clustered index on Another thought is to add an artificial This way new audit entries will be appended to the end but deletes will still happen in the middle of the table. It's probably better than the first option but I'm not sure. This table will be used frequently, basically every user activity is going to be logged (1 insert) and the oldest activity gets deleted in the same transaction (1 delete). This needs to be fast. Well, I want it to be instantaneous ideally and not noticeable performance-wise. I also need to be able to retrieve the set of records for a particular user quickly. It can probably be covered by a non-clustered index. I'm asking for advice in designing this table for optimal performance. EDIT: I think I have missed something important to mention. What I'm trying to track is not instantaneous in time but rather a period in time. There are several places in the system where I need this. Consider what the user is doing an activity of some sort that may span some period of time. If certain conditions are met then an existing activity is reused (refreshed, updated). I only wish to delete older sort of abandoned activities. For example, within 2 weeks one user may have issued like 50 of activities, but for another user to produce than many may take over a year. That's why I don't want a generally ordered log for all users together. It is also not clear how should I cluster per datetime (as suggested). Do I do it on initial creation event or on the update event? |
Error 1044 Access denied to user Posted: 05 Mar 2013 01:50 PM PST This is driving me crazy. When I try to create a few tables from my Workbench model I get this I've been trying to find a solution but nothing works for me. Curiously when I run Access is denied to both at one point or another. The MySql server is a remote hosted server with the user permissions correctly set. |
How do I understand this deadlock? Posted: 05 Mar 2013 11:43 AM PST I have two threads doing inserts into a table at the same time, causing a deadlock. The interaction with the table is in a new transaction, so I'm pretty confident there is nothing else going on here. What is the issue? The following is table (the primary key is the only index) I have a deadlock that looks like two statements doing this at the same time on the same table, and then deadlocking each other (I'm taking a sample here of a different execution because the deadlock XML doesn't have the full declaration of the prepared statement): Multiple threads inserting into this table in the same way cause the following deadlock: |
Posted: 05 Mar 2013 01:37 PM PST I am attempting to enable slow query logging on our server in order to identify any queries that could use optimization. Sounds simple enough, however my file is not being written to. I get no errors or anything of the like, it just doesn't seem to be logging the slow queries. I have remembered to restart mysql after my config changes. I am using MySQL Ver 5.1.61 . Here is what I have in my.cnf: the file /var/logs/my.slow.log has mysql as the owner, also in the interest of debugging I gave read/write to all on the log file. I have the long_query_time set to 1 in the above as I just want to see if it is working. I have tried setting it lower(e.g 0.3) but I'm still not getting anything logged. I know that the queries my app are running take longer than 1 second and I've also ran intentionally log queries ( I've looked through the docs, from what I can see this should be working. Anyone have any suggestions as to what I am doing wrong? Any advice would be appreciated, thanks much! Edit: As asked in comments I ran the query: The result: Obviously my configuration changes are not being taken into account as I believe these are defaults. I am quite certain the my.cnf file I am altering is being parsed as if I put in an invalid value mysql will error on restart. What could be going on here? Another Edit: After taking @RolandoMySQLDBA 's advice and moving my slow query config lines to under However I am still not seeing the file my.slow.log being written to. I don't think it is a permissions issue as the file is owned by mysql and I've added all permissions for all users on the file. Could anyone think of a reason why this would not be working? Edit: Solved! The path to the slow query log was incorrect, it should have been /var/log/my.slow.log instead of /var/log*s*/my.slow.log . Thanks to all for the help, I've learned allot! |
Sleep Processes are Running Longer Than Allowed Posted: 05 Mar 2013 04:02 PM PST From time to time my mysql server will run into a "too many connections" error. I believe part of the problem is large amount of When looking into the issue, I saw this and investigated. I checked my timeout values with And both How/Why would these sleep processes be running so long, if they're supposed to stop at 600? |
Multiple database servers for performance vs failover Posted: 05 Mar 2013 11:47 AM PST If I have two database servers, and I am looking for maximum performance vs high-availability, what configuration would be best? Assuming the architecture is two load-balanced web/app servers in front of two db servers, will I be able to have both db servers active with synced data, with web1 to db1, web2 to db2 setup? Is this active/active? I'm also aware that the two db servers can have their own schema to manually 'split' the db needs of the app. In this case daily backups would be fine. We don't have 'mission critical data.' If it matters, we have traffic around 3,000-7,000 simultaneous users. |
Join To a @Table Variable is running ineficiently Posted: 05 Mar 2013 11:47 AM PST Alright so I have a report sproc that was running incredibly slow. Customers were complaining that the report would not run so I started investigating exactly where in the sproc the problem was and I found this portion taking up 99.8% of the time. The @xmlTemp portion of this query is normally used to take parameters from our web application and turn them into parameters the report can actually use. For the sake of testing this I am just inserting values that run this for one store for one day. Running this portion can take upwards of 20 minutes. So I ran this query plan through PlanExplorer and saw it was pulling all of the data from two of my fact tables instead of filtering out just that store and that day. As seen in the picture below. Obviously this is bad. So the next step I took is to cut out the join the @xml temp and just manually put in the values in the queries By changing this to a simple where clause it runs in 4 seconds instead of 20 minutes and up. Also the query Plan is showing the correct Is there any reason I should be seeing this behavior? Edit here is the full Link to the QueryPlan. |
How can I configure SQL Server 2012 to use multiple NICs? Posted: 05 Mar 2013 09:16 PM PST How can I configure SQL Server 2012 to use multiple NICs? I've a server with 4 NICs. I want to use 2 NICs to query my databases, and 2 NICs to retrieve results from them. I want them to work in load balancing mode and still continue to work if one nick is down. It is possible? |
Two dichotomy views of a table, and means to express this as a stored procudure? Posted: 05 Mar 2013 07:58 PM PST There is a table How to express this? Should I create a view, a procedure, or a function which tells for every view ID whether it is archive (in order to use it in two above mentioned views)? MySQL. |
How to restore mysql dump file? Posted: 05 Mar 2013 09:47 PM PST We have created a dump file (.sql) using the command mysqldump in mysql5.5. Now we want to restore the same. We are using the command :-
But we are not able to restore. We are using Win7 SP1 32 bit OS. |
How to avoid deadlock while updating 2 rows in MySQL Posted: 05 Mar 2013 07:45 PM PST This is a interview problem:
I was asked how to avoid deadlocks without changing the transaction logic (I cannot commit after updating A and commit again after updating B). They want me to propose at least 3 different methods. What I know is to use |
Restore SQL Server database using Windows Powershell 3.0 Posted: 05 Mar 2013 06:32 PM PST I'm trying to restore a SQL Server database with a PowerShell script, but I'm having problems. Here is the error I'm getting:
Here is my code: |
How can I set a default session sql_mode for a given user? Posted: 05 Mar 2013 02:32 PM PST I want to have a default session sql_mode that is different from the global sql_mode. I can set it manually, but I'd like to do it automatically. I thought I could add it to Yet, when I connect my session sql_mode, the session still inherits the global sql_mode. I'm using MySQL 5.5.16. |
Which RDBMS has the most advanced "table-valued" functions? Posted: 05 Mar 2013 04:32 PM PST Every Database Management System focuses on specific features and applications. I am using Thus, I thought that there should be other RDBMSes with appropriate functions suitable for such tasks. Can you suggest alternative RDBMSes for splitting a cell (string) and connect the sub-cells to other tables? Even, it is not necessary to build a virtual table by |
MySQL generic trigger to save identification data for later accessing of the changed row Posted: 05 Mar 2013 04:32 PM PST I am pretty inexperienced with this. I need a generic trigger, able to create and save in a fixed table some sort of identification data for a changed row from generic (any) table. The identification data should be used later to SELECT the changed item in the given table. Can be this done without previously knowing the table structure? The only idea I had, but it's way too inefficient in my opinion, also requires previous knowledge of the table column names, is to save a hash by: then to identify the changed row in the table which triggered the change. I would greatly appreciate any help or suggestions! |
How do i subtract a number of days from a prepared statement parameter in db2? Posted: 05 Mar 2013 01:46 PM PST I have a C# application using OLEDB to connect to a DB2 database. Basically, I want to do this: However, when I run that, I get this: And if i change it to wrap the I get this error: As a bonus question, short of creating a PL/SQL function, is there a way to use the same parameter for all the timestamp locations instead of supplying the same value 8 times? |
Determining the optimal Column Widths from a .csv File Posted: 05 Mar 2013 08:32 PM PST I want to import a .CSV file into a MySQL Table. I would like to determine the optimal column widths to use based on the actual data contained in the CSV file. Are there any scripts or utilities to accomplish this? |
Posted: 05 Mar 2013 07:32 PM PST How can I write a script to automate MySQL database grants in a very easy way? I have a config file that contains the grant changes I want to make. I want the script to read the config file, and make any necessary changes to the access rights as specified in the config file. Essentially, I want the target rights to match the rights in the config file. |
Postgres PgAdmin III Query Builder crash Posted: 05 Mar 2013 12:07 PM PST I've been using Postgres and pgAdmin III for some years, but this morning I had a very BIG BIG problem. I'm using pgAdmin III 9.0 on Windows Xp operating system, on my laptop Dell Latitude E4300. From this morning, Query Builder ("SQL Editor") option simply stopped working. When I open pgAdmin, everything is fine and workin', until I click on the Sql Query Builder button. When I do that, nothing appears and pgAdmin crashes without giving any information. I tried to uninstall and install PgAdmin III 9.1, again, but Sql Query Builder kept not workin'. What could I do? |
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