[how to] How to to automatic faiolver in postgresql 9.1 |
- How to to automatic faiolver in postgresql 9.1
- Triggers, the flow of the program does not stop [on hold]
- Cannot install DB2 Express-C 10.1 on Mac OS X 10.7.5
- How to get "Lookup" functionality in Access when linking to a SQL table?
- Why won't Postgresql 9.3 start on Ubuntu?
- MySQL stores BLOB in innodb buffer pool (innodb_buffer_pool_size)?
- Recover original utf8 data from latin1 mysql db
- Populating joined tables
- Transactional Replication: When to delete the initial snapshot
- Append columns with values from has many reletionship
- Geography union via cursor returning null
- How to create a stored procedure with several delete in(select) statements?
- What can do a table constraint that a column constraint can't do?
- Storing statistic results
- Unknown column error with an index
- how to permanently enable query cache in mysql?
- How do you see which database on a Server uses most resources
- how to access my password in SSIS 2005 by VB.NET
- Grouping Selecting unique values in a single column [duplicate]
- Single disk for Data, System, User, Temp and Backup when installing Fail Over Cluster?
- Issues installing MySQL server on Ubuntu 13.04
- MySql one time event never runs?
- Slow SSRS Report in production
- Cannot install DB2 Express C 10.1 on Mac OS X 10.7.5 [duplicate]
- How to run a cold backup with Linux/tar without shutting down MySQL slave?
- sp_send_dbmail with attachment
- What is the best way to get a random ordering?
How to to automatic faiolver in postgresql 9.1 Posted: 02 Oct 2013 04:53 PM PDT I am new to postgresql, and i have a task of implementing replication and failover in postgresql database. We are using 2 nodes (1st Primary and 2nd Slave). I have configured the streaming replication in them and it works fine. But now i cant able to configure the automatic failover in them. When the primary goes down the slave should be promoted as a primary. I have tried Pgpool but after reading on some forums i dropped it, now planning to go for repmgr. Is repmgr as good one? and i need a step by step configuration of failover in postgres with repmgr. I have tried many scripts for failover but it seems to be not working. can anyone provide me a sample script for failover process. and steps to how to execute them. |
Triggers, the flow of the program does not stop [on hold] Posted: 02 Oct 2013 04:51 PM PDT I made a simple program on Oracle Forms. The code below is the trigger when the submit button is pressed. Here it is: When the form encounters errors, like when the second password (password2) does not match and when it shows the message saying 'Password did not match', it still flows and read the following statements instead of stopping and wait for the button to be pressed again. I hope I can fix this. tnx |
Cannot install DB2 Express-C 10.1 on Mac OS X 10.7.5 Posted: 02 Oct 2013 03:07 PM PDT I'm having troubles seting up DB2 Express-C 10.1 on my Mac OS X (v10.7.5). My initial install attempt failed, but then I found That seemed to work up to the point where I tried to start the db: OTOH, if I try to run db2setup from the expc directory I get and error message that others have seen. Something like Where the 5-digit number in the tmp directory name changes on each run. That is followed by a nice DB2 10.1 intro screen which is suddenly replaced by a blank DB2JDKTester window that says "DB2 SETUP LAUNCHPAD" at the top. Has anyone else tried to install DB2 on Mac OS X 10.7? (And, yes, I've seen the other thread with the same title, but that was never actually answered.) |
How to get "Lookup" functionality in Access when linking to a SQL table? Posted: 02 Oct 2013 04:24 PM PDT I am building a SQL database which will have an Access 2010 front-end. I would like some of the fields to be lookups in Access (ie the user clicks on the field in Access and a drop down populates). It is fairly straightforward to make a field a lookup for another table in Access but I can't seem to know how to do it in SQL and then propagate the changes. My SQL knowledge is very basic. Here's an example of how I am creating my SQL tables: I then connect to the database through the ODBC connection in Access. How can I create my tables in SQL so that the |
Why won't Postgresql 9.3 start on Ubuntu? Posted: 02 Oct 2013 02:02 PM PDT All, I have successfully installed Postgresql 9.3 from the APT repository on 2 VM's running Ubuntu 12.04 and 13.04...however, I cannot get it to install properly on my host machine running Ubuntu 12.04. The install (this time) seems to have gone ok, but perhaps there is an error I'm not understanding: So I then try to add myself as a postgresql user, but I get this: I cannot see Postgresql running in system monitor, and there is no file in the /var/run/postgresql/ folder... EDIT: On the VM's, there is a file in /var/run/postgresql/ called 9.3-main.pid So... what's going on here that isn't going on in my VM's? Like I said, the other installations on the VM's, including PostGIS and PGAdmin came in perfect...no idea why this host machine isn't going through... Any thoughts appreciated! -mb |
MySQL stores BLOB in innodb buffer pool (innodb_buffer_pool_size)? Posted: 02 Oct 2013 08:00 PM PDT I have several databases all in INNODB, 50GB are Does MySQL store the BLOB in RAM? If yes, how can I configure MYSQL so it doesn't use innodb_buffer_pool_size to store |
Recover original utf8 data from latin1 mysql db Posted: 02 Oct 2013 12:00 PM PDT We forgot to change charsets in our mysql db after migration on new server. Current situation: But table charset is utf-8: We're using Node.js (0.10.*) for backend and latest felixge node-mysql (connection is Before we've found incorrect config, there are a lot of messages saved to table (~4000), most of them are utf-8. Sure, currently we see a lot of question marks I've tried node-iconv, but no luck. Is there any chance to recover original utf-8 data? |
Posted: 02 Oct 2013 12:01 PM PDT I have student table which has column stu_id, name, date of birth etc and Marks table that has id stu_id as foreign key. I want to inser a stu_id say x in the student table and then have that same id be populated in the marks table as well automatically. I have joined the table using RIGHT OUTER JOIN. I am new to mysql and php. Please help. |
Transactional Replication: When to delete the initial snapshot Posted: 02 Oct 2013 12:02 PM PDT I would like to delete the initial snapshot after I setup transnational replication and everything is working fine. When is it OK to the delete the snapshot that initializes a subscriber? |
Append columns with values from has many reletionship Posted: 02 Oct 2013 04:14 PM PDT I have two tables Let say that there are 3 kinds of items. Chair, table and door. I would like to create a query that will produce table with following columns: If order has chair item, data in columns for chair will be displayed otherwise it will be empty. Why am I doing this? I would like to export this data to excel sheet. There is limited amount of different items so there is no problem with milions of columns. |
Geography union via cursor returning null Posted: 02 Oct 2013 11:06 AM PDT I need to combine multiple geography records into a single entity to store in a spatial data table, but I've learned that the only available function in MSSQL2008R2 that accomplishes this task is STUnion which only works for two static geography records. I have upwards of 200 that I need to union and I'm loathe to hand code that kind of query. On that note, I wrote up a one-off cursor to iteratively union each geography object from my staging table. However, when executed, the cursor returns a null value without any errors or messages. Edit: Updated script for anyone curious about unioning multiple geography records. As stated in the comments, I initialized @ShapeUnion prior to the loop. Also, I added .STBuffer() to the field being unioned; this ensures that the miniscule spaces between the spatial data are completely filled. |
How to create a stored procedure with several delete in(select) statements? Posted: 02 Oct 2013 08:31 PM PDT Our database needs to be periodically cleared of certain items that receive a specific flag (A4) on their id. Our application manages stores and all tables are myISAM. The items can be either in the bought, sold, exchanged, etc tables and they will also exist in the main table that contains all items (the only information the tables share is the id and I can't control that at the moment). My initial idea was to create the individual delete statements and then place them together in a stored procedure. The stored procedure I created contains: These lines refer to items sold. A sale starts with a order, then a quotation, then the actual sale, and finally it gets throw in the main record. The first table mov_pedido has the orders, mov_orcame has the quotations, mov_nfsven has the actual sales and mov_movime records all the transactions. These tables can only be cleared of items that have been paid for by customers but this information can only be found on mov_titulo so I decide to use the select statements with the IN operator. The problem is I also need to clear the mov_titulo table. If I delete the items from mov_titulo first then the information used in the select statements is lost. Reading up on mySQL,multithreaded databases it seems that if the statements are inside the stored procedure together, they will be processed simultaneously and because the tables are related that way it will cause a problem. My question is: how can I improve the logic of my delete statement to make them work together? Can I improve my stored procedure to deal with this? Right now I am executing one statement at a time manually, and that works, but I can see problems down the line, such as entering the wrong date in one of the existing 20 some delete statements for example so I am looking for a better way to do this. Thank you. |
What can do a table constraint that a column constraint can't do? Posted: 02 Oct 2013 10:16 AM PDT Had an exam today. One question disturbed me:
I guess this is not the only difference. How to answer this question more precisely? |
Posted: 02 Oct 2013 08:57 AM PDT I'm doing a small database for statistics, it's a really simple statistic like calculating the cost of an event and divide it by the amount of people that went to get the cost per attendee, but it can end up having loads of event, and it will require to poll in a lot of results at once. I know with MySQL I can use the database to do such simple calculation, so I could run a query every time is needed, but it can end up being costly, if there's a lot of events in say a year. My question is if I were to store the statistic results on a different table, I see it a little bit as data duplication, is that acceptable? or should I do it in a different manner? Thanks |
Unknown column error with an index Posted: 02 Oct 2013 08:55 AM PDT I created a simple index associated with a timestamp column However when I try to do anything with the index, it gives me Sample queries: or |
how to permanently enable query cache in mysql? Posted: 02 Oct 2013 08:43 AM PDT I want to know if there's a way to permanently set the size of my query cache ... and to make sure it's always enabled. Right now, i'm just using the "set global query_cache_size" command to set the size... but when the database is restarted, it goes away. Thanks. |
How do you see which database on a Server uses most resources Posted: 02 Oct 2013 03:44 PM PDT I have a database server with a couple of databases on it. How can I see where any resource pressure may come from? I would like to get a table of:
|
how to access my password in SSIS 2005 by VB.NET Posted: 02 Oct 2013 10:00 AM PDT A VB.NET component delivered following message:
It is about an OleDbConnection. btw The user works fine togehter with SQL Server Management Studio. Retaining a password via the connection manager does not work even with enabling EDIT: Workaround: A SSIS variable was attached to the scope of the required control flow. |
Grouping Selecting unique values in a single column [duplicate] Posted: 02 Oct 2013 09:00 AM PDT This question already has an answer here:
Here is my table The end result must looκ like this Ι want the first occurence of the value of |
Single disk for Data, System, User, Temp and Backup when installing Fail Over Cluster? Posted: 02 Oct 2013 09:45 AM PDT I have a Windows cluster with two nodes. I am trying to make Fail Over Cluster using SQL Server 2012. On both nodes there is 2 TB storage available which I can access as: C:\Storage_For_Cluster\Volume1 So basically a 2 TB SAN is mapped on both nodes as above. My questions is, can I make Fail Over Cluster with one disk only and all data will be saved in it? Or it is better to use a separate drive for each. If you take a look at the screenshot below, you will get an idea as to what I am talking about. As you can see we are using two drives Z and X for different options. Since in this case I only have one drive, can I use this for all these options? Secondly MSDTC is not installed yet (which I think is also required to make Fail Over Cluster) so I wanted to know shall I install MSDTC too on same drive as mentioned above? |
Issues installing MySQL server on Ubuntu 13.04 Posted: 02 Oct 2013 03:29 PM PDT I'm currently trying to install a MySQL server on my Ubuntu 13.04 machine. The problem is, when I try to install it, I get error messages indicating that not all packages could be downloaded. When I run I've tried the suggested fix or running apt-get update and such, I've made sure I have no connections blocked, I've restarted, uninstalled, reinstalled, etc, all to no avail. I've been searching the web all day for solutions I haven't yet tried, but most people with this issue are running an older version of Ubuntu. Suggestions? |
MySql one time event never runs? Posted: 02 Oct 2013 01:25 PM PDT Please have a look at below events I expect event Test1 to run one time after 20 seconds but it never runs. Event Test2 is working fine. Any idea? Thanks. Ok sorry it is the alter that is not working At first i did create EVENT Test1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 20 second ON COMPLETION PRESERVE ENABLE DO then shortly after i did alter EVENT Test1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 20 second ON COMPLETION PRESERVE ENABLE DO Expect event Test1 to run again in another 20 secs but it didn't. |
Slow SSRS Report in production Posted: 02 Oct 2013 02:25 PM PDT I have an SSRS report which gets its data by firing a series of stored procedures. Now the report is timing out big time when run in production, yet when I pull down the prod database and restore to development the report runs fine. I was thinking to set up a sql server profiler trace in production and hopefully that will tell me something... eg high Disk I/O at the time it's being run. What else should I be doing? Something with perfmon? |
Cannot install DB2 Express C 10.1 on Mac OS X 10.7.5 [duplicate] Posted: 02 Oct 2013 11:37 AM PDT This question already has an answer here:
When I invoke ./db2setup it cannot find the JRE where it expects it. Binary for Java not found as follows: /private/tmp/db2/expc/db2/macos/install/db2setup: line 606: /tmp/db2.tmp.740/db2/macos/install/../java/jre/bin/java: No such file or directory I successfully installed DB2 Express C 9.7 last summer before when I was still using the Apple JDK. I am now getting the JDK from Oracle as it is the only source I know of. How do I tell the DB2 install where to find Java? |
How to run a cold backup with Linux/tar without shutting down MySQL slave? Posted: 02 Oct 2013 04:25 PM PDT I run the following before tar-ing up the data directory: However, tar will sometimes complain that the The slave machine is in a cold standby machine so there are no client processes running while tar is running. CentOS release 5.6 64bits, MySQL 5.1.49-log source distribution. |
sp_send_dbmail with attachment Posted: 02 Oct 2013 03:53 PM PDT SQL Server 2008, connecting via SQL Server Authentication. I have a sproc in DatabaseA which calls sp_send_dbmail in msdb to send an email with a file attachment. The file is on the db server, not on a remote fileshare. The SQL account being used is not sysadmin, but does belong to the DatabaseMailUserRole in msdb. Sending an email without an attachment is fine, but when an attachment is present it gives the error: There are a few articles/posts about this out there, but some seem to say conflicting things. I've been looking into impersonation, and one thing that does work is in the sproc in DatabaseA, to do the following: I wasn't expecting this to work as I thought to send attachments, you needed to use Windows Authentication. However it does work, but it means the lower privileged SQL account needs to be granted permission to IMPERSONATE the sa (or other sysadmin account). Doing my due diligence as a dev before unleashing a DBA's nightmare into the wild... My question is: What is a good/safe way of allowing a user authenticated via SQL Server (non sysadmin) to send email attachments from the local db server disk without opening up a security hole? Update: Re: Credentials I've created a new Windows Login, created credentials for that account via SSMS, mapped those credentials to my limited privileges SQL account. I get the error: I must be missing something! |
What is the best way to get a random ordering? Posted: 02 Oct 2013 09:49 AM PDT I have a query where I want the resulting records to be ordered randomly. It uses a clustered index, so if I do not include an I understand that it will likely not be "truly" random, pseudo-random is good enough for my needs. |
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