[how to] Which privileges for MySQL extended status? |
- Which privileges for MySQL extended status?
- Db design for historical option data (~200GB)
- XSD Database Schema when you have Composite Keys
- Game database- many to many relationship
- do MYSQL views occupy physical space?
- Recommended hardware for dedicate sever using MySQL for POS (point of sale) [closed]
- Object name 'Clean Up History' in use when trying to complete the maintenance plan wizard in SQL Server 2008 R2
- Mysql suddenly stopped after is said to be crashed
- Cannot connect to SQL Server 2008 after updating the service pack
- which sql server edition is good for practice
- Use cases for NoSQL databases: Time series
- sql:space at the end of string
- Can I make sure two columns dont have the same value
- Correct way to perform an UPDATE on multiple tables?
- How to implement posts with “seen by” like facebook?
- Show all results for past N "insert batches"
- Lock escalation problem on a trigger
- Functional Dependencies and Normal Forms
- disallow SET command in a postgresql server
- SQL Server service shutdown due to 'bad?' SSL cert
- Conditionally INSERTING columns into Table
- Why is SQL running the same query longer from another connection?
- Can't connect to SQL Server Windows 7
- Remote connection to PostgresSQL in Windows 2008 Server is prompting the error below
- Are view references in a query properly called "derived tables" as such?
- Indexing is not working
- How to increase fast backup and restore of 500GB database using mysqldump?
- How to check growth of database in mysql?
- Is there a tool to check if my database is normalized to the third normal form?
Which privileges for MySQL extended status? Posted: 13 Apr 2013 06:34 PM PDT If I want to execute "SHOW STATUS" within MySQL or use "mysqladmin extended-status" on command line with a non-root user, which privileges would this user then need? |
Db design for historical option data (~200GB) Posted: 13 Apr 2013 02:15 PM PDT I need some help determining how to best design my tables. I have about 200GB worth of data I wish to place in a table (historical option price data). The table looks something like: 95% of the time I will be fetching the current date's data. But the other 5% of the time I want to analyze historical data. Most of the queries would involve some combination of symbol/date/exp. I'm not sure how to best organize the table/s in terms of efficiency. Would it be best to put the data into two tables: historical and current? Or an index on the date? Or maybe an extra boolean column (isCurrent) which indicates which data is current or not? If it matters, I'm using java/hibernate/mysql under the covers. Thanks |
XSD Database Schema when you have Composite Keys Posted: 13 Apr 2013 12:20 PM PDT Imagine I have a relational database with many tables, and these link to each other with composite keys that are made up of three or more columns. How can I write the XSD database schema to account for that fact? I can't find any examples of XSD Schemas where the referenced keys are composite. I am using the ID/IDREF way of showing the relations between the tables, but I can't seem to get it to work for when my table unique identifier is of composite type. Plus I also have to tell the Schema that these must also be unique, and I can't find any examples of that either when done on composite keys. I would greatly appreciate any help. Thanks |
Game database- many to many relationship Posted: 13 Apr 2013 12:13 PM PDT I am designing a simple relational database about a game that can be played by 2 players each time. I have these tables: Player, Game, PlayerPlaysGame, Payment. I recognize there is a many-to-many relationship between Player and Game and one-to-many between Player and Payment since one player can make many payments whereby one payment can't be made by more than one player. In PlayerPlaysGame table I have only playerID and gameID attributes. Can I also add gameDate and gameScore to that table or is it better to have them in Game table? I'd like to ask if I'm on the right track. Thank you. |
do MYSQL views occupy physical space? Posted: 13 Apr 2013 08:10 PM PDT do MYSQL views occupy physical space? Or in other words, is a MYSQL database limited to a certain number of views? |
Recommended hardware for dedicate sever using MySQL for POS (point of sale) [closed] Posted: 13 Apr 2013 10:17 AM PDT I'm having some doubts about this point in my project (it's social service). The POS have developed on VB.NET using Visual Studio 2010. The MAXIMUM number of POS that is thinking to attend this server is 8 or 10. The tests will be with 3 POS for started, and gradually escalate till 5 or 6. I don't want a too-much computer, just one that gives the best performance without troubles for this kind of service. Actually I have in mind the next hardware for the server:
What do you think? Really I need some orientation. I would like to have the ideal configuration for the server to fit into this project. |
Posted: 13 Apr 2013 02:13 PM PDT I am trying to create a maintenance plan on a instance running SQL Server 2008 R2 SP1 (no CU's installed). When completing the wizard I get the following error:
I've checked both The server is being backed up by Microsoft DPM. Could it be that DPM inserts a cleanup job somewhere that I don't see? |
Mysql suddenly stopped after is said to be crashed Posted: 13 Apr 2013 02:17 PM PDT We have a mysql instance running well and suddenly it stop. I have gone through the logs file but found no indication why it stopped? But there have some instance start and stop before this? Below is the snippet of mysqld.log |
Cannot connect to SQL Server 2008 after updating the service pack Posted: 13 Apr 2013 08:45 AM PDT After updating, whenever I start the service of the server in configuration manager, it always stops then. And I found the error in the log
Can anyone pinpoint why this is happening? As I cannot start the server of SQL server, I cannot connect via management studio and edit anything. How can I edit, for example, the owner of the database? |
which sql server edition is good for practice Posted: 13 Apr 2013 06:12 AM PDT Which SQL Server (free/trail) would be good to install, which requires minimum resource and have maximum features. I mean, I can practice mirroring,logshipping and replication. I found this link, but confuse with enterprise and standard edition. |
Use cases for NoSQL databases: Time series Posted: 13 Apr 2013 01:42 AM PDT I need to set up a database that will record temporal series data (sensors). A friend of mine has recommended me to use a NoSQL database instead of using Oracle (for instance). There're also some articles that recommend the same approach: see Andrew Oliver's article. Why is not convenient to record a temporal series in Oracle (or any other relational database)? Could you please help me in giving an example? |
sql:space at the end of string Posted: 13 Apr 2013 03:52 AM PDT I have a sql code like shown below Here @str has value 'abc ' (there is an space at the end) when above query is executed it will stop when only a space is present in 'a'. Also output of this query is: bc c for the above query if i give input @str as 'abcd' then output will be bcd cd d So in the first case that is @str='abc ' i want to get output like bc c Now the code is checking for space and because of that i am having problem. But i want it to consider the space at the end also. Same is the problem in sql for len also.Both len('a') and len('a ') will return 1. So if anyone please help on my query so that it will give my desired output. |
Can I make sure two columns dont have the same value Posted: 13 Apr 2013 01:04 PM PDT If I have a table that looks like this Is there a way to make sure that |
Correct way to perform an UPDATE on multiple tables? Posted: 13 Apr 2013 07:35 AM PDT This query is working, but I am only just beginning to understand relational tables. I have spent the last few yeas doing all of the processing with PHP after retrieving the data I needed (oftentimes using multiple queries). So, please hold my hand here, and tell me if this is being done the "right" way?: Table Breakdowns SettingsList UserSettings SettingTypes Basically when I add a setting to the API (through the control panel) it gets put into Right now, when I edit a setting from MY administrative control panel (the client will have far less control), I am running an update qiery that looks something like this: Does this look correct? Again, it does work but as most here would agree, just because it works, doesn't mean I did it right. Well, I may have supplied more information than you need to give me an answer, but how am I doing in my first application with relational tables? |
How to implement posts with “seen by” like facebook? Posted: 13 Apr 2013 01:24 PM PDT Inside a Facebook group there is a feature when every time see the group newsfeed it mark all posts as seen by me. And if I see a specific post inside a group thought a url (facebook.com/groups/123/posts/123), it mark as seen this single post. My question is about what is the intuitive way and right to model this and performance. I want to know what I am missing or wrong about about to get it right. What happens on facebook: "When a new member join the group, all the old posts are marked as seen by him". But is it per post or global? Scenarios:
Pros:
Cons:
2. Pros:
Any tips and advices are welcome! Thanks! |
Show all results for past N "insert batches" Posted: 13 Apr 2013 10:53 AM PDT Every once in a while I have several users check in with some value: Each 'batch' will have the same How might I get the total If I were to do this in a sloppy way via Python or PHP, I would pull I would like to avoid the use of a stored procedure as A) my user doesn't have The target environment is MySQL 5.x with InnoDB tables running on any arbitrary Linux distro. Thanks. |
Lock escalation problem on a trigger Posted: 13 Apr 2013 08:16 AM PDT I've inherited a SQL Server 2005 database that is getting 2-3 deadlocks a day. I've tracked it down to a scheduled job that runs during the day and inserts into a table with a trigger. The trigger consists of 10 updates to another table for slightly different criteria. The deadlock occurs in the trigger. When a person makes an application and the job is running that's when the deadlock occurs. The application inserts into the same table as the scheduled job. Looking at the trace it seems to happen when process 1 obtains a key lock, process 2 obtains a page lock, then process 1 escalates the key lock to a page lock and process 2 tries to obtain a key lock. I've added missing indexes which seems to have helped but its still happening. I'm not a DBA so any advice on an approach to solving this would be appreciated. I've added a link to the deadlock xml - this is from a test I did to duplicate the problem. |
Functional Dependencies and Normal Forms Posted: 13 Apr 2013 09:16 AM PDT I'm trying to grasp the concepts of functional dependencies and normal forms, specifically first (1NF), second (2NF), and third (3NF) normal forms. The link here was extremely helpful in deciding the distinction between the three forms, but I have a much more abstract problem. The accepted answer to this post gives wonderful examples of tables and which normal form they are in. However, my question poses the following: For (W X Y Z), determine the form of: WX->Y, WX->Z, Y->Z. (Note: 'WX' should be underlined as the combined primary key, but I couldn't find that in the formatting, so it's bold) I don't get it; how can I even begin to do this? The textbook I'm referencing only gives concrete examples, and I don't understand the theory well enough to apply it to the abstract. Any insight? |
disallow SET command in a postgresql server Posted: 13 Apr 2013 12:02 PM PDT Im planning to publish my postgresql server to a few untrusted clients. I dont want them to modify any runtime setting, like work_mem or something risky to my server. In general I assume the pg_catalog schema is public but I don't want to allow updating pg_settings at all. Is it possible? |
SQL Server service shutdown due to 'bad?' SSL cert Posted: 13 Apr 2013 06:01 AM PDT This morning it transpired that SQL Server 2012 service running on Win2012 had shut itself down. When I logged in as the server admin and tried to access SSMS, after entering my credentials I got the 'transport' error. On checking Windows Services, both SQL Server and Agent were stopped. I tried to start them, but got a timeout error. The SQL event log contains this entry:
The Windows event logs contain these entries:
The following procedure fixed the problem:
I looked at the certificate in Certificate Manager, and Windows reports no problems. The certificate itself is valid until March 2014. Can anyone offer any advice as to why this might suddenly have occurred? I really don't need mornings to start off like this ever again...! |
Conditionally INSERTING columns into Table Posted: 13 Apr 2013 03:01 AM PDT using SQL Azure and like to insert a data to a table using dynamic Query. No of columns in select statment is dynamic. It will be based on some conditions. Ex: How can I create a table for conditional based columns and do insert in coditions? I don't want to use SELECT INTO #tempTable as it is not supporting in SQL Azure Here is the code: |
Why is SQL running the same query longer from another connection? Posted: 13 Apr 2013 11:01 AM PDT Here is the issue overview: Why does my stored procedure run faster when executed localy vs remotely? Dont jump to any conclusion just yet, let me explain what I mean... Here is the setup: So, here is what I am seeing: Using SQLCMD on the application server, with SQLProfiler running from the DB server, I can execute the same exact stored procedure, with the SAME exact parameters, and I see that the execution starts immediatly, and compleats with a durration of about 110,000ms with an IO of about 1200. The query results in 1 row, with 4 columns [INT, INT, VARCHAR(50), VARCHAR(100)] ASIDE:(I know the query is a train wreck, this is a regulated system and I cannot change it on a live prodution server, so please dont make any sugestions about doing so. The next version has been rewritten to be better.) From everything we can see, there is no reason that we should be seeing differances like this, but what is heppening is the .NET application that calls this query from the application server is timing out waiting for the responce. We have checked locking and blocking, WAIT states, Query plans, IO contention, CPU contention, MEM contention, NETWORK saturation/utilization, performed indexes rebuilds on all indexes, updates all stats, and a hand full of other items, but haven't come up with anything that points to why this is happening. Please ask more questions if you have any, make recomendations as you come up with them, and depending on the impact (remember this is a production environment) we will try them and respond back. -Thanks! -Chris |
Can't connect to SQL Server Windows 7 Posted: 13 Apr 2013 04:01 AM PDT TITLE: Connect to ServerCannot connect to localhost. ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476 I keep getting this error when trying to connect to sql server. I also ran a repair and I got this error. Could this be the problem and do you have any idea how I can repair it. I have looked all over Google and tried quite a few solutions with no luck. I am Using SQL Server 2008 R2 Developer Edition |
Remote connection to PostgresSQL in Windows 2008 Server is prompting the error below Posted: 13 Apr 2013 12:29 PM PDT The error: "Unable to read data from the transport connection. an existing connection was forcibly The conditions: I don't know what seems to be the problem why it is prompting the error message above and why it cannot connect. I googled it but there seems I cannot find a clear cut |
Are view references in a query properly called "derived tables" as such? Posted: 13 Apr 2013 08:01 PM PDT While answering a question on stackoverflow, I presented a definition of derived tables:
But a commenter objected:
and further backed this up with:
So what's the real scoop, here? Am I to relegate what I thought of as derived tables to simply "FROM clause aliased inline subqueries" or are views not properly derived tables? Please note: I searched for quite a while online and could not find anything definitive. I don't have a copy of the said spec. Also, I think it's worth addressing something else. Let's say that views are properly called "derived tables". Does this make the reference to the view also a "derived table" or merely a reference? For an example with a CTE that should drive the point home: The |
Posted: 13 Apr 2013 07:01 PM PDT Following is the table and index information for which I have the queries at the end. EXPLAIN 1 EXPLAIN 2 Queries:
Although I have created indexes but still why system is not able to use it. This is my question in both the above queries. Detailed Index details |
How to increase fast backup and restore of 500GB database using mysqldump? Posted: 13 Apr 2013 04:01 PM PDT There is a database A size of 500GB. Tables in database A contains both MyISAM and INNODB tables. MyISAM tables are master tables and Innodb tables are main transaction tables. Backup and restore using mysql dump taking quit a long time or days.
|
How to check growth of database in mysql? Posted: 13 Apr 2013 03:01 PM PDT I want to know is there any method to check the growth of database on file For example Database A contains all tables in INNODB storage engine another database B contains all tables in MyISAM storage engine. |
Is there a tool to check if my database is normalized to the third normal form? Posted: 13 Apr 2013 03:23 PM PDT I learned about normalization recently, and understand how important it is when implementing a new schema. How can I check if my database is 2NF or 3NF compliant ? Manual review is a sure option, but I'm looking for an automated tool here. I'm not looking for a point-and-click tool, more something that would highlight possible optimizations to make a table 3NF compliant. I guess it might use statistics based on good sample data and/or semantic analysis of columns names. |
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