Run SQL Server 2000 Job programmatically - sql-server-2000

I know you can execute a Job in SQL Server 2005/2008 by sending a call to the Stored Procedure msdb.dbo.sp_start_job.
However is it possible to do this programmatically for SQL Server 2000?
I am using VB.NET however I believe the language I'm using is irrelevant on how to go about it.
If someone knows how to do it in VB.NET (or C#, I can convert it), I'd appreciate it.
Edit: Appears it does exist in 2000. I couldn't locate it in Management Studio, MSDN for the 2005 "Other Versions" link only had 2005 and 2008, and google was only bringing up the 2005 version. Sorry for wasting people's time!

http://msdn.microsoft.com/en-us/library/aa260289(SQL.80).aspx
Suggests that sp_start_job is supported in SQL Server 2000

sp_start_job is available in 2000 as well.

Related

How to track change in MS SQL Server 2008

I am new with SQL database, I am build some Automation Tool in MS-Excel , which can read and write data in database contain 160 tables, this database is also write and read by other software(X).
my task is find all changes are done by other software(X), in database table. so same think I can be done with excel.
Practically It is hard to check one by one 160 table.
I really appreciate for help, I was Google on it but not found so much.
sorry if any mistake in my question.
You can use SQL Server Change Tracking in SQL Server 2008 Express Edition. See Features Supported by the Editions of SQL Server 2008 R2.

Can I restore a backup which was on SQL Express to sql server server 2008 without any problems

I am going to do a customer SQL upgrade and they currently have SQL Express and I want to upgrade it to Microsoft SQL server 2008.
Will it be okay to restore the SQL Express backup to Microsoft SQL Server 2008?
First off, the comments seem to mention MySQL. I can see that you edited it to say SQL Express. If it is indeed MS SQL Express then yes, as SMM said it will work.
I have done this a few times before, and it worked just fine. Though rather than a backup/restore I would move the .mdf file.
This is done by detaching the DB from the Express instance and attaching it to the Server 2008 instance; this can be easily done via sqlcmd or the Studio Manager. The steps can vary based on systems(s) setup. As such, I did a google search to see if there existed a step by step guide for this rather than typing a bunch of scenarios as shots in the dark. There are a plethora of them:
I just Googled: move sql express .mdf to sql server 2008
I also found this and it would seem to be a good match for your situation and has good information:
http://www.mipsis.com/help/Moving%20SQL%20Express%20Database%20to%20SQL%20Server.pdf
Let me know how it goes, and if you need specific assistance with the process please follow up.
I have done SQL Express to SQL 2000 and SQL 2005 successfully in the (distant) past. I am sure this will work. I don't remember any specific caveats other than making sure that you don't try to go from a later version of Express to an earlier version of SQL.

datawindow can not retrieve records on sql server 2008 R2 with powerbuilder 12.5

As you have seen the title of this question, I have a Windows 7 running with SQL SERVER 2008 R2 and Powerbuilder Classic 12.5
I want to enter a simple text and use that text as a parameter to perform a LIKE statement inside the Datawindows. The search is really simple and it work great for me when using former databases like SQL SERVER 2000 or 2005.
I dont have a clue whats wrong here now but if I go to the SQL SERVER 2008 r2 console I can run the SQL statements using LIKE, but if I go back to Powerbuilder and try to run the program from there, simply the program do not return even one row.
Any clue? maybe some configuration to do on Power Builder 12.5 or SQL SERVER 2008 R2 side?
Need help with this.
Thank you!!
Wait a minute.. You said this worked fine with SQL 2000/2005? Why not use that as your starting point? You know you can place your SQL 2008 in SQL 200 compatibility mode? The other thing is, when asking your question, it may prove to be helpful to provide what you are already are/were using - otherwise, we are guessing a bit when trying to answer your question.
At a high-level, it does appear something is not working with a RecordSet or ResulSet.

How can I restore a database backup file (.bak) from SQL Server 2012 into SQL Server 2008 Express?

A database that was originally from SQL Server 2008, was restored into SQL Server 2012. A backup from SQL Server 2012 was made and I am trying to restore it on my local SQL Server 2008 Express. However I get an error 'Specified cast is not valid' (SQLManagerUI).
I have generated an SQL Script from 2012 and set it so that it will generate with compatibility to SQL Server 2008. However it is a large sql file, around 700mb.
I recall before that I had tried to run a script of that size before on my local SQLExpress and also got an error.
Is there a way I can get a "large" database from SQL Server 2012 into SQL Server 2008 Express?
Thanks to Marc and Aaron for providing the answers.
The quick answer is no, it's not possible to restore a backup file from a higher version to a lower version of SQL Server.
A work around would be to generate the scripts to create the database.
You can target the script generation to a lower version.
Please see comments above for more information.
Links:
Why an SQL Server Database from a higher version cannot be restored onto a lower version of SQL Server?
Create Database in SQL Server 2012, Script and Use in 2008?
Couple things to add that might be helpful to folks
When scripting large databases using scripting wizard in SSMS it’s really important to check the execution order and be willing to re arrange it manually. Older versions of SSMS had this problem because they (probably) relied on sp_depends that has a bug.
What I’ve found really useful in such cases are tools like ApexSQL Diff that you can use to read database backups and generate scripts that are in correct execution order.
SQL Server database backup restore on lower version
One thing that none of the methods will catch is the thing Aaron mentioned about using functions specific to higher version.
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 as between SQL Server and SQL Server. 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.

Convert SQL Server Database from 2005 to 2000

We have a Microsoft SQL Server 2005 database that needs to be converted back to SQL Server 2000. Does anybody have any suggestions on the approach or tools I should use to perform this conversion? We don't utilise any SQL Server 2005 specific features in the database so this should not make the conversion problematic.
I should mention that I have found the Microsoft SQL Server Export facility very buggy in dealing with Auto Generated Keys so suggestions for alternative tools would be appreciated.
Generate a full script for your database in SQL2005, and change the "Script for Server Version" option to SQL Server 2000. You can now recreate your database on the SQL 2000 server. After this is complete, use the export data feature to export from SQL 2005 to SQL 2000.
Get a trial of RedGate SQL ToolBelt, then use:
SQL Compare to transfer the database
SQL Data Compare to transfer the data
Script out the entire database
Create a new SQL2000 database
Run the script on the new database
Import the data from the SQL2005 to the SQL2000 database (lots of ways to do this)
There probably is a tool somewhere that does all this for you, although I don't know how commonly this is done.
What you want to do is called downgrading. Google gives lots of results, but here's a good walkthrough on a thread of Microsoft's forums (scroll down near the bottom of the page).