Schedule a SQL Server Migration Assistant every morning to happen automattically - sql

I have a a2ssproj that is run every morning that migrates MS Access data Tables into Microsoft SQL server Management Studio. It usually take an hour and half.
I was wondering if there is a way to use a task scheduler to execute this every morning say at 5 am instead of having to manually double click Microsoft SQL Server Migration Assistant, choosing the recent project and clicking Ok to overwrite all.
I was thinking of doing this in C# or vb.net and just importing all the data and inserting it into sql.
Is there an easy way to do this?

Related

Import/Exporting between servers

I have 30+ servers that need frequent updates. I am fairly new to SQL so the only way I know how to push the DB from one server to another is the import/export wizard. Though when I do this it takes just over an hour to update all my servers one at a time.
I have only used the import/export wizard. I am not sure if this can be scripted or not.
Using SQL server management studio

Automate export from MS Excel to MS SQL Server

Is there a way to export data from a MS Excel file into a SQL Server table automatically? Maybe this is done using a script of some kind.
If it's not possible to be completely automated, perhaps there's a way to do it using minimal user effort. (For example clicking a button or link)
There is a MS Excel spreadsheet where the data keeps having to be manually exported to SQL Server.
I've done this using Excel to Access before, but not too certain on how to do it using SQL Server (MS).
*MS Office 2013 and MS SQL Server 2012.
The other answers are ok. I just want to suggest an additional alternative.
If it is just 1 specific Excel file that is frequently updated, I would consider using VBA. For example, write some VBA code in Excel that uploads changes to the database when the spreadsheet is saved (or the user presses a button).
The problem with using a scheduled job is that Excel is basically a single user application. If someone has the spreadsheet open or is doing something in it when the scheduled job runs or moves the spreadsheet to a different folder, then the job may fail.
This way you also get the updated data in your database in something close to real time instead of waiting on a job to run. This might take more time and effort to set up though than some of the other answers.
You can use SQL Server Agent to run a scheduled job that imports data from an Excel worksheet into a SQL Server table.
The import is relatively straightforward to do using Integration Services, but if you've not used either of these before you might need to do some reading up on it.
You can do the following:
You need to create an SSIS package and then create a job to run the package.
The easiest way to create the SSIS package is with "Import and Export Data" tool of SQL Server. It has a nice step by step wizard.
You set everything it asks you from the source and the destinations. Until you get here, select the "Save SSIS Package":
Then you only have to create the job to run it :)

How do I add records from an Access database into an existing SQL Server database?

I have an existing Access database that has out grown it's usefulness. I have written a Visual Basic program that uses a SQL Server database and have been re-entering the data from the Access file into SQL Server individually.
I still have 300+ records to move and would like to find a way to do all this using either a data snippet in Visual Basic, or using SQL Server Express. I'm smart enough to set up and use Access, and smart enough to create a program and database in Visual Basic and SQL Server but for some reason I not smart enough to move the records between the 2 databases.
When I originally created the .mdf file I attempted to move the records at that time but everything I tried didn't work so I figured I'd get it later, but now I have 300+ records in the .mdf file and need to get the others moved over. Anybody have any ideas?
Easiest thing to do is create your database, then in SSMS's Object Explorer, right click on the database, Tasks -> Import Data ... and go through the Import/Export wizard, selecting MS Access as your source.

Get Data from a Website and update a SQL Server 2008 R2 Table

I'm wondering if it is at all possible to take data from a website and update a table in SQL Server 2008 R2 at a given interval of time?
The website in question updates every 5 minutes, changing the values of two numbers. As stated above I'm using SQL Server 2008 R2 and I also have Visual Studio 2013 if that matters at all. I need to take these two numbers every 5 minutes and update a table I have created on the SQL Server.
I know I can use an Excel macro to do this, which I already have done, but my employer wants to bypass this altogether.
If this is possible, say via a VS application, then any helpful links or suggestions would be greatly appreciated.
Thanks in advance!
You can create an SSIS package with a "script task".
This task could read the website and return the information.
Then store it in your table.
To finish configure a job that call this SSIS package every 5 minutes.

Reviewing text of scheduled job - Transact SQL database

I am using only VS2012 Ultimate Server Xplorer Pane to code and execute my job. I used to add a job scheduling to perform some task at specific time.
Now that I realize my executed command implemented is incorrect. I can delete this by making another new query on the database then recreate a new similar job but I don't want to do this.
I don't know how to fix the command text.
Get Management Studio, and stop trying to do this through Visual Studio.
http://www.microsoft.com/en-us/download/details.aspx?id=43351
Download SQLManagementStudio_x64_ENU.exe (unless you are on x86 for some reason, in which case pick the other one). It's ~1GB, not sure why, sorry about that.
Starting with 2012 SP1, Management Studio Express is fully functional with no license requirement (this is the first time this has happened).
Connect to your server, expand SQL Server Agent > Jobs, and double-click your job. Nice enough UI that will let you edit steps, schedules, etc. without doing any of this hokey generate-an-entire-script-for-a-job stuff...