SoZo Hosting 800-640-4892: Specializing In Windows Dedicated Server, Linux Dedicated Server, ColdFusion Dedicated Server, ColdFusion Hosting, Cloud Hosting, Windows Hosting, Linux Hosting, SEO, Web Full Page Ads...

Is it better to use MS Sql server vs. MS Access?

MS Access is used for low traffic sites.  If you expect to have more than 2 concurrent connections to a live site, it is much better to use MS Sql server.  MS Sql Server will scale much better for higher volume sites.  Also you could use My Sql as another option over MS Access as a database solution. 

 

Where do I get MS SQL Server Management Studio Express to handle my MS SQL 2005 databases?

Microsoft sql server management studio client tools (Express) can be downloaded for free from

http://www.microsoft.com/download/en/details.aspx?id=8961 .  

After you have installed this tool on your computer you need 3 pieces of information to login to your database: 1) database IP, 2) database user id, and 3) database password. To obtain the database IP, login to the SoZo Control panel and into your account and click on the MS SQL icon. At the top of that MS SQL screen is the host name so use that (you could use the numbers in the brackets also) for the database IP login info. On this same screen on your SoZo control panel is the database user id info.

 

How do I load an MS SQL 2000 Database Using MS 2000 Enterprise Manager?

Open MS 2000 Enterprise Manager and click on the database you want as the source to copy from.  Right click on that database and choose the All Tasks menu then the Import Data menu option under that All Tasks menu. This will open up an initial dialog box for you just to click next which will take you to the SOURCE Dialog box.   In Source Dialog box leave the top Data Source drop down on “Microsoft OLE DE Provider for SQL Server”.   Change the server dropdown to the source server or source IP.  Enter your SQL Server authentication and choose the correct database.  Click the next button to open up the DESTINATION dialog box.  Leave the Data Source as “Microsoft OLE DE Provider for SQL Server” and change the server dropdown to the destination server or source IP.  Enter your  SQL Server authentication and choose the correct database.  DOUBLE CHECK YOU HAVE THE RIGHT DATABASE.  Click the next button to open up the Table/Copy Dialog box.  Choose the bottom selection “Copy objects and Data Between SQL Server Databases”and click Next.  Click on the OPTIONS button and another dialog box will open.  UNCHECK the top 3 checkboxes in the top Security Options section and click OK to close this second dialog box.  On the remaining dialog box click Next.  To run it immediately chick on the Next button and then finally click on the Finish button to start the import.  You will get a status bar of the completion of your import.  Failures are typically due to permissions not being granted, usernames not correct or permissions not set.
 

How do I load an MS SQL 2005 Database Using MS SQL 2005 Server Management Studio?

MS SQL 2005 Server Management Studio is different than doing Imports and Exports with Enterprise Manager (MS SQL 2000). You need to learn how to script the database that you are copying from and then run that DB script on the empty database that you want to import to. Scripting databases is not an easy topic you can learn by reading 1 paragraph here. You need a DB administrator to script a database or buy some good books on the topic. Just doing a simple Import or Export with MS SQL 2005 Server Management Studio can help you load data initially in your tables but you can lose the identity field increment options on a table if you don't know what you are doing. However if you have a small database and don't use identity field increment options or indexes you can do the following steps.

Open MS SQL 2005 Server Management Studio and click on the database you want as the source to copy from.  Right click on that database and choose the Tasks menu then the Import Data menu option under that Tasks menu.  This will open up the SOURCE dialog box.  Leave the Data Source as “SQL NATIVE Client” and change the server name to the source server or source IP.  Enter your SQL Server authentication and choose the correct database.  Click the next button to open up the DESTINATION dialog box.  Leave the Data Source as “SQL NATIVE Client” and change the server name to the destination server or source IP.  Enter your  SQL Server authentication and choose the correct database.  DOUBLE CHECK YOU HAVE THE RIGHT DATABASE.  Click the next button to open up the Table/Query Dialog box.  Choose either selection however if you are not running a DB script then choose the top option and click Next.  Choose the tables you want to import or select the ALL button at the bottom.  Click Next to go to the Execution Dialog box.  Here you can click Finish to execute the IMPORT or you can save it if you are going to do this import often.  You will be notified when the IMPORT is complete.  

How do I change my MS SQL Database data/log ratio?

Login to the SoZo control panel to your account with the database data/log ratio you want to change and click on the MSSQL Server icon.  On the next screen click on the Edit Database Setting icon on the row for the database you want to edit.  On the next screen click on the Change Quota icon in the Database Quota row.  On the next screen change the percent to a higher number and click on the submit button.
 

How do I shrink my MS SQL database log file?

It is your responsibility to control your MS SQL database log size.  If it gets too big for the Size you have allotted then you will get an error in your application.  You can fix this one of 3 different ways. The first is see the topic “Changing Your Database Data/Log Ratio” in the Sozo Control panel section.  The second is to execute the following SQL commands(after you back up your database) together from MS Query Analyzer or MS SQL 2005 Server Management Studio which is logged on to your database: 

BACKUP LOG YourDatabase WITH TRUNCATE_ONLY
DBCC SHRINKFILE(YourDatabase_log, 2)

Replace the text “YourDatabase” with your database name and replace the number 2 with the MB size you want to shrink your log file down to.  Use 2 as your minimum as that will reduce your database log file to 2 MB.  After replacing the text with your database name and setting the MB size of the log file, execute both SQL lines above together.

The third way to solve this issue is to place this SQL :


BACKUP LOG YourDatabase WITH TRUNCATE_ONLY
DBCC SHRINKFILE(YourDatabase_log, 2)


in your application code, replacing the “YourDatabase” text with your database name and setting the size of the log file, and executing this SQL dynamically.  Best case is to add these 2 lines of SQL script above to a stored procedure and schedule the stored procedure to run nightly. Of course you want to back your database up before your run this script if you want to maintain a copy of your full sized log file.

 

How do I stop SQL Injecttons In My Application?

SQL injections are performed by hackers using your application code to run SQL statements that you did not plan on. SQL injections can occur if you have edit boxes that allow users to enter some text and then you use that text they entered tacking it on to the end of a standard SQL lookup statement and then run that concatenated SQL statement against your database.

To stop SQL injections, you should first know a lot  about SQL commands and how to avoid writing code that lets users run a SQL statement other than what SQL you wanted to perform. You should add client side valiation to your code on all places where users can enter some text into a text box on your application screens. Do not allow the following characters in an input box:

percent sign, greater than sign, less than sign, semi-colon, single quote, double quote....

You also could limit text entered on your application screen's edit boxes to only be a-z characters, and/or 0-9 digits as that is even more protection.

Click on these links below and read the information for further instructions (like always using stored procedures) on how to protect your websites against SQL injections. 

http://msdn.microsoft.com/en-us/library/ms998271.aspx

http://blogs.msdn.com/tom/archive/2008/05/29/sql-injection-and-how-to-avoid-it.aspx