How can i create SQL Agent job in SQL Server 2008 standard? - sql-server-2008

How can I create job in SQL Server 2008 Standard Edition?
I cannot find the menu for the command.

The command in SQL Server Management Studio to create a new SQL Agent job is under the SQL Sever Agent node. Right click on the Jobs directory, and select New Job.

Related

How to attach database in SQL Server 2008 which was created in SQL Server 2012

I have two database files named as .mdf and .ldf which are created in SQL Server 2012 and now on my pc I installed Visual Studio 2010 and SQL Server 2008 Express.
When I try to attach these database files to SQL Server 2008 it gives me error.
The database 'C:\PROGRAM FILES\MICROSOFT SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMS_DB.MDF' cannot
be opened because it is version 706. This server supports version 655
and earlier. A downgrade path is not supported.
Could not open new database 'C:\PROGRAM FILES\MICROSOFT SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMS_DB.MDF'. CREATE
DATABASE is aborted.
An attempt to attach an auto-named database for file C:\Program
Files\Microsoft SQL
Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMD_DB.mdf failed. A
database with the same name exists, or specified file cannot be opened,
or it is located on UNC share.
When open database in ssms 2008 then error :
Attach database failed for Server 'MATRIX-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)
Additional information:
An exception occured while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The database 'C:\USERS\RAJ\DESKTOP\COLLEGE MANAGEMENT SYSTEM(.NET 4.5)\ COLLEGE MANAGEMENT SYSTEM\BIN\DEBUG\CMD_DB.MDF' cannot be opened because it is version 706.
This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'C:\USERS\RAJ\DESKTOP\COLLEGE MANAGEMENT SYSTEM(.NET 4.5)\COLLEGE MANAGEMENT SYSTEM\BIN\DEBUG\CMD_DB.MDF'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 948)
No, you can only move forward.
This means, you can restore the database from 2005 or 2008 to 2012 version but can not do it in reverse order. The next most popular question I receive is if we can’t restore a SQL Server 2012 database to earlier version what is the next best option?
I have personally faced this issue once before and I had manually created T-SQL script using Script and Data Generator Wizard in SQL Server 2012 and rebuild my database in
SQL Server 2008R2. If you have many different databases which you want to address, you can use SSIS to
automate the script generation.
As noted if you want to access a 2012 db from 2008 you will have to migrate the database back to 2008. This will only be possible if you have not used 2012-specific features in the db. If you have and still want to perform the migration you should first try and identify these where they occur and fix those first.
As noted above one option is to generate T-SQL scripts and use these to regenerate the db in 2008. However for a large db this could be time consuming and hard work to get to actually work.
A better option than using the SSMS scripting wizard is to use a similar tool available on Codeplex called SQL Database Migration Wizard - http://sqlazuremw.codeplex.com/releases/view/32334. You want the latest version v4.x to work with SQL Server 2012.
The tool is originally intended to be used for migrating databases between SQL Server and Azure. However the tool works just as well between SQL Server 2012 and SQL Server 2008. The trick is to set SQL Server rather than Azure as the target in the advanced options.
The reason this is a better option than the SSMS scripting wizard is that it uses BCP for the data transfer rather than TSQL and so is much more efficient. I migrated a 7GB database in about 2 hours with this with most of the time spent drinking tea while the machine worked away. Importantly, it all just worked with no requirement for me to start editing files to fix problems like too many commands, timeouts etc.

Create script in SQL Server 2008 which is compatible with SQL Server 2000

I have a Database in SQL Server 2008 and i want to create the complete database script which is compatible with SQL Server 2000. All the datatypes that I've used are compatible with SQL Server 2000.
Here's what you'd do for SQL Server 2000 compatability:
Right-click on your database, Tasks -> Generate Scripts...
Choose your entire database
In Set Scripting Options click the Advanced button
There is an option for Script for Server Version
Select the drop down option for SQL Server 2000

Attach SQL server 2008 R2 mdf file on SQL server 2008 database

I know that we can't restore sql server 2008 R2 .bak file on sql server 2008. But I was just wondering on whether we can attach SQL server 2008 R2 mdf file on SQL server 2008?
Since R2 version of server is newer than your version of 2008, you will not be able to migrate directly, but you have a few options, in my order of preference:
Upgrade to SQL Server 2008 R2 Edition - by far the simplest approach
Use a third party product to replicate schema and then the data (e.g. Red Gate SQL Compare / SQL Data Compare).
Use a manual script,
Use the import-export wizard from one Edition to pull the data/schema to the other
Install an instance of SQL 2008 R2 on one machine and SQL 2008 on another
Open SQL Server Management Studio R2
Select your source Database
Select Tasks>Generate Scripts.
Select 'Script entire database and all database objects', press 'Next'
Select 'Save to File' and click on the 'Advanced' button
Select 'Script for Server Version' and select the version you want: 200/2005/2008
Select 'Type of data to Script' and select Schema/Data/both
Click 'OK',Next and do it!
Copy the resulting file to the target machine with SQL 2008 [or whatever]
Log onto your SQL Management Studio and open the copied .sql file... be aware that there may be limitations on the file size.
There may also be issues with the order that the .SQL file inserts the data into the target database and if there are FK constraints in place, this could be an issue.... simply re-order the insert lists.
Once the .sql file is organised, parse it [just to sure], and then execute.

Scheduling DTS in SQL Server 2008

We are moving from SQL Server 2000 to 2008 and currently just migrating our DTS packages without converting them to SSIS. I can't find a way to create scheduled jobs for those DTS packages. Can somebody help, please?
You'd want to use the dtsrun utility in a job step of a SQL Agent job.
See: Running SQL Server 2000 DTS Packages from SQL Server Agent Jobs

SQL Server 2005 to MySQL connection

I want to be able to email a report daily from a glpi database in MySQL. I would like to create a SSIS job to pull data from MySQL. How do I do this?
Create a Linked Server to mySQL from SQL Server 2005.
I would suggest using ODBC or the MySQL .NET adapter. SSIS can easily use these connections