[how to] How to connect a SQL Server 2012 to internet |
- How to connect a SQL Server 2012 to internet
- Challenge: Build MySQL table that's not in first normal form
- is it good to use combined primary key for MySQL InnoDB clustered index?
- Find Underlying Data Type (int - integer) of Oracle Table instead of number
- User with dba privs can't login to APX, but can from SQL*Plus
- MySQL: Problems Making Configuration File Changes
- Issue after moving the ib_logfile1 and ib_logfile0 files
- Question about MySQL Semisynchronous Replication
- Duplication Oracle Database to remote host
- DBA_SCHEDULER_Job is not giving any result
- Why disabling a clustered index makes the table inaccessible?
- Transfer data from multiple different servers to a single database server
- ibdata deleted and innodb error [duplicate]
- "Replicate" sql structure between testing and staging on same database instance
- force PostgreSQL into recovery mode
- Service accounts for SQL Server 2012 only allow pre-Windows 2000 name?
- Add partition works but not the drop partition
- Shrinking the SYSTEM tablespace in Oracle
- Using MySQL InnoDB as an Archive
- ORA-16000 when trying to perform select on read only access ORACLE database
- MySQL Table not repairing
- Group By days interval (aging type)
- How to run a cold backup with Linux/tar without shutting down MySQL slave?
- Run Unix command using PL/SQL
- How do I perform an Oracle 10g export with expdp?
- How does name resolution work in Oracle 10g?
- how does name resolution in oracle 10g work? [duplicate]
How to connect a SQL Server 2012 to internet Posted: 05 May 2013 03:43 PM PDT As you know you can create a database with SQL Server using the SQL Server configuration manager and SQL Server Management Studio. You know this - just typing that to tell that I checked the whole internet but didn't find answer to my problem. Let's go back to question. I installed servers - one with default instance (MSSQLSERVER) and one with my own instance name. I want to configure that server so I can connect to it over the internet - from everywhere I am. I did some changes as I see on the internet - TCP Ports are enable and Named Pipes too. I set same ports on my server everywhere - to execute chance to be changed after restart (Many people say it - so I did it). OK good. When I open SQL Server Management Studio, I need to type in the Server name - here are three ways to do it - that is what I know: 1)Typing: Computer name\SQL server name 2)Typing: Local IP(given by the router)\SQL server name 3)This is what I need - network one: Typing: IP Adress(check in internet on one of many websites that says your real IP that comes to router\SQL SERVER NAME And my question is - why can I do first and 2nd connections, but in the 3rd one I get an error... The one that says there is no such a server. I did changes to router that allow ports on SQL Server and SQL Browser and nothing ... but everyone says i need to find port forwarding on router settings. I'm using Tenda W541R and I don't have such as "Port forwarding" but I have some kind of that - "Virtual Server" - I think that must be the same. Thanks in advance ! |
Challenge: Build MySQL table that's not in first normal form Posted: 05 May 2013 04:40 PM PDT I have read numerous books and articles about database design and SQL in which it is said that a database should be in first normal form (1NF). (Some then go on to describe situations in which it may be smart to denormalize a bit, but that's a different subject.) For example, a typical example of a table not in 1NF would be: The primary key is (last, first). Having studied this issue a bit, it's my belief that it is impossible to create a MySQL table that is not in 1NF. If that's true, then I wonder why such a big deal is made about it. Why tell users not to do something that's impossible? It reminds me of a sign on an elevator door: "Elevator out of order. Do not use." (In the comments, I'd appreciate it if anyone can give me instructions about how to create a MySQL table that is not in 1NF.) My example non-1NF row can't be inserted by the MySQL INSERT statement, because that statement allows only one value per row per column. If the type of the phone column is, say, varchar(255), one could certainly insert the value '303-456-9933,303-456-9944', but this would not violate 1NF, because clearly that string is a single value. (If you don't believe me, try getting at the two phone numbers without searching for the comma or breaking the string in half at position 13. SQL and every programming language I know of would treat the value as a single string.) Another attempt at building a MySQL table that's not in 1NF would be the following, and in this case the table certainly can be created in MySQL and the data shown can easily be inserted: However, this table is also in 1NF, since phone1 and phone2 are two different columns (attributes). I used MySQL as my example because I don't know what's going on with the very latest versions of Oracle, DB2, SQL Server, etc. I do know that recent SQL standards allow array and row types for columns, but, as Chris Date has written extensively, whatever value one might have for a array- or row-type column, it is a single value, and therefore doesn't violate 1NF. Anyway, I'm not concerned with array and row types, because none of the database design books (the ones I've seen, anyway) that warn against non-1NF tables mention those two types, as the books are a few years old. It's all those books that have been written over the past 40 years that concern me. (Because I'm writing yet another book that touches on this subject.) My proposal is that the typical formulation of 1NF ("no repeating groups", "single value in each column of a row", or whatever) be replaced by a formulation that addresses the actual problem. Something like this: "A table should never have anything that looks like a repeating value, nor should data that looks like a repeating value be entered, unless one has first determined that the design is the desired one. (The issue is not whether a value is repeating, but whether it looks like it is.)" Maybe not the best wording, but at least it captures my thinking on 1NF. That is, the database or the application program should prohibit data like '303-456-9933,303-456-9944' from being entered into the phone column unless the designer has decided this is what he or she wants. Likewise, one should never have two columns named phone1 and phone2 unless one has thought about it first. After all, it's pretty common in database design to have a few phone columns (office phone, home phone, mobile phone, etc.), as opposed to defining a separate phone table and using a one-to-many relationship. Both approaches are reasonable and widely used, and anyone could come up with a list of pros and cons for each. That particular discussion is not related to the point I'm making. My point is this: The way 1NF is almost always defined, both are in 1NF, and therefore the design principle that suggests one approach versus another can't be based on 1NF. Ironically, with so many places where SQL violates the relational model, it seems that we have a case where it forces a relational principle! Incidentally, I don't have the same concerns about 2NF and 3NF. Those rules are definitely easily, and even frequently, violated by MySQL databases. Comments appreciated! UPDATE: Here's a quote from Chris Date's "Relational Database Dictionary" (p. 69): "It follows that a "table," in a language like SQL, can be considered to be in 1NF if and only if it's a direct and faithful representation of some relvar, where direct and faithful means among other things that every row-and-column intersection (i.e., every cell, q.v.) in that table contains exactly one value of the applicable type, nothing more and nothing less. (The value in question can be arbitrarily complex—it can even be a table—but, to repeat, there must be exactly one such, and it must be of the applicable type.)" 1NF says nothing whatsoever about two columns, even if they are named phone1 and phone2. It is solely concerned with the value in a single cell. People try to apply it to two columns with similar names, and there's no justification in the 1NF rule for doing so. In my proposed reformulation, I am trying to include the multi-column case, something that the rule as currently formulated doesn't do. Update #2: For those who think that phone1, phone2, etc. is a 1NF violation, forget phone numbers and just look at a table with three columns: first name, middle name, and last name. Most databases have such a table (with more columns). Surely you wouldn't say that having the three names made the table not 1NF? If you don't, surely you'll let me call the columns name1, name2, and name3? After all, "first", "middle", and "last" have no meaning in some cultures. |
is it good to use combined primary key for MySQL InnoDB clustered index? Posted: 05 May 2013 02:57 PM PDT i'm trying to build a mirroring site of multiple forums. Because most queries are likely to be within same time periods for But because it is not unique, i'm thinking about making primary key with unique id like: ( I guess it would require much bigger space for index and performance problem, but am I right? Is it a good approach to make cluster index like this if I would like to take advantage of query results which have proximity about |
Find Underlying Data Type (int - integer) of Oracle Table instead of number Posted: 05 May 2013 11:54 AM PDT I can create an example table using following syntax. After that I query USER_TAB_COLUMNS table using following query. I get following result. If I use VS.NET add-in for oracle to get DDL for this table. I get following. If I use SQL Developer It seems that I can not get INT, INTEGER values, I used in my create table syntax? Int, Integer, small int seems to be a syntactic sugar only. Is there any way to find that if a column is INT/INTEGER/SMALLINT using SQL? |
User with dba privs can't login to APX, but can from SQL*Plus Posted: 05 May 2013 10:56 AM PDT I'm using Oracle 11gR2 XE. A user with dba privileges can't log in to the APEX interface, but can from the command line with I just created user: If I run But the web interface (APEX) denies access with an "invalid credentials" error message. What do I need to do to be able to log in on the APEX interface? |
MySQL: Problems Making Configuration File Changes Posted: 05 May 2013 09:06 AM PDT I use MySQL 5.5 on both Mac OSX (10.6.8) and Windows 7; in both contexts I use Workbench for my administrative needs. I've recently started tinkering with the configuration files (my.cnf/my.ini), and it's been generally problematic. Here is what I am hoping to get from the StackExchange community: a. General feedback on whether I am doing anything obviously incorrect, below I have listed some of the things I have tried. b. A set of basic steps for making changes to my.cnf/my.ini via Workbench. c. The ABSOLUTE SIMPLEST config file that will get my server at least running. (Is it possible to run MySQL without a config file?) This file could then be a starting point for beginning the learning/tuning process. One thing that can be a bit overwhelming about the template files (e.g. my-huge.cnf), as well as many of the example config files on-line, is that they come with a large number of settings/options - it can be hard for a beginner to know what is going on. ACTIONS/ISSUES: Below are some things I've tried, most of which usually result in the server simply not starting.
Thanks in advance! Please let me know if there is additional information I could/should provide. |
Issue after moving the ib_logfile1 and ib_logfile0 files Posted: 05 May 2013 01:25 PM PDT I wanted to increase the But I have a doubt, after MySQL shutdown can we expect mysql is an consistent state and all the data that were in the And if the answer is MySQL will be in consistent state than why these files contain some data even after graceful shutdown and start up with [EDIT details] giving the steps i have doneSteps i followed:
Is the above step is fine? if yes then how come after the clean shutdown and start up the log files contains some data. Ideally it should be empty. |
Question about MySQL Semisynchronous Replication Posted: 05 May 2013 08:18 AM PDT I was researching about MySQL Semisynchronous Replication, my understanding about the workflow is the follow:
My question is, at any point, this type of replication ensures that the transaction is executed on slave( |
Duplication Oracle Database to remote host Posted: 05 May 2013 03:39 AM PDT I have two scenarios. 1 ) Let's say , I have the same file system and same SID on both nodes. I've created any directories necessary for start the duplicate database. First I used command below. I've moved On the auxiliary server : My Lastly : A ) if I create a B) Another question : If I store backup files and autobackup are in a different location on the source server ( no default location flashback database ) then how to use 2 ) Let's say , I have the same file system and different SID on both nodes. I've created any directories necessary for start the duplicate database. First I used command below. I've moved On the auxiliary server : My Lastly : is there any missing/incorrect within two different scenarios?If so , please clarify Kind Regards, |
DBA_SCHEDULER_Job is not giving any result Posted: 05 May 2013 10:43 AM PDT I have created one procedure that is supposed to trigger on 5th date of every month.for that i have used dba scheduler job.but its not triggering. select job_name,status from dba_scheduler_jobs; JOB_NAME STATEBUY_UNITS SCHEDULED procedure: Scheduler job: |
Why disabling a clustered index makes the table inaccessible? Posted: 05 May 2013 04:55 PM PDT When an index is disabled, the definition remains in the system catalog but is no longer used. SQL Server does not maintain the index as data in the table changes, and the index cannot be used to satisfy queries. If a clustered index is disabled, the entire table becomes inaccessible, but why, isn't it possible to access the data directly from the table discarding the B-tree most likely by scanning the table row by row, wouldn't that be more appropriate than inaccessible data at all? |
Transfer data from multiple different servers to a single database server Posted: 05 May 2013 05:56 AM PDT I am trying to transfer a particular table from 30 different servers into one server. I do not want to create 30 different ole db source and merge them. Is there a simple way to resolve this issue? |
ibdata deleted and innodb error [duplicate] Posted: 04 May 2013 11:25 PM PDT This question is an exact duplicate of: By accident I have deleted ibdata1 file in MySQL directory because the MySQL wasn't functioning correctly so after reading so many forums I found a post asking to delete the 3 files in MySQL directory (ib_logfile0, ib_logfile1, ibdata1) to let InnoDB load again and MySQL comes up and this what I have did but now when InnoDB loads as engine the tables disappear. After I do a graceful restart the InnoDB disappear totally from the server "have_innodb | No" but I can see all tables again for databases using InnoDB. What I'm looking for is a way to load all the tables correctly than ask ibdata to state them as InnoDB then let the InnoDB engine function correctly. |
"Replicate" sql structure between testing and staging on same database instance Posted: 05 May 2013 07:50 PM PDT On my local development server I have a database set up which gets hooked into Entity-Framework and is then used for unit testing. Let's call it On the same server (and same database instance) I then have another database - So, to hopefully clarify, the structure/flow is something like: Create or modify a table:
Update entity framework, write some business logic, unit tests, etc against the table. Manually mirror/replicate the changes:
Put in some slightly more persistent test data and do front end/ASP.NET stuff. Now, this doesn't seem very elegant to be manually updating the |
force PostgreSQL into recovery mode Posted: 05 May 2013 11:04 AM PDT I have a somewhat strange question. Is there a way to manually force PostgreSQL into recovery mode? I've not been able to find aything in the documentation. I've been working with a script monitoring a postgresql database and need to do some testing. /Peter |
Service accounts for SQL Server 2012 only allow pre-Windows 2000 name? Posted: 05 May 2013 06:13 PM PDT I've just set up SQL Server 2012 with domain service accounts. I found that the account name would not validate unless I used the shorter user name. Is there any way of using the full names? |
Add partition works but not the drop partition Posted: 05 May 2013 04:05 AM PDT We have set an event as below. What we notice is that the add partition is working well as we can see on a daily basis the partition list is growing but the drop partition is not working well any reason for this? |
Shrinking the SYSTEM tablespace in Oracle Posted: 05 May 2013 06:00 AM PDT Our We have truncated Resize doesn't work because the file contains used data beyond requested What should I do here? Here's our version information:
|
Using MySQL InnoDB as an Archive Posted: 05 May 2013 02:05 PM PDT My site has a main MySQL InnoDB table that it does most of its work on. New rows get inserted at a rate of 1 million per week, and rows older than a week gets moved over to an archive table on a daily basis. These archived rows are processed once a week for stuff like finding trends. This archive table consequently grows at 1 million new rows every week, and querying it can get really slow. Is MySQL suited for archiving data, or is my strategy very flawed? Please advise, thank you! |
ORA-16000 when trying to perform select on read only access ORACLE database Posted: 05 May 2013 01:05 PM PDT My application's SQL encounters ORA-16000 when trying to access read only Oracle Database This is the query that involves the XMLTYPE, the INTERFACE_CONTENT is a CLOB COLUMN : I also did A lot OF EXTRACTVALUE( ) method on an XML FIELD TYPE. The SQL is working perfectly if the Database is not read only ( read write ). My Question here is what is the issue here - Is this related to some missing priviledges/grant ? |
Posted: 05 May 2013 08:05 PM PDT Table info: when I do a mysqlcheck -r --all-databases it gets hung on that table even if you let it sit all day. Is there anther way to fix/repair/recover that table? Should I use myisamchk? I saw something like: My config on a 16GB ram box and could this have happened because of a crashed table from doing killall -9 mysqld because it would not shutdown and restart? EDIT: Does this mean that it is now fixed? If so how do I move it back? (this was done on a different server) Is there a way to maybe bring MySQL down on the main server and run a command to fix all the files? |
Group By days interval (aging type) Posted: 05 May 2013 11:05 AM PDT I would lIke to have Mysql group by days interval for example group by every 20 days from current day, like 1 - 20, 21 - 40, 41 - 60 and son on up to lets 120 days. The user can choose the days interval and up to how many days |
How to run a cold backup with Linux/tar without shutting down MySQL slave? Posted: 05 May 2013 03:05 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. |
Posted: 05 May 2013 08:05 AM PDT Is it possible to run a Unix command using a query in Oracle? I want to run simple commands (like Is this at all possible or am I wasting my time? I don't want to use a different language like Java or C to call a procedure, it needs to purely PL/SQL. |
How do I perform an Oracle 10g export with expdp? Posted: 04 May 2013 10:03 PM PDT I followed the instructions at http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php to create a database export. I used: to create the export, however I get this error message: How do I resolve this issue? |
How does name resolution work in Oracle 10g? Posted: 04 May 2013 10:10 PM PDT In Oracle 10g (10.2.0), there are 4 types of names resolution:
It is said that if Easy connect is used by the clients, then it may overload the listener on the server (as client queue increases). How can this happen as it is the server's duty to distribute load from one listener to another? (Please correct me if my concepts are wrong.) And how exactly does Directory and External naming work. |
how does name resolution in oracle 10g work? [duplicate] Posted: 04 May 2013 10:16 PM PDT
In oracle 10g (10.2.0) names Resolutions there are 4 types supported by 10g
my question is: it is said that if Easy connect is used by the clients then it may overload the listener on server(as client queue increases), how this can happen as its servers duty to distribute load from one listener to another(please correct me if my concepts are wrong)? and how exactly does Directory and External naming work. thank you. |
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