Deployment of Access SQL database to SQL Server - html

I know I'm asking quite a large question in scale here, but I'm looking more for some general guidelines.
At my work, I have the skeleton of an MS Access database that is ~50% completed. The scope of the project, however, is growing larger and larger as we plan for it more.
I am comfortable in HTML/CSS and Javascript, but have never done any SQL Server back end type stuff - but my question is: what is the process of deploying this access database to an online database? What are some guidelines, links, or guidebooks I can look into for this?

You should definitely check out the upsizing wizard information on https://support.office.com/en-us/article/Move-Access-data-to-a-SQL-Server-database-by-using-the-Upsizing-Wizard-5d74c0df-c8cd-4867-8d07-e6e759d72924.
Use the upsizing wizard with a test SQL Server instance and see how it works. If you need a different tool, SQL Server's import/export tool will work great to migrate your databases over to SQL Server. Use this documentation for that: https://msdn.microsoft.com/en-us/library/ms141209.aspx
There are many YouTube videos that you can watch prior to migrating to SQL Server also: https://www.youtube.com/results?search_query=migrate+access+to+sql+server&page=&utm_source=opensearch

Sql Server has an import functionality that allows you to import from other ODBC drivers, text files (csv), and Access. If you have access to the SQL Server management studio then you'll be able to do this. If not, then you can always download the express version locally, import your access file, then export (dump) your sql server database, and then upload/import it to your server.
My recommendation, if you see yourself expanding away from Access then do it now rather than later. You will most likely run into minor details to fix which are better off sorting early than later in the project when it's close to release. The express version should help with local development.

Related

What tools do you use to connect to AWS Athena via JDBC

I am trying to connect to AWS Athena via my Windows as well as Mac system. My goal is to have a SQL Editor that I can use to perform quick research about the data. I was trying to find tools and tutorials for connecting to Athena. So far I have only found some tutorials around SQL Workbench. What are some other tools that you guys leverage and is there something particular that you like about that tool and how easy was it to setup either on Windows/Mac.
I use SQuirreL SQL for connecting to Athena. It has served the purpose so far. Once you import the JDBC drivers(you can download them from AWS's site) the tool itself is pretty straight forward to setup. The URL that you can use to connect can be seen here -
jdbc:awsathena://AwsRegion=<AWS Region>;User=<AWS Access Key>;Password=<AWS Secret Key>;S3OutputLocation=<S3 folder>
I'm pasting the "Overview" of SQuirreL below:
SQuirreL SQL Client is a graphical Java program that will allow you to
view the structure of a JDBC compliant database, browse the data in
tables, issue SQL commands etc, see Introduction. The minimum version
of Java supported is 1.6.x as of SQuirreL version 3.0. See the Old
Versions page for versions of SQuirreL that will work with older
versions of Java.
SQuirreL's functionality can be extended through the use of plugins.
A short introduction can be found here. To see the change history
(including changes not yet released) click here.
For a more detailed introduction see the English or German of our
paper on SQuirreL.
Susan Cline graciously took the time to document the steps she
followed to setup an Apache Derby database from scratch and use the
SQuirreL SQL Client to explore it.
Quite some time ago Kulvir Singh Bhogal wrote a great tutorial on
SQuirreL and published it at the IBM developerWorks site. He has
kindly allowed us to mirror it locally. The tutorial is not really up
to date but especially for doing the first steps it is still of help.
SQuirrel was originally released under the GNU General Public License.
Since version 1.1beta2 it has been released under the GNU Lesser
General Public License.
Another tool that I have used pretty extensively is SQL Workbench. This is also sort of recommended on the AWS site. The is good, but I found that it would hang up sometimes and I would loose my work.
Both of these can be easily downloaded from the links provided or if you like to use CLI then Homebrew can be used on MacBook or Chocolatey on windows
Some other tools that you can use are DataGrip by JetBrains. Guide to setup the tool can be seen here. The functionality of DataGrip is also built into IntelliJ Ultimate Edition.
DB Visualizer is another tool that can be used to connect to AWS Athena the guide to connect can be found here
TeamSQL and Razor SQL are some other tools that you can leverage.
One of the strengths of JDBC drivers is that as long as a tool supports JDBC, you can use it for any data source which has a JDBC driver. First, get the JAR file for the JDBC driver for Athena here: Amazon Athena Connect with JDBC. Java works across platforms, so as long as you have Java in your Windows/Mac environment, you should have no problem using any of these tools.
The tool SQL Workbench/J is fairly popular, but I find it frustrating to work with when switching between multiple databases.
Another tool is Squirrel SQL, which also supports JDBC drivers. I prefer it, but it looks a little less pretty than SQL Workbench/J. Once you've downloaded the JDBC driver, configure it in SquirrelSQL by going to Drivers and then adding a new one. Label it "Amazon Athena" and specify the Example URL as jdbc:awsathena://AwsRegion=[Region];User=
[AccessKey];Password=[SecretKey];S3OutputLocation=[Output];
[Property1]=[Value1];[Property2]=[Value2];...
Leave the Website URL Blank, but specify the Class Name as com.simba.athena.jdbc.Driver. Add the .jar file of the JDBC driver to the "Extra Class Path" page.
Once you've set up the driver, you can set up connections by going to the Alias tab and hitting the plus sign. Simply fill in the values in the example URL to point to your data source. Once you're connected, you're good to start writing queries.
SquirrelSQL saves the connection information for you, allowing you to quickly jump between data sources, and makes it easy to write multiple queries in one input window, with their outputs going to separate tabs in the output pane. I've used it for database, exploration, DDL, and regular day-to-day tasks with data. It's been good for most anything I've connected it to. It is definitely not perfect, but it's getting better all the time.
I guess you need a Docker SQL Editor that you can use to perform quick research about the data.
But I suggest two ways.
One is Offline/Online and with installation methods, which you can use with a fixed connection.
The first solution is to select a system as a server and connect to it from other operating systems. This is the traditional / old solution.
In the second solution you just need to be trained to work with Docker. This is a newer and more popular solution.
if you want use MySQL in MAC read this article :
Installing MySQL in a Mac OS X environment
If you want use MySQL in windows read this article :
How to Install MySQL on Windows
But you need a synchronous space for use MySQL or other DBMS you can use docker.
Docker is very Flexible . But you need connect to internet.
If you want use Docker read this article and view docker site :
Docker : SITE
Docker Doc : Start a Remote MySQL Server with Docker quickly

Windows App with mySQL Backend

I am trying to design a database application for my small business. I've created a number of form driven MS Access databases for use before but would like to create a permanent solution in something more advanced & common.
I was thinking of using mySQL for the database and would then program a C# or VB application to be used in Windows. I do not want or need a web based version at this time but the migration to VB.net in the far future may be something I'll look into.
I know I can use a MS Access backend for my windows application without having to install MS Office on any or all the computers the program will be run for.
But here is my question. Is it necessary to install mySQL Server on the PC hosting the database, on all the PCs accessing the database or can I just use the database file as the backend and Visual Studio will have all the necessary tools I need to access it?
If I have to install the server I may just stick with the MS Access database as the needs for an excessive amount of database storage won't ever be an issue.
You'd need to install MySQL server on the Server hosting the database. The clients would then connect via the network. You will however need a driver to access the MySQL-Server with VB.NET on the client machines. A simple DLL-File might be enough, though.
If you are looking for a file-based database solution have a look at SQLite. But you will have to watch out for concurrency issues here.

Create Database in SQL Server 2012, Script and Use in 2008?

If I create a database using 2012 and work and add that info to it, if I were to script the database after, would I be able to run the script in 2008 and have everything work A.O.K?
If you are using SQL Management Studio, you can right-click on the database name, then select Tasks → Generate Scripts.
Here you will be able to create scripts to script out the Schema, Data, or both Schema and Data, and if you click the Advanced button, you can specify which version of SQL Server you'd like to target.
So, simply choose SQL 2008 as the destination server and you should be good to go!
A script? Yes. Well, let me rephrase: it depends. As long as your objects don't use any 2012-specific features, you will be able to script out the schema using Management Studio or a variety of 3rd party tools (I blogged about some options here). Many of the tools also offer options (or companion tools) to also script the data.
The problem is there isn't a very easy way in SQL Server 2012 to identify all of the places where you might be using 2012-specific features. For example, I don't know of a tool that will inspect your database and point out that you are using the FORMAT() function, which is not available in SQL Server 2008 or 2008 R2.
Other means of copying the database over - backup/restore, attach/detach, mirroring/log shipping etc. will not work. You can go up (from 2005, 2008 or 2008 R2) to 2012, but you can't go backwards.
So in general I agree with John. Much safer to develop on a version <= deployment version. Why would you want to develop on 2012 to deploy to 2008? Seems quite risky to me.
If you have very large amounts of data to move (gigabytes) then the TSQL scripts that the SQL Management Studio will generate for you could give you problems because of the sheer size. A better alternative would be to use BCP (Bulk Copy Program). The downside is that this is a command line utility and requires more work than just using the wizard.
As luck would have it somebody has written something which looks remarkably like the wizard only using BCP. It is the SQL Database Migration Wizard and is freely available on Codeplex - http://sqlazuremw.codeplex.com/releases/view/32334. Originally intended as a database migration tool between SQL Server and Azure you can just as easily use it between SQL Server and SQL Server. The key is to go into the advanced options (similar to the Management Studio wizard) and pick SQL Server. Later when you are prompted for the target system choose your 2008 installation.
I had no 2012 specific artefacts in my database and it worked very smoothly for me.

Programming without a DB

I have a project to work on. The project requires SQL server. I am using LINQ. So since I dont have SQL server installed on my computer, is it possible I can just use the LINQ designer to create my classes? And then when I do publish my website to a online hosting company, I can use the LINQ to create the tables and stuff?
Is this overly complicated? I want to stay away from using SQLite, or SQL Server Express or SQL server compact because its hard to transfer stuff. Atleast for me. My one problem is also that I want to use ASP.NET Membership stuff. If I run the .exe tool to automatically create my tables, how would I accomplish this without using a db? I tried using SQL server compact (mdf file i think?) but apparently the tool does not support it.
So what are my options here. I'd like to being programming right away however paying for hosting online is just a waste of money for me right now until i have some of the project done.
I'd suggest installing SQL Server Express Edition on your computer and using that as your database during development. I know that there can be some confusion and difficulty when upgrading your development database from SQL Server Express Edition to the professional edition on the hosting company's database servers, but I'm confident that the time you will need to spend on that will be dwarfed by the time you'd need to spend to build and use a mock database layer, not to mention the extra testing you'd need to do once you moved to a real database.
Also, the challenge in moving from SQL Server Express Edition to the professional edition at the hosting company shouldn't be too bad if you choose a web host that has tools for importing your SQL Server Express Edition database into their database server. (Some have it so you can just upload your SQL Server Express .mdf file and it will automatically import it into their database server.)
Two things you can do
Install Sql Server Express on your development machine (or a server on your LAN). This way you will have a local database to develop and test on.
Not necessary, but you "could" try to use Entity Framework in place of LINQ, and use Code First mapping.
Also with Sql Server Express, you can do a lot of your database work right from Visual Studio (providing you're running VS Pro).
I want to stay away from using SQLite, or SQL Server Express or SQL server compact because its hard to transfer stuff. Atleast for me.
Upgrading shouldn't be too difficult.
My one problem is also that I want to use ASP.NET Membership stuff. If I run the .exe tool to automatically create my tables, how would I accomplish this without using a db? I tried using SQL server compact (mdf file i think?) but apparently the tool does not support it.
aspnet_regsql.exe works on Sql Server Express
Use SQL Server Express. It is free. Easy to install in your development environment. In SQL Server Management Studio (SSMS), you can right-click on a table and generate scripts to create the table if you did this from the graphical designer. All you have to do is run the script on the new server. There are free tools that can create/transfer data as well.
What are you going to do down the road when you need to test changes? I hope you don't plan on using the production database.
Just generate your entities by hand, later you would be able to easily attach SQL Server to all this stuff.
Create classes and mark them with required attributes (I don't remember their exact name,check MSDN)
P.S I just can't believe SQL Server Express is not enough for you )

is it safe to install mySQL on windows server 2003 when MS SQL 2005 express already exists?

[edit]
I should note that I need to do this on a live production server. The MS SQL Server is already attached to our website and supports a 3rd party ERP package. I want to set up a separate database that I can code against for some auxiliary pages and internal-use apps) which will be completely independent (mostly for security, but also because I prefer mySQL) from the ERP solution.
[end edit]
The MS SQL 2005 express db is already installed and in use, so I don't want to hose it.
Will this create problems, or have you done it successfully?
Aside from performance issues, assuming they're both continuously used, there shouldn't be a problem.
For a development machine this is safe to do. The two database servers listen on different ports, so there is no problem of running both at the same time.
I wouldn't recommend it though for a production system.
Like Assaf said, the only thing you should worry about are possible performance issues with both database services getting run at the same time. Other than that you should have no worries concerning the integrity of the two. They are completely separate and should not have any sort of conflicts.