Sql Server Tips
From Adviceopedia
Before you read the SQL server tips, you need to understand exactly what a SQL server is. SQL stands for Standard Query Language and it is a method of accessing a database. SQL servers are available from Microsoft and Sybase.
Contents |
SQL Server Tips and Advice
SQL is Standard Computer Language
A SQL server allows users to:
- Input questions/queries into a database
- Retrieve answers from the database
- Update records in a database
- Input new records into a database
- Retrieve records from a database
SQL Commands
A SQL server uses some standard commands:
- INSERT INTO: Used when the user wants to add new data into the database
- DELETE: The appropriate command used when deleting data from the database
- SELECT: This command is used to obtain a record from a database
- UPDATE: Updates the records, as the name implies
MySQL is Not mysql
MySQL refers to the server as a whole, while mysql is used to refer to client programs. In a situation where the SQL server is not busy and that situation is not expected to change, it may make sense to install it with a file server or a domain controller.
Client programs can be used to access data in a MySQL program on a different computer. Before having access, permissions need to be granted by the system administrator.
Changes to Code
One good SQL server tip is that it is possible to monitor changes made to the code in the database. Check the Oracle Data Dictionary to see the most recent changes made to functions, packages, and procedures by checking the LAST_DDL_TIME column under USER_OBJECTS.
Storing the Database in Memory
One single command does not exist to tell a SQL server to store the entire contents of a database to memory at once.
Not all information stored in a database is accessed with the same frequency; there will be portions of the database which are only needed on rare occasions. Items that are accessed frequently are the priority when it comes to determining which parts of the database should be stored in memory.
Query Taking a Long Time
If you execute a query in the database and are used to getting a response quickly (less than a minute) and then the time to get a response changes drastically (to several minutes), you will need to update the statistics on the relevant tables. This scenario takes place when the statistics are not updated regularly or the server has failed to update them correctly.
One way to correct the problem is to run the statistics after hours or during a slow time of day. Another way to deal with it is to use the Hint Index to ensure that SQL server is in the appropriate index. This will reduce the need for the database to scan an overly large table to find the required information.
Windows Domain Controller
Though a SQL server can be run on a Windows domain controller, it is not recommended. You will have better performance results by using a dedicated SQL server. In a situation where the SQL server is not busy and that situation is not expected to change, then it may make sense to install it with a file server or a domain controller.
Size of the Database
The SQL server doesn't have any built-in tools to estimate how much space a database will take up. If you don't have a tool to estimate the size of the database as tables are added, then you will need to do your own calculations.


