[how to] Separated databases, separeted datas |
- Separated databases, separeted datas
- SQL Server media belongs to which edition
- Hard Parse on Non-Identical Statements?
- Which triplestores have support for full-text search
- Find a string in MS SQL database
- Database Design - different objects with shared tagging
- Replication issue - CREATE SELECT alternative?
- Difference between return next and return record
- sql xml performance
- How to take a database dump for selective set of values in few tables?
- Postgres error ( XX000: invalid memory alloc request size 4294967290 )
- Is it possible to use two different drivers for sql server on the same machine. Say 2000 and 2008
- Different results rebuilding an index online and offline
- How might a corrupt partition in TempDB result in DBCC CHECKDB reporting no issue?
- Better query to select multiple columns into a single output column?
- Unrecognised system process saturating CPU
- Why can't RDBM's cluster the way NoSQL does?
- How to set Password for sqlplus /as sysdba
- Downloading image data type contain to desktop SQL Server 2008
- SQL Server replication subscriptions marked as inactive
- SQL Server script to delete accounts no longer in Active Directory
- How to Convert Horizontal to Vertical Array?
- How to script out push subscription creation at the subscriber?
- How can I create a MySQL database based on a SQLite schema?
- Can I monitor the progress of importing a large .sql file in sqlite3 using zenity --progress?
- Is there any benefit to defragmenting SQL indexes in a SAN environment?
- Transactional Replication snapshot locking Publisher db from beginning
- Should I index a bit field in SQL Server?
Separated databases, separeted datas Posted: 01 Mar 2013 08:42 PM PST We have a global project. We will have some servers all continents. We separate the datas because it is not necessary that they be in one place together. BUT! We need unique IDs (MySQL, InnoDB). I have two ideas.
Have anybody other idea? I made some fast benchmark, and I don't find differents the integer or varchar primary key. |
SQL Server media belongs to which edition Posted: 01 Mar 2013 06:59 PM PST Could anyone please help me on below question? Without installing SQL Server media 2008 and 2012, how can we know that the media belongs to which edition (like developer, standard or enterprise....etc)? Thanks! |
Hard Parse on Non-Identical Statements? Posted: 01 Mar 2013 06:10 PM PST Let's say I have this query : If I run it for the first time then it would do a hard parse. After that, I run this query : With just a difference in alphabetical upper and lower case, does it mean they have to do the hard parse again? Thank You. |
Which triplestores have support for full-text search Posted: 01 Mar 2013 03:33 PM PST Which RDF triplestores support full-text search and what performance can be expected from them. I am assuming that they will have to extend SPARQL in some way as the only way that I can think of for performing full text search currently is to perform a regular expression filter against all literals returned by the SELECT. |
Find a string in MS SQL database Posted: 01 Mar 2013 01:51 PM PST I have an application which has logged an error like The application store all its information in MSSQL database which contains 100+ tables. For sure somewhere there must be a table which contains all the objects of this type and I'm sure How can I find this object ? Do I have to create 100+ |
Database Design - different objects with shared tagging Posted: 01 Mar 2013 03:56 PM PST My background is more in web programming rather than database administration, so please correct me if I'm using the wrong terminology here. I'm trying to figure out the best way to design the database for an application I'll be coding. The situation: I've got Reports in one table and Recommendations in another table. Each Report can have many Recommendations. I also have a separate table for Keywords (to implement tagging). However, I want to have just one set of keywords that gets applied to both Reports and Recommendations so that searching on keywords gives you Reports and Recommendations as results. Here's the structure I started out with: Instinctively, I feel like this isn't optimal and that I should have my taggable objects inherit from a common parent, and have that comment parent be tagged, which would give the following structure: Should I go with this second structure? Am I missing any important concerns here? Also, if I do go with the second, what should I use as a non-generic name to replace "Object"? |
Replication issue - CREATE SELECT alternative? Posted: 01 Mar 2013 09:02 AM PST I've an MySQL 5.1 slave for our BI team. They need to make some CREATE SELECT with big select queries (several million lines). As CREATE SELECT is a DDL, if the replication attempts to update some rows in same tables than the SELECT statement, replication is blocked until the freeing of the CREATE SELECT. Do you now a good non-blocking alternative to thoses CREATE SELECT statements? I thought to an SELECT INTO OUTPUT FILE then LOAD DATA INFILE but they will fill out our disks as BI guys like to do... :) Max. |
Difference between return next and return record Posted: 01 Mar 2013 11:00 AM PST What is the difference between |
Posted: 01 Mar 2013 03:17 PM PST I have a sql table with I need to add The question is:
|
How to take a database dump for selective set of values in few tables? Posted: 01 Mar 2013 10:52 AM PST How do I write a dump command which does the above? |
Postgres error ( XX000: invalid memory alloc request size 4294967290 ) Posted: 01 Mar 2013 01:22 PM PST I'm getting the following error in my postgres 8.4 database: XX000: invalid memory alloc request size 4294967290 Operating System : Windows 7 64 bit Memory : 8GB Database Version: Postgres 8.4 server I cannot back up my database; I can't even view the data using SELECT. The server gets automatically stopped when I try to do this. Also posted:
i added the screen shot of the error which occurred during executing the following select * from < tablename > ERROR: invalid memory alloc request size 4294967290
ERROR: invalid memory alloc request size 4294967290 SQL state: XX000 |
Is it possible to use two different drivers for sql server on the same machine. Say 2000 and 2008 Posted: 01 Mar 2013 08:02 PM PST I am trying to use two versions of sql server on the same machine. I have sql server 2000 driver installed on the system. Can I also install sql server 2008 driver on the same machine and use both side by side? |
Different results rebuilding an index online and offline Posted: 01 Mar 2013 04:10 PM PST I have a non-clustered, non-unique index on a foreign key column of type When I run the same rebuild index offline, the average fragmentation is 25%, with 4 fragments and 28 pages. This is the query, with names redacted. What could be causing this difference? The same situation occurs on multiple tables. |
How might a corrupt partition in TempDB result in DBCC CHECKDB reporting no issue? Posted: 01 Mar 2013 10:01 AM PST One of our SQL Servers reported the following error recently: Less than 15 minutes later I connected to the server and ran: Which returned 'tempdb'. I then ran: Which returned no results, indicating no issues with the database affected. How could corruption in the database result in the error message above yet Once a page is marked 'suspect', how can it be marked not-suspect, or fixed, or reused, or whatever such that Edit: 2013-02-27 13:24 Just for fun, I tried to recreate the corruption in TempDB assuming a #temp table was the culprit. However, since I cannot set the Instead of using If you stop the instance, TempDB is automatically recreated at next startup; hence that won't do the trick either. If anyone can think of a way to recreate this corruption, I'd be willing to do further research. In order to test the hypothesis that a corrupted page cannot be fixed by At this point you get disconnected from the database engine, so reconnect to continue. Corruption is reported here. Corruption is reported here, Edit #2, to add the @@VERSION info requested. Returns: I know this is the Evaluation Edition, we have keys for the Enterprise Edition, and will be doing an Edition Upgrade soon. |
Better query to select multiple columns into a single output column? Posted: 01 Mar 2013 09:59 AM PST I have the following query that sort of works, but I find it to be kludgy and inefficient. Is there a better way to write this query? I know this is a bit of an odd query, else I would probably have found some advice when searching, but it is necessary for our business logic. We've been doing this in Hibernate queries and using software to output the file but we're needing to improve performance drastically and that means using raw sql. The output of this query is to be used to partially populate a helper table that we query to figure out which of our 40-odd product tables a particular item is contained in. Could the following query be replicated using something like Input looks like the following table: | PN1 | PN2 | PN3 | PN4 | MFG | TableId | OtherData | ----------------------------------------------------------------------- | asdf | abde | 12354 | asdfc | 2 | 26 | 0.2456 | | nupo | 1354 | null | null | 2 | 26 | 1.53 | | ... | ... | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | ... | ... | I want the output .dat file to look like this: "Pn","Mfg","TableId","SourceColumn","OtherData" "asdf",2,26,"PN1",0.2456 "abde",2,26,"PN2",0.2456 "12354",2,26,"PN3",0.2456 "asdfc",2,26,"PN4",0.2456 "nupo",2,26,"PN1",1.53 "1354",2,26,"PN2",1.53 ... ... ... If I take the | Pn | Mfg | TableId | SourceColumn | OtherData | ----------------------------------------------------------------- | "Pn" | {blob} | "TableId" | "PN" | {blob} | | "asdf" | {blob} | "PN1" | "PN1" | {blob} | | "abde" | {blob} | "PN2" | "PN2" | {blob} | | "12354" | {blob} | "PN3" | "PN3" | {blob} | | "asdfc" | {blob} | "PN4" | "PN4" | {blob} | | "nupo" | {blob} | "PN1" | "PN1" | {blob} | | "1354" | {blob} | "PN2" | "PN2" | {blob} | | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | |
Unrecognised system process saturating CPU Posted: 01 Mar 2013 10:14 AM PST We have switched to our backup DC today as primary site Bandwidth has gone. We are getting issues with the most powerful DB server; it is spawning the following process for several db's on the server. One database is simply a small scratch db that is used for maintenance tools, so not replicated or mirrored. Does anyone know or recognize the following code? |
Why can't RDBM's cluster the way NoSQL does? Posted: 01 Mar 2013 05:39 PM PST One of the big plusses for nosql DBMS is that they can cluster more easily. Supposedly with NoSQL you can create hundreds of cheap machines that store different pieces of data and query it all at once. My question is this, why can't relational DBMS do this like mysql or sql server? Is it that the vendors just haven't figured out a technical way to do this with their existing product, or is there some issue with the relational model that prevents this from being feasible? What is so great about the NoSQL way of storing and accessing data (key/value, documents, etc) that makes clustering easier, if this is true at all? |
How to set Password for sqlplus /as sysdba Posted: 01 Mar 2013 03:07 PM PST I am new to Oracle. I would like to know how to set login password for sqlplus / as sysdba in oracle 11g. I want to set the password for my next login, i dont want to login as sqlplus / as sysdba since anyone can log in using sqlplus / as sysdba and can easily access the data or change password for the existing user.I need to restrict the login. Say in a company 5 peoples are working and they are accessing the server with Admin userid and password to login the system and if some-one changes some modifications in the server using sqlplus / as sysdba it will affect the rest of the peoples right so in-order to avoid we need to restrict the login by setting password. Thanks |
Downloading image data type contain to desktop SQL Server 2008 Posted: 01 Mar 2013 01:30 PM PST I am very new to SQL Server 2008 and question may look very basic to gurus. Following in the problem universe.
Table looks like following Table name : Columns : |
SQL Server replication subscriptions marked as inactive Posted: 01 Mar 2013 11:30 AM PST Is there any way to force SQL Server NOT to mark subscriptions as inactive, ever? It happens sporadically when there are connection issues and I don't want to have to reinitialize the subscription every time. Note, I'm not talking about the subscriptions being marked as expired...just as inactive. Thank you. |
SQL Server script to delete accounts no longer in Active Directory Posted: 01 Mar 2013 04:07 PM PST We have a SQL Server 2000 that will shortly be migrated to SQL Server 2005. It has years of Windows Authentication accounts created that no longer exist in Active Directory, which prevent the Copy Database Wizard from creating these accounts on the new server. Is there a script or some automated way of deleting the accounts that no longer exist in our Active Directory? EDIT: Just to be clear, the logins needing to be deleted are on SQL Server 2000, which does not support the Separately, manually deleting the logins in SQL Server 2000 would (I think) be done with Just to add to the confusion, EDIT 2: Finally resolved the issue. Many of the logons that were problematic were programmatically added to the database, and while they worked in the sense that a user could connect, the username vs NT login name had a mismatch of domain-prefixed logons when SQL Server expected no domain, and vice versa. To resolve this, I modified the sp_droplogin procedure to take out one of the checks that was erroring. I'm accepting my own answer as it works in SQL Server 2000. |
How to Convert Horizontal to Vertical Array? Posted: 01 Mar 2013 09:30 AM PST I need to create a query (suitable for Standard Edition) that has data from multiple columns (Columns 1-6 with corresponding Sample data: |
How to script out push subscription creation at the subscriber? Posted: 01 Mar 2013 10:30 AM PST I'm trying to set up a push subscription to a SQL Server publication from the subscriber. I could set up the subscription at the publisher using the Replication Wizard in Management Studio. However, I would prefer to script the process relative to the subscriber so I can automate the deployment of a new SQL Server subscriber instance. Initially, I'm happy to prompt for the name of the publisher before deployment. If I can get this working, I will look for a way to inject the correct value for my environment automatically. What is a simple way to do this for a SQL Server instance that has to create multiple subscriptions at different publishers? I'm open to using any supported SQL Server scripting solution: SMO, RMO, Sqlcmd, WMI, PSDrive, even pure T-SQL. I've attempted to solve this problem in two ways. The first is a complete solution using T-SQL, but it involves some manual steps. Using T-SQLI have a manual solution in T-SQL. The solution is based on the output of the Management Studio Replication Script Generator output. Using Management Studio, I run the following script to generate a T-SQL script that I can run at the publisher: On the MYSUBSCRIBER instance, the output would look like this: I copy the output and execute the script at the publisher instance to set up the subscription. I think I can't automate this in pure T-SQL without editing the script before running it, because T-SQL by design does not handle user input. Using PowerShell and RMOPowerShell has simple ways to process user input, so this seems like a good way to prototype the automation process. MSDN has an eight-step guide to set up a push subscription using the .NET Replication Management Objects (RMO). Here are the first two steps:
I'm trying to translate these steps into a PowerShell script, but I can't get past step 2. In the following code examples, I use fictional object names. I believe this does not affect the answerability of the question because the error message is identical when I use the real object names. First attempt: setting the propertiesMy first attempt is to create the TransReplication object then set its properties. The code looks like this: When I execute this script, I see the following error: It looks like it's failing becuase it can't convert the type Second attempt: overloading the constructorMy second attempt is to specify the property values of the TransReplication object in the constructor. The code looks like this: When I execute this script, I see the following error: It looks like the New-Object cmdlet can't find the three-argument constructor documented by MSDN:
As far as I can tell, I'm overloading the constructor correctly. Am I doing something wrong? Is there something unusual about my environment? Am I better off using another solution? |
How can I create a MySQL database based on a SQLite schema? Posted: 01 Mar 2013 02:52 PM PST I have MySQL on my server and different SQLite databases on a client. I'm trying to find a way to create the same databases on the server. Since a SQLite schema is actually a This seems quite a complex and hard-to-cover-all-situations method. I am wondering if there is any alternatives? |
Can I monitor the progress of importing a large .sql file in sqlite3 using zenity --progress? Posted: 01 Mar 2013 12:30 PM PST I'm trying to monitor the progress of a sqlite3 command importing a large .sql file into a database using I've tried the following which will import the file, however progress is not shown: I know I need to provide Can anyone help me? |
Is there any benefit to defragmenting SQL indexes in a SAN environment? Posted: 01 Mar 2013 09:21 AM PST Our SQL server lives on a SAN. It contains dozens of OLTP databases, some with several tables containing over 1m records. We have been running Ola Hallengren's index maintenance scripts weekly, and it runs for several hours each time. Based on the fragmentation threshold, the script will either reorganize or reindex an index. We have observed that during reindexing, the log files get huge which leads to an excessive consumption of bandwidth during the log shipping. Then comes an article from Brent Ozar in which he says to stop worrying about SQL indexes:
Googling this question leads to varying opinions, most supported with arguments that seem too brief or weak. Our tentative plan is to adjust the fragmentation threshold in our maintenance script so that it reorganizes much more often than it reindexes. What is the final verdict? Is it worthwhile to defrag SQL indexes on a SAN considering the burdens associated with running weekly maintenance jobs? |
Transactional Replication snapshot locking Publisher db from beginning Posted: 01 Mar 2013 10:42 AM PST I have recently upgraded my remote distributor to 2008r2. I am getting complete system locks when attempting to generate a new snapshot in the day when we have added an article to the publication (we could do this in the past with very little issues). I have checked I have been trying to following this link as I am only adding an additional table with 26 rows but don't want to reinitialize and have the whole snapshot delivered. http://deepakrangarajan.blogspot.co.uk/2009/01/sql-2005-transaction-replication-adding.html I attempted to run this code but this is also locking up the system completely. I guess I will have to run in the middle of the night but thought that you should be able to run this as just a config change to the publication. Also when I try the last step in the link to add it to the subscription I get the following error message
After the snapshot, how can I just have the new article added to the subscriber? |
Should I index a bit field in SQL Server? Posted: 01 Mar 2013 12:54 PM PST I remember reading at one point that indexing a field with low cardinality (a low number of distinct values) is not really worth doing. I admit I don't know enough about how indexes work to understand why that is. So what if I have a table with 100 million rows in it, and I am selecting records where a bit field is 1? And let's say that at any point in time, there are only a handful of records where the bit field is 1 (as opposed to 0). Is it worth indexing that bit field or not? Why? Of course I can just test it and check the execution plan, and I will do that, but I'm also curious about the theory behind it. When does cardinality matter and when does it not? |
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 |
The most effective method to Solve Error XX000 in PostgreSQL through PostgreSQL Relational Database Service
ReplyDeleteWhen you discover this blunder XX000 in PostgreSQL, it essentially means couldn't compose square. No space left on gadget. Extraordinary compared to other approach to settle this issue is it is possible that you need to run a less complex inquiry or to free up more space on the drive that holds. By along these lines you can essentially take care of this issue. Aside from that you can take fast help with respect to this issue through Cognegic's Postgres SQL Support for Linux or Postgres SQL Support for Windows. With our PostgreSQL Remote Database Service you can undoubtedly handle this issue in advantageous way.
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