[how to] Easy replication for SQL Server: Can it be set up like mongodb or Oracle? |
- Easy replication for SQL Server: Can it be set up like mongodb or Oracle?
- What database does Yahoo, Bing, and Ask use? [on hold]
- Can I delete SQL Server 2008 R2 "audittrace" (.trc) files
- Mapping and Inserting Values into a Specialized table
- How can I return column names in dot notation in MySQL?
- How to create root user after running mysql_install_db?
- Upgrade SQL Server 2000 database to 2008 R2 and enable new features
- Column 'Comments.Text' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
- Nested with - Incorrect syntax near the keyword 'WITH'
- "The FILE SIZE property is incorrect" error while trying to attach "Adventure Works for SQL Server 2012" sample databases
- Multiple filters with joins
- How to give permissions to 90+ SQL Servers without tweaking in each of them?
- Detabase Tuning Advisor about Indexing
- What am I doing wrong in mysql database?
- Advice for SQL Server 2000 replication
- MySQL row does not persist, but primary key with auto-increment is incremented
- Fixing wildcard expansion resulting in too many terms error (DRG-51030)
- How to split data files across multiple hard drives?
- export (mysqldump) databases from MySQL version 4.0?
- Optimizing mysql queries running on 50 million rows
- Dropping Hypothetical Indexes
- Avoiding performance hit from GROUP BY during FULLTEXT search?
- AWS performance of RDS with provisioned IOPS vs EC2
- sp_startpublication_snapshot Parameter(s)
- How do I determine if FORCE LOGGING is on for the entire database?
- How to show the column names of a table with a simple sql query?
- What are the main differences between InnoDB and MyISAM?
Easy replication for SQL Server: Can it be set up like mongodb or Oracle? Posted: 22 Sep 2013 08:41 PM PDT This might look like a noob question... but it isn't. (I have 18 years of SQL Server experience, and three years of MongoDB experience.) The basic scenario is:
("Warm Spare": Can be up to 5 or 10 minutes behind. While the primary is live, the spare is not used operationally in any way. Is there, and automatically is within 5-10 mins of current. Manual cutover is needed to bring it on line and use it.) With SQL Server, to set up a backup server, I need to go through a lot of steps, to get log shipping set up:
I often use redgate sql backup which helps many of these tasks. But it is still quite a bit of setup work. Further, in some environments (like the Amazon RDS SQL Server service), I have %100 access to SQL Server, but zero access to the OS. Without OS access, I can't even begin to set up the backup server. I was talking to a colleague (who is more Oracle centric), who said, "Either you have sipped too much Microsoft Coolaid, and sadly think that the limitations you describe are normal, or there is an easier way." I think (hopefully correctly!) that SQL Server is world class. So the question: Is there an easier way to set up an off site, warm spare SQL Server? On Mongodb, it is REALLY EASY, and zero access to the OS is needed:
Done! My colleague indicates that Oracle has a similar mechanism. So my SQL friends: Can SQL Server match Mongo, or get in sight of Mongo, for simplicity of replication setup? |
What database does Yahoo, Bing, and Ask use? [on hold] Posted: 22 Sep 2013 03:52 PM PDT I'm trying to find information on popular search engines, and I wanted to know what databases they use. I've been searching everywhere, and I've only found little information. I know Google uses BigTable, but I'm not sure about Yahoo, Bing, or Ask. |
Can I delete SQL Server 2008 R2 "audittrace" (.trc) files Posted: 22 Sep 2013 05:04 PM PDT This is precaution question :) When I was configuring SQL Server 2008 R2 database engine, I checked "Enable C2 audits" which I don't really need. From that time it created a lot of files like audittrace20130918235148.trc. I disabled C2 auditing in SQL Server Management Studio by unchecking checkbox. Are those files really from C2 audit? If so, can I safely remove them without worring about data stored in databases? Again: I do not need audit logs. |
Mapping and Inserting Values into a Specialized table Posted: 22 Sep 2013 03:27 PM PDT For a system i'm designing,i have one parent entity,Computer A computer can be of two types,Desktop and Laptop,each having their own specific attributes. and similarly a table for Desktop. Now the entries to these tables is via a end-user form,my main question is, what would the exact INSERT queries be for adding say to the inventory,a laptop if i were to have 3 tables,one superclass and two subclass tables? I understand i would first how to make an entry to the computer table and then laptop,but how will this be carried out automatically? |
How can I return column names in dot notation in MySQL? Posted: 22 Sep 2013 12:56 PM PDT I want to return column names into a table. But I also want to avoid redundancies like 'id' and 'id'. I did: But as expected I get How do I get it in the form: |
How to create root user after running mysql_install_db? Posted: 22 Sep 2013 01:49 PM PDT I'm installing MySQL on ubuntu and I changed the data directory. I created new data files using So now I need to access my database using Now I'm in, but the mysql.user table doesn't have a single row, which is logical after creating the data files from scratch, or isn't it ?? So I tried: But it won't run because I'm running with
|
Upgrade SQL Server 2000 database to 2008 R2 and enable new features Posted: 22 Sep 2013 01:22 PM PDT I have recently upgraded SQL Server 2000 database to 2008 R2. What I did was:
Question: What else should I do to make migration complete? I want to:
In other words: I just want to know how to correctly and completly convert old SQL 2000 database to new 2008 R2 database, be calm that everything is done right and be happy with all new features. I'm asking this question, because I've found a lot of sites on the Internet that says so many different things that makes me confused: some say that it is required to rebuild indexes, another says to do other things... and now I know nothing so I want to hear experienced person opinion and clear, step-by-step instructions. I work for very small company, I'm on my own and I don't want to screw things up. Thank you very much for your time! Saelic |
Posted: 22 Sep 2013 08:46 AM PDT They have explained the root of the problem very well and even advised to use max aggregate as a solution. But, lets take the example I understand the solution: I must take an item to represent the group by edit Everything is like in that question. The only complication that I address here is the extra I am using this beast, http://meta.stackoverflow.com/a/52063/201017 |
Nested with - Incorrect syntax near the keyword 'WITH' Posted: 22 Sep 2013 07:16 AM PDT With inside with This is ok http://data.stackexchange.com/mathematics/revision/138658/170321/comment-partition-by-question But, as soon as I wrap it with a second I get this error,
With inside select The following is ok This is also runs But, wrapping expression with another select, as this one proposes, fails again with the same error. I do it in data.stackexchange and they report that they use MSSQL |
Posted: 22 Sep 2013 08:26 AM PDT I am trying to attach the sample databases, for example, Each time I am getting the error:
What can be done to attach the MS SQL Server 2012 sample databases? Tried to install these sample databases ак the script(s), also always getting the error, the different one, about which I shall ask in a separate question. |
Posted: 22 Sep 2013 11:35 AM PDT I just read this qestion: SQL Multiple Filter - Optimal Way I tried this with Northwind. I filter like this: This seems to work as expected, I get two hits: Chai and Chang. Now I want to add filter ShipPostalCode: Because of the join I now have multiple rows of Chai and Chang. These filters are users who makes selection in dropdown lists, so even if will give me one row per product, but that's not the way to solve it, is it? EDIT: Thank you guys, Yes, supplier is an int. So If there be would another many to many relation from the Products table I can just add another AND, I guess. Sorry, this is a very sad example, but if I add OrderDetails2 and Orders2 where OrdersDetails2 will be a junction table between Products and Orders2, I can just add add another AND (and keep on filtering), like this: As you can see, the Order2 table has a column 'City' What do you think? |
How to give permissions to 90+ SQL Servers without tweaking in each of them? Posted: 21 Sep 2013 10:28 PM PDT There are over 90+ MS SQL Servers (SQL Server 2005, 2008 and 2012). All in the same Windows domain (but physically all over the world). How to give a domain user (administrative, or other) access/permissions to its instances and databases without tweaking (creating, configuring) users/accounts and permissions for such user (or group) in each of 90+ servers, (and even more) their instances and databases? |
Detabase Tuning Advisor about Indexing Posted: 22 Sep 2013 08:40 PM PDT How does DTA make an index recommendation? What is the technology behind that? If we can use same on our side then we can shorten the whole process of Tuning recommendation. Like (1) creating trace file using SQl Profiler (2) Use trace that trace file in DTA (3) Than look for recommendation (4) Follow the recommendation & finally see the results through Query Execution Plan. So i just wanted to know if it is there any way to create a predictable index. |
What am I doing wrong in mysql database? Posted: 22 Sep 2013 02:01 PM PDT I'm creating a trigger that deletes rows from a table when they are inserted. However, when the trigger executes I get the following message:
What do I need to do for this trigger to work? |
Advice for SQL Server 2000 replication Posted: 22 Sep 2013 07:38 PM PDT I have software that runs on SQL Server 2000. Can you tell me if its possible to synchronize a branch database with its server without human intervention, i.e. programmatically? If so, where do I start? |
MySQL row does not persist, but primary key with auto-increment is incremented Posted: 22 Sep 2013 05:22 PM PDT I have a MySQL database that is acting oddly. I insert a new row and observe that for a brief period of time (less than 30 seconds), the row persists as expected in the table. After this time, though, the row vanishes (despite no other queries being executed). This table has an integer ID as a primary key, with auto-increment set, and the primary key is auto-incremented as expected for new rows. This leads me to believe there is not some kind of transactional rollback (and my table is MyISAM, so that shouldn't be possible anyways) or anything else that is somehow reverting the database to a previous state. What logs should I be checking to see what is going on here? The contents of my '/var/log/mysql/error.log' are below, but I don't see anything unusual. I noted the 'crashed' mark on the appname/users table, but mysqlcheck suggests the table is OK. Any thoughts? |
Fixing wildcard expansion resulting in too many terms error (DRG-51030) Posted: 22 Sep 2013 04:22 PM PDT How can I resolve the My index creation syntax is: And my query is: There are 15 million rows in that table, and more than 50000 rows match that query. I have set
Can anybody hep me how to solve this error? |
How to split data files across multiple hard drives? Posted: 22 Sep 2013 03:22 AM PDT I'm asking for advice concerning point when MySQL becomes a large (maybe medium for someone) system. We have MySQL database (InnoDB engine) that grows in gigabytes. It's already some hundreds of gigs and we definitely know it will grow. What would you advice to do when the size of data exceeds the drive space? I'm pretty sure data will grow out one terabyte, two, and so one later. I've found two different solutions to go with: 1) either use 'innodb_file_per_table' option and run table optimization ofter; Question for point 1: At some point anyway all those different idb files could come to a large size of disk, so is there a way (other than symlink) to move some files to other drive? 2) or add more drives to list in 'innodb_data_file_path' option. Question for point 2: Is that good enough solution? I would appreciate if you could share any other solutions that worked for you in large systems: some sort of sharding or else? UPDATED: Title of question updated - hopefully new one is more concrete. |
export (mysqldump) databases from MySQL version 4.0? Posted: 22 Sep 2013 10:22 AM PDT Goal: export the schema and data from a MySQL version 4.0.16 DB. Background: I was asked to migrate a database from MySQL version 4.0.16. The database was installed on a Windows XP machine, and I just could not find mysqldump tool on that machine. I then putty into a linux machine that has mysqldump. I ran the command, but got an error: I looked up mysql reference. INFORMATION_SCHEMA is something new to version 5 and above. This means the mysqldump on the linux box is incompatible with the production MySQL server which is on v4.0.16. I tried to download Mysql 4.0 server and install it on a windows machine so that I can get hold of a compatible version, but searching on Mysql website found nothing older than 5.0. (I also tried Mysql workbench to connect to this DB. Failed. "Unknown character set utf8") So how can I export the schema and data at all from this legacy mysql DB???... |
Optimizing mysql queries running on 50 million rows Posted: 22 Sep 2013 07:39 PM PDT Is there any technique/advice in order to optimize the performance of the queries below? According to my needs, my average db size will be approximately 30mill. rows per day, so every second less, will make huge difference. My DB engine is innoDB and I'm using 1 core CPU, with 2GB RAM. Exec Time : 7,5 sec (5,5 mil. rows) Exec Time : 88,4 sec (5,7 mil. rows) Any help would be appreciated. |
Posted: 22 Sep 2013 01:22 PM PDT In the past I thought I'd deleted hypothetical indexes using either a DROP INDEX statement for clustered indexes and DROP STATISTICS statement for non-clustered indexes. I have a database that is full of DTA remnants that I would like to cleanup; however, when I try to drop the object I always receive an error telling me that I cannot drop the object "because it does not exist or you do not have permission". I am a full sysadmin on the server so would expect to have rights to do anything. I've tried this with both DROP STATS and DROP INDEX statements but both give me the same error. Has anyone deleted these before and is there a trick I'm missing? Addendum Poking around in this, I just noticed that if I R-Click on the object, both the 'Script As' and 'DELETE' options are greyed out. |
Avoiding performance hit from GROUP BY during FULLTEXT search? Posted: 22 Sep 2013 11:22 AM PDT Is there any clever way to avoid the performance hit from using group by during fulltext search? In this example it's fetching the lowest post_id for unique topic_ids that match the text. With the group by to find the min, it's taking 600ms in a million row database, with about 50K rows examined. If I remove the MIN but leave the GROUP BY, it's the same slowness, so it's the GROUP hit. I suspect this is because it can only use one index, the fulltext ? Without the GROUP BY it's 1ms so this has to be filesort speed? (I've removed ORDER BY and everything else to isolate where the hit is) Thanks for any insight and ideas. (using MyISAM under mariadb if it matters) |
AWS performance of RDS with provisioned IOPS vs EC2 Posted: 22 Sep 2013 12:22 PM PDT Has anyone done a performance comparison of AWS RDS with the new provisioned IOPS vs EC2? I've found plenty of non-high IOPS RDS vs EC2 but nothing with the new high IOPS feature in RDS. |
sp_startpublication_snapshot Parameter(s) Posted: 22 Sep 2013 07:22 PM PDT I am creating a stored procedure that:
Here is my new brick wall... On this DB server, I have a 'shell' db that they will be running the SP from, that has a history table so I can keep track of who created/deleted databases using my SP's... The only parameter for sp_startpublication_snapshot is @publication... I can give it the publication name, but since I am not running it from the publishing database, how do I specify the publishing database? i.e.: the publication shows up as: but I am running the script from the database [WC_QACatalog] Any ideas about how to accomplish this? Thank you, Wes |
How do I determine if FORCE LOGGING is on for the entire database? Posted: 21 Sep 2013 10:32 PM PDT How can I determine if force logging is on, at the database level. (Not asking about finding out if force logging is on for particular tablespaces.) What rights are needed to perform the check of the above. (I have SELECT_CATALOG_ROLE, but other than that, pretty limited rights.) I've tried to find out how to query from the Reference and the Administrator's Guide manuals. Version: |
How to show the column names of a table with a simple sql query? Posted: 22 Sep 2013 04:56 AM PDT The case is simple: You have an mysql database where you have only sql query interface and you want to know the database structure with queries. You can list tables with ( |
What are the main differences between InnoDB and MyISAM? Posted: 21 Sep 2013 10:40 PM PDT What are the main differences between InnoDB and MyISAM? |
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