[how to] Transfer data from multiple different servers to single database server |
- Transfer data from multiple different servers to single database server
- DR - Moving databases from Active/Active cluster to Standalone server with LUN sync
- Ubuntu / MySQL - How to choose from the various downloads?
- How to create Database in MS SQL 2012 from lot of XML and XSD
- Select first row (grouping) + add aggregate function
- MySQL - Index on a query with order
- Does MySQL 5.6 support fan-in replication?
- Oracle - Best way to export 30 million rows to csv
- Different Result When Insert Data Contain Quote on Localhost and Online MySQL Hosting
- Can I use Try_Cast to give me a query result column with different datatypes?
- How can I copy a user while preserving all privs?
- What's the meaning of the Collation Code (blank, 90, 100, 110) in SQL Server 2012
- MySQL InnoDB does not return the last row on select with DESC order
- How would i make online exam application? [closed]
- Working Linked Server Query fails in sp_send_dbmail
- Same Parameter in MySQL Stored Procedure
- Changing PostgreSQL port using command line
- Real-Time Merge of two SQL Server databases on different servers
- Is it possible to backup an sql database if it's status is not online?
- Windows Server 2008 R2, Active Directory, and Oracle Database Server
- What's are the different ways to keep track of active and archived data?
- Database stuck in restoring and snapshot unavailable
- Database design - do I need another table?
- event scheduler not called
- How can I improve my table design for different types of an entity?
- FETCH API_CURSOR causing open transaction in tempDB
- What's the best way to backup DB files via network on Linux and Solaris machines?
- Cannot find MySQL Server Config Wizard for MySQL 5.6 build
- What causes InnoDB to write 100% more pages while slowing down answering queries?
- Get the rank of a user in a score table
Transfer data from multiple different servers to single database server Posted: 03 May 2013 05:28 PM PDT I am trying to transfer a particular table from multiple different servers(30) into one server.I do not want to create 30 different ole db source and merger them. Is there a simple way to resolve this issue? Thanks! |
DR - Moving databases from Active/Active cluster to Standalone server with LUN sync Posted: 03 May 2013 07:27 PM PDT We have an active/active cluster on LUNs (with one named instance on each node and a total of an 100 DBs) For DR purpose, LUNs will be replicated (with same drive letters) and attached to a standalone server with same configuration of SQL Server but not same Windows Server editions (enterprise vs standard, but i don't think it may be an issue), and the two same named instances pre-installed. I proposed the Attach / Detach solution, with a script that auto-generate the attach / detach to simplify the tasks, and other scripts to copy Logins, jobs and so on. Other DBA said a better option will be to rename the MASTER and MSDB databases from the pre-installed named instances on standalone server with _old, and to attach the MASTER / MSDB databases from Cluster node instance to both corresponding named instance in standalone instance. He said it works and had tested it. However, I've never heard of such a solution nor can i find any documentation of it. I would like to hear some other opinions. Thank you, Kukah |
Ubuntu / MySQL - How to choose from the various downloads? Posted: 03 May 2013 05:02 PM PDT I have Ubuntu 12.04.2 LTS. I would like install MySQL 5.5.29. So I go to the MySQL 5.5 archive page Here I see the following options: There appear to be duplicates here, so I hover the mouse over the links. My operating system, Ubuntu 12.04.2, is 64 bit, so that rules out #2 and #4. I assume the .zip is for Windows, so that rules out #6. That leaves #1, #3 & #5. Please explain how I choose from these remaining options? Perhaps Ubuntu is considered similar to Debian so thats what I should choose? |
How to create Database in MS SQL 2012 from lot of XML and XSD Posted: 03 May 2013 05:55 PM PDT I´m new in programming form MS SQL 2012. I got few thousands of XML data and several tens of XSD, which having a dependency among themselves, and comes form one huge database. I would like to create a tables by the XSD definitions and populate the tables from XML data. I´m working with Microsoft SQL Server 2012 and Visual Studio 2012. Please can anyone help me, how to do that?? I tried many ways - for example I tried to create XML Schema Collection from XSD in T-SQL (CREATE XML SCHEMA COLLECTION - http://msdn.microsoft.com/en-us/library/ms176009.aspx) but did not find how to do this from file. So I tried VS 2012, but advices and guidance are only for VS 2010 (for example http://msdn.microsoft.com/en-us/library/dd193276(v=vs.100).aspx) and in VS 2012 it´s seems to be different. I´m starting to be desperate, so I´d like to pleased you for any help or advice how to solve this problem whether or not it is necessary to first create the XSD schema and then perform the XML. Thanks a lot! |
Select first row (grouping) + add aggregate function Posted: 03 May 2013 03:03 PM PDT First have a look at this question on StackOverflow. I'm looking to accomplish the same task, except I also need to add an aggregate function (PostGIS's How can I combine the answer using I've tried: Which screams: column "zones.gid" must appear in the GROUP BY clause or be used in an aggregate function Which is strange, because if I remove |
MySQL - Index on a query with order Posted: 03 May 2013 01:29 PM PDT I have the following table with >1M rows: And I'm doing the following query to get the newest places added to that wishlist: I thought the index 'new_places_on_wishlist' would work for this query, but it uses the index 'wishlist_place_unique' instead: UPDATE I've noticed that the index that works best is: but I still have to use the USE INDEX statement: Why does MySQL takes the UNIQUE index first? The order for the indexes are fields in where, fields in order, fields in select? -- And another related question, if I do a JOIN with the city table to get the wishlists of that city, is the index |
Does MySQL 5.6 support fan-in replication? Posted: 03 May 2013 03:01 PM PDT I've known for quite awhile that Continuent's Tungsten Replicator supports fan-in replication (example). By fan-in replication I mean combining multiple datasources into a single instance (like a datawarehouse). I recently came across this MySQL deck that seems to suggest that this could be done with MySQL 5.6. Specifically slide/page 35 says "Arbitrary Topology" under Topologies:. Can someone confirm that fan-in replication is possible with MySQL 5.6? Has anyone setup this topology in 5.6? Thanks! |
Oracle - Best way to export 30 million rows to csv Posted: 03 May 2013 11:30 AM PDT I have a query that hits multiple tables in an ORACLE db (11g). I don't have access to the db machine itself. I use sql developer or sqlplus to connect. there are about 31 million rows, and 7 columns, and I want to dump it into a csv. Looking to learn about the various/best options for this case. |
Different Result When Insert Data Contain Quote on Localhost and Online MySQL Hosting Posted: 03 May 2013 06:25 PM PDT I installed xampp on localhost and insert data contain quote using this php code The result on localhost website is The row on database filled with this But using the same code to insert data the result from my hosting provider is different The row on database filled with this I test my website on localhost, insert post contain quote and it show on page correctly. Then i surprise when i upload on online hosting, insert post and the post page show '\' before the quote. At this time i replace the '\' with nothing. How to insert the quote so it can show same result on local mysql database and online mysql database ? What is wrong, my php code or my mysql database ? |
Can I use Try_Cast to give me a query result column with different datatypes? Posted: 03 May 2013 11:53 AM PDT I have a column that is varchar(max). It contains mostly valid XML. But sometimes it has invalid xml (that I still need). I am trying to make a view for this table that allows the value to display as XML (with the nice link feature that comes with SSMS) when the data is valid XML, but still shows the string when it is invalid XML. Like this: I think that this is a lost cause, because SQL Server will not allow a result to have more than one datatype. But I thought I would ask the experts just to be sure. |
How can I copy a user while preserving all privs? Posted: 03 May 2013 08:48 AM PDT We're changing domains. I'd like to create a new account for myself, I can easy assign the new login the same database roles. However, I'd like to associate the new login with the same users. Sadly, it seems that a user can have only one login. So what are the alternatives? I could create the new login with a temporary user, reassign ownership of schemas, drop the old dbo user, and finally rename the new user. However, this would strip some privileges from the old login. In practice this may not matter, but I don't like the idea of cutting off any of my own privs before the new account is available. The Is there a workaround, or am I perhaps trying to fix the wrong problem? |
What's the meaning of the Collation Code (blank, 90, 100, 110) in SQL Server 2012 Posted: 03 May 2013 07:57 AM PDT During the installation of SQL Server 2012, in the Collation tab, i can choose between French_CI_AS and French_100_CI_AS. What do they mean and which one is newer? When there's no Code, is it newer or older than the 100? |
MySQL InnoDB does not return the last row on select with DESC order Posted: 03 May 2013 09:09 AM PDT We have a table scheme like following: On each new offer by the user we check if the last order is given by the same user with: if the user_id is same we prevent the new offer to protect the user from accidental double clicks. if there is not any problem with the offer we insert the offer with: But the problem is the select only returns the last inserted row after about 1 second. That means the user can insert multiple offers if they click the button too fast. We use 5.5.30-30.2-log Percona Server as our database server. Following is our my.cnf file: |
How would i make online exam application? [closed] Posted: 03 May 2013 04:55 AM PDT
So, I want to know what will be the database structure for this. |
Working Linked Server Query fails in sp_send_dbmail Posted: 03 May 2013 10:40 AM PDT Take the following example: This is giving the following error (even when ran under a windows credential that has sysadmin privileges to both servers): Now, the linked server in question is configured as follows (note the use of Here is where it gets funky: If I run the following in SSMS manually (i.e. not within So the linked server IS working, its just So next I assumed it was a problem with the credential being used by the SQL Server services (including agent) - both of these are running as a I have double checked the protocols enabled on the native client (on both servers), TCP is definitly enabled on both servers and as I say, it works fine when not ran within To confirm This returned the The last part of the error mentions something about the registry but I don't understand why that would only be effecting My question: how do I get this linked server query to work in sp_send_dbmail when it works fine outside sp_send_dbmail? PS: articles like this get round the issue by providing different credentials on the linked server - this isnt an option as this Linked Server is used by hundreds of other cross-server queries and they are all working fine. Similar Issues: |
Same Parameter in MySQL Stored Procedure Posted: 03 May 2013 08:56 AM PDT How do I cache dynamic query from store procedure? Right now I have created my store procedure like this : But this kind of query does not cached. so, every time it gets more time to execute/process query. Now I have tried some other method like this: In the above case I have to pass same variable (@UserID) twice, because it is used 2 times in my query. but this job is very hectic in long or complex query. so, how do I avoid this? One another method I tried as follows: But above query again does not cached. so, execution time is very long. and this type of variable declared as session global variable has may be conflict with another store procedure's variable. because I have call store procedure within this store procedure and variable name should be same in another store procedure. So, let me know what is the best solution for the same. Thanks. |
Changing PostgreSQL port using command line Posted: 03 May 2013 10:05 AM PDT My PostgreSQL default port is 5432, I want to change default port by using command line (in Windows 7). I saw this solution before: http://stackoverflow.com/questions/187438/want-to-change-pgsql-port I tried running the following command, but it failed: Could someone tell me how to change port in using command line? |
Real-Time Merge of two SQL Server databases on different servers Posted: 03 May 2013 06:26 AM PDT One of our customer requirements is to merge two databases on two different machines in a real time context. This means that we have to build some sync policy (or use SQL Server Tools to manage that). But I have some doubts:
Thanks! |
Is it possible to backup an sql database if it's status is not online? Posted: 03 May 2013 04:56 AM PDT We have an sql job which backs up all database in the sql server every night(excluding tempdb) whose state is 0 (online), but due to some reason it didn't back msdb. So the issue is at that time msdb state was other then 0. So my question is : is it possible to backup an sql database if it's status is not online (either RESTORING, RECOVERING, RECOVERY_PENDING, SUSPECT, EMERGENCY)? |
Windows Server 2008 R2, Active Directory, and Oracle Database Server Posted: 03 May 2013 05:03 AM PDT I have a group of clients, Windows server 2008 R2(Active Directory Installed in it), and an oracle database Server I Want to know how to make the configuration of the following Diagram in this link: So how to configure the clients to reach the database server through the active directory? Update If Active Directory is not of any use here (as comments suggest), is there another way I can do remote routing from clients to the DB server through a proxy? |
What's are the different ways to keep track of active and archived data? Posted: 03 May 2013 07:05 PM PDT I'm looking for different ways to keep track of both active and archived data so I can pro and con them. The system: I have a computer with a database on it. The database has several tables in it; one of which contains a list of users that can use the computer; and several tables for auditing (user 1 did this, user 2 did that, etc). This database is a slave of a master database in which a Content Management System is used to say, add a new user and see reports on what user did what. Example: As stated above, I have a table (lets call it users) that keeps track of all the users that are allowed to use the computer. As time goes by users will be added and removed. The problem is the audit tables keep track of a user ID so if the user is removed I lose the user information because the rows can't be joined. One idea I had was to use MySql's triggers so that if a user is added, an insert trigger is triggered and inserts a copy of the data to an 'archived' user table (lets call it users_archive). That way the computer can use users to determine if the user has permission to use it and reports can use users_archive for reports. This seems like the easiest and most simple way to do it, but I can't find any other ways via google search to see if there are any other ways to do something like this. |
Database stuck in restoring and snapshot unavailable Posted: 03 May 2013 11:05 AM PDT I tried to restore my database from a snapshot. This usually took around a minute to complete the last couple of times. When I did it today, it didn't complete for around 30 minutes and the spid was in a suspended state. I stopped the query and now my database is stuck in restoring state and my snapshot is unavailable. Am I screwed? |
Database design - do I need another table? Posted: 03 May 2013 08:05 PM PDT I am trying to make a database that follows a form that the company uses. When a client walks in the membes of staff have to fill in a form and the data is recorded. The form on paper is 10 pages long. The first time a client is seen the entire form is filled in and the client gets a clientID. I have split the form into sections that make sense like accommodation and employment. I know I can link these tables together with the clientsID. Thats the simple part. Now when a client returns the form comes out again but this time only certain parts are filled in, what ever the clients needs are. The records for most parts don't need updating but a new record needs inserting. what would be the best way around this. So at the moment I have for example a table called client with an id and name another table called accommodation with clientid and address and another table employment with clientid and employer. But how do I go about it when a client comes in to let us know he has a new employer. I cant update the current one as that is needed but I would need to add new record for the client. Would this mean I would have to add a look up table for all my current tables? |
Posted: 03 May 2013 02:05 PM PDT I had created one event scheduler which looks like this This events has not called on 1st of month. So i tried so NULL in db col means that no DB is assigned to it? Please help me to solve it. |
How can I improve my table design for different types of an entity? Posted: 03 May 2013 06:05 PM PDT Consider an accounting system as an example. I have an Entity called Currently, I come up with the following design: But I don't think my design is efficient enough (or even correct and free of errors). What would you suggest? Also, if this is important in any way, I am planning to utilize MariaDB. |
FETCH API_CURSOR causing open transaction in tempDB Posted: 03 May 2013 03:05 PM PDT A select statement run from Oracle 11gR1 to SQL Server 2005 using Gateway leaves an open transaction in tempdb. The user is a datareader in Database XYZ. Not sure why the open tran is in tempDB when the statement run is SELECT. Any one had seen this issue before ? Thanks in advance sekhar |
What's the best way to backup DB files via network on Linux and Solaris machines? Posted: 03 May 2013 08:17 AM PDT I wonder what the best way to backup files via the network. I have Solaris machines with Oracle 10i on a Veritas cluster. Machines are connected to EMC storage. The What I want is to backup the I checked and found some ideas to do that. For example the first option is to use The second option is transfering the files with and so on. I need advice on what is more reliability from the options above, and maybe on what other good options there are for this. |
Cannot find MySQL Server Config Wizard for MySQL 5.6 build Posted: 03 May 2013 01:05 PM PDT Not sure if this is the right Stack Exchange site for this but... I am trying to reconfigure my mySQL instance but cannot find the config wizard. I looked here: http://dev.mysql.com/doc/refman/5.0/en/mysql-config-wizard-starting.html As one user pointed out, the config |
What causes InnoDB to write 100% more pages while slowing down answering queries? Posted: 03 May 2013 06:05 AM PDT I have a somewhat big database server: 4 processors, 32 cores, 288GB RAM, 2 ethernet cards bounded together, 2 independent RAID controller cards with 1GB cache each, 24 2.5" disks, being 8 SAS, 15KRPM, in the data partition in RAID10, and 3 SSD, in the Journal partition in RAID5, and 2 SAS, 15KRPM in RAID 1 for the operating system. The data partition has it's own RAID controller, and the O.S. and Journal share the other card. I'm running Ubuntu 12.04.1 LTS and MySQL 5.1.56 with InnoDB plugin 12.7 from Percona on top of that. To the Data Partition MySQL writes indexes and data files; to the Journal partition it writes binary logs, slow and error logs, and innodb journal files. In the last few weeks I've been observing some weird behaviour: MySQL slows down answering to queries, and at the same time doubles the "InnoDB Buffer Pool Pages Written" metric. At the same time, I see InnoDB Log buffer filling up 5 times the usual levels for the usual workload. Also, I don't observe any mutex and lock granting activity changes on the graph. This is my current configuration: And this is my current filesystem organization: Can you please help me understanding what is going on with my database server? Why is it slowing down service and increasing the InnoDB Buffer Pool Write activity? |
Get the rank of a user in a score table Posted: 03 May 2013 09:43 AM PDT I have a very simple MySQL table where I save highscores. It looks like that: So far so good. The question is: How do I get what's a users rank? For example, I have a users An Example In this very case, The query should return one row, which contains (only) the required Rank. |
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 |