Can i schedule a job in SQL Server 2000 MSDE? - sql-server

We are currently evaluation our hosting options and the cheapest suitable option we've found only has SQL Server 2000 MSDE as the db server. Does this have the ability to schedule jobs using SQL Agent?
If not, can I use a windows scheduled job to run scripts for me?

Yes you can SQL Agent is part of SQL 2000 MSDE unlike SQL2005 Express...
http://msdn.microsoft.com/en-us/library/ms165672(SQL.90).aspx

Just answered this on your other question, but I'd recommend using Lazy Coding's SQLScheduler product. It's a nice bit of software that makes setting up and managing these a lot easier when you don't have the full version of SQL Server to hand
EDIT: I forgot to mention that it's also Freeware, so well worth grabbing a copy.

You can use SQL Agent on the MSDE version of SQL Server 2000 to schedule jobs. You will have to use a licensed copy of SQL Server, either the one that comes with MSDN or a retail copy and install the tools from it and then remotely connect to the MSDE installation of SQL server.

MSDE is at or over its support lifecycle:
http://blogs.msdn.com/sqlexpress/archive/2006/08/09/693650.aspx
So hopefully this host is using SQL Server Express (i.e. the free version of SQL Server 2005 or later) instead of MSDE.
Otherwise, Express doesn't come with a job scheduler. But you can always bundle up SQL commands either in .bat files or stored in .sql files and run them at the command prompt using oSQL (SQL Server 2000) or sqlcmd (SQL Server 2005). This would then let you use the windows scheduler.

Related

Northwind.mdf - This database file is not compatible with the current instance of SQL Server (in Visual Studio 2017)

I want to practice with some database that I want to use inside Visual Studio 2017.
I had Northwind.mdf that I downloaded some time ago. But when I try to connect to it from VS2017 Servers panel, I get error message:
This database file is not compatible with the current instance of SQL Server.
Q1: Why?
Q2: Where and how do I know the version of Northwind.mdf?
Q3: Where and how do I know which version of database is supported by VS2017?
Q4: I can create my own database in VS2017, but why I cannot use the existing database?
SQL Server only supports databases up to two versions ago, I don't know what version of SQL Server comes with VS2017 but I suppose that is at least SQL Server 2016 (you can check it using the query select ##version), so it supports at most DB's from SQL Server 2012 and Northwind is for SQL Server 2000.
If you really, really want to use that database you have an upgrade path, is a bit cumbersome but is free (you should use a virtual machine for this if you can, I sometimes use the VM's that MS offer for testing IE for this sort of things):
Download and install SQL Server 2008 R2 Express, which is the last version that supports databases from SQL Server 2000. Import the database and make a full backup (you can also attach and detach the database files but I prefer to use backups).
If the version returned by select ##version if SQL Server 2016 or higher, download and install SQL Server 2014 Express. Restore the backup from 2008 to a new database and then make another backup of that database (if you are using this version just restore the backup in your current SQL Server and you are done).
Finally, restore the 2014 backup in the SQL Server used by VS2017.
Note that is you already have SQL Management Studio (or it's integrated in VS2017) you don't need to install the previous versions, since it can connect to different SQL Server versions (if you do all the installs on your system you shouldn't install the previous versions of Management studio, take care of this). Also, if you are doing this in your system I recommend uninstall the step versions as soon as possible.
i have the same problem, i want to use the northwind in VS2017 environment.
(btw - w3scoolsuse this northwind db to teach sql (october 2018)
so i download the sql script from here, install it and run it from cmd in my computer
sqlcmd -S (localdb)\mssqllocaldb -i InstNwnd.sql
This create db in my computer that i can access by sqlcmd, and by visual studio 2017.
If you want those files (without build it yourself) you can download it from my google drive ( i will upload it to github someday and change the link)

SQL Server Agent not working in SQL Server 2014 Express

I have a restaurant with two computers, on the same network, each computer has SQL Server 2014 and my POS Software (Point of Sale).
Every once in a while I take a backup from my MAIN to my BACKUP computers.
The problem is that in SQL Server 2014 Express, the service SQL Server Agent is not starting, in any way possible, I tried.
I want to be able to connect to my MAIN computer through network.
All SQL Server 2014 data is connected well and working, plus all Services are running well, except for SQL Server Agent.
I see two solutions:
I downgrade my database from 2014 to 2012 and have SQL Server Agent Service Running, however I don't know how to do that.
I fix the SQL Server Agent service and have everything working well, I don't know how to do that either, I tried googling it, awkwardly I couldn't find an answer.
SQL Agent is not available on SQL Server Express edition, only on Standard and Enterprise
If you had SQL Agent running in 2012, that implies you have either standard, bi or enterprise edition.
Downgrading a database to an older version is not an easy task. There is no direct way to do this. If you still have your 2012 backup and very little or nothing has changed since the upgrade, just restore the 2012 database and manually sync the databases (i.e. manually move data). If it's a non-trivial amount of changes, you'll need to do a database copy or export/import from 2014 to 2012.
If you want to setup a scheduled backup of the SQL Express database, you can create a task using Windows scheduler to execute the backup using sqlcmd. For example:
SqlCmd -E -S Server_Name –Q “BACKUP DATABASE your_prod_db TO DISK='D:\folder_on_local_drive\your_prod_db.bak'"
As hinted in the sample, you should backup to the local computer first then copy the backup file to your remote computer. This can be part of the same job (ideally) or a separate job (a bit of extra effort to get the timing right). This can significantly increase the success rate of getting a good backup plus it'll probably run a lot faster too.

Database created in XP to be opened on Vista

I have a database in SQL server which is created on xp and to be opened on vista
When i try opening it on Vista.
Would this be possible
Thanks
Sun
SQL Server creates files that SQL Server can read. The file formats are independent of Windows versions.
What you should be aware of/considering are SQL Server versions and editions.
For instance, if you create a DB using SQL Server 2008 R2, you will not be able to attach/restore such a database using SQL Server 2005 or 2008, no matter what OS you're working on.
Similarly, if you've applied a particular service pack to the installation where the .mdf originates, you need to be working at the same or later service pack on the system where you want to read the file.
Similarly, if you create a database that uses features that are only available in higher level editions of SQL Server - i.e. something only available in Enterprise/Developer edition - you may have issues using the same database on a Standard Edition installation.
You don't open a sql server database with "xp" or "vista". You open the database in Sql Server. That's all that matters here: does the machine have the correct version of Sql Server available? Note that no version of Windows ships with Sql Server installed by default.
Also, unless you're talking about Sql Server Compact Edition you might want to re-think this. Full editions of Sql Server belong on the server editions of Windows. If you're building a database for an app that will live on individual user's desktop and the database will only serve the instance of the app on the machine, do not use sql server for that database. Instead, use something like Sql Server Compact Edition (it uses a different engine than full sql server that is more desktop-friendly), SQLite, or even Access.
Yes, there is no reason why this should not work.
As #Demian said, you can not open database created in SQL Server 2008 R2 in SQL Server 2008. But alternatively if you are sure that your database is not using any features specific to R2, you can script out whole database and then create similar database by running those scripts into SQL Server 2008 (ofcourse with some changes in script). And then just write some insert scripts to import data from 2008R2 to 2008 (Or you can use SSIS to dump data from one location to another location)
I think the question itself is pretty unclear. No explaination of environment of both XP and Vista machines (e.g. DBMS versions including SPs) or how you are trying to open/access database (using attach or by restoring backup). Without proper information I don't think there is any EXACT solution.

Will a database generated from SQL Server Express work with the main version of SQL?

I want to create a SQL Server Express database on my local machine and then upload it to a website that will be using the full SQL Server software - can I do this ?
The MS SQL Express databases are completely compatible with full versions of MS SQL Server. So just backup and restore.
You certainly can. You have a few options:
Backup and restore
Script everything manually
Database publishing wizard
Microsoft SQL Server Database Publishing Wizard can be found here:
http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
Yes, they are designed to be compatible. You can either script out of the database or use the Backup/Restore functionality built into SQL Server Management Studio. More details on the latter can be found here.
You can move from SQL Express to the full SQL Server quite easily. There's a couple of ways to go about doing this, but the easiest is to back up the databases in question on SQL Express, install the full version of SQL Server, and restore the databases there. Both programs use the same database backup format. However both instances of SQL Server should be configured with the same collation.
A better approach might be to buy SQL Server Developer edition. It's quite cheap and will install on a desktop O/S such as Windows XP. The main advantage over SQL Server Express is that it has all of the features of Enterprise Edition (CLR sprocs, SSIS etc.) and you can develop with this functionality. YMMV as you may or may not need these features.

SQL 2000 database copy to SQL 2005 options

We have a production web and database server with SQL Server 2000. (However, a few clients they have their own servers with SQL 2005.) So we have local installs of SQL 2005 Express for development on Windows XP SP3 boxes (which don't allow SQL 2000 Enterprise installations).
We often need to copy SQL 2000 databases to SQL 2005 instances. In the past, we have used the SQL Publishing tool (also mentioned here). However, one of our databases is so big that using that tool fails as it creates SQL scripts that get too large for Management Studio to handle them properly. Besides, it takes too long... :)
We would use the Copy Database Wizard included with SQL 2005, but our development machines run SQL 2005 Express which don't included SQL Server Agent, which is required for Copy Database Wizard to work. So, I guess our solution will be to upgrade our development installs with the full version of SQL 2005 (we have an MSDN subscription of course).
I was wondering what other solutions, if any, work well for you guys? (Besides complaining to the bosses to upgrade our production servers to 2005 or even 2008--which I've already tried.)
Back it up in SQL Server 2000 and then use the RESTORE WITH MOVE command into 2005 Express.

Resources