Query compatibility SQL server 2008/2000 - tsql

I am developing some stored procedures in SQL Server 2008.
Some of our customers are running SQL Server 2000.
Is there a way to check whether my queries are compatible without having to install SQL Server 2000? Maybe a transact sql tester?
Regards,
Michel

You could set the compatibility mode to 80 but it's not guaranteed
I would also suggest installing MSDE at least to validate your code and performance.$
Or simply install full SQL Server 2000 to develop with.

Related

SQL Server 2012 database stored and need to be restored on SQL Server 2008R2

As the title says, I need to restore a SQL Server 2012 database (express) to a SQL Server 2008 R2 production database.
I cannot find a way to do so.
The scripting seems to fail due to the size of one of the tables having about 300.000 records.
Any way to "downgrade" the 2012 database?
Thanks
Michael
You CANNOT do this - you cannot attach/detach or backup/restore a database from a newer version of SQL Server (2012) down to an older version (2008 R2) - the internal file structures are just too different to support backwards compatibility. There's no way, no trick, no hack, no magic to make this happen. Period.
You can either get around this problem by
using the same version of SQL Server on all your machines - then you can easily backup/restore databases between instances
otherwise you can create the database scripts for both structure (tables, view, stored procedures etc.) and for contents (the actual data contained in the tables) either in SQL Server Management Studio (Tasks > Generate Scripts) or using a third-party tool
or you can use a third-party tool like Red-Gate's SQL Compare and SQL Data Compare to do "diffing" between your source and target, generate update scripts from those differences, and then execute those scripts on the target platform; this works across different SQL Server versions.

oracle 9i client connecting to oracle 12c server

Can Oracle 9.2 client connect to Oracle 12c server?
We have an old server which is an 11g version, and so far there's no problem connecting from client.
Thank You.
That isn't a supported combination, no. As it says in the documentation, you can see the supported client/server combinations at My Oracle Support note 207303.1.
The 9i client used to be supported with an 11g server, but is not with a 12c server. There is a specific note about it:
Attempting to connect from 9.2 to 12.1 will fail with an "ORA-28040: No matching authentication protocol" error.
We are currently using the 9i 32bit Client to connect to Oracle 12c 64bit server in test at the moment and so far it works but with caution.
For example, whenever you query certain data types not available in 9i but available in 12c, the system may crash. We therefore had to build views that convert the timestamp data type to the date data type for example. Then it works fine. Even use of indexes seem to work fine.

How to connect Adempiere (or any PostGreSQL) to SSRS 2012 Express?

Has anyone connected Adempiere (ERP) (or any PostGreSQL db) to SQL Server 2012 Express?
There used to be an IT manager to help me out with this, but now i'm left alone with this.
I downloaded the free Sql Server 2012 Express and wanted to use the SSRS for Adempiere. It seems its running on the SQL Server 2010 for SSRS.
I have already added the ODBC Data Sources for 32 Bit. My computer is using 64bit, is there any incompatibility? I'm not sure if my server is 32 or 64bit.
I've tried following the instructions on http://postgresblog.blogspot.com/ but to no avail.
I already have Crystal Report running, so i'm sure its possible to run 3rd party software for Adempiere.
Anyone knows how i can use SSRS for Adempiere? Thanks!
Since you're using Express edition, if you're trying to connect to any Data Source other than an database on the same SQL Server instance it won't work.
See Features Supported by Reporting Services in SQL Server Express.
From that article:
Report data sources must be SQL Server relational databases that run
locally in SQL Server Express.
Also:
Analysis Services, Oracle, XML, SAP, SQL Server Integration Services
(SSIS), OLE DB, and ODBC data sources are not supported.
You're going to need a different edition to connect to an ODBC Data Source.

How to check remote Oracle server is up and running

I have my Oracle server installed in a remote machine and I want a script at my local machine which will check whether Oracle server is up and running or not. I know this can be check by creating a connection through sqlplus or JDBC. But in this case oracle client won't be present and I am saving JDBC approach as my last option. So is there any other simpler way to check this, which can be easily implemented in a shell script???
Thanks
Not really. The only way to be certain that the database is responding to queries is to run a query on it, such as the venerable:
select dummy from dual

Creating a user without an associated login is not supported in SQL Server 2008 R2

When scripting a SQL Server 2000 database, on an SQL Server 2000 version of SQL Server, with SQL Server Management Studio 2008 R2 (10.50.1617.0) i get the error:
Creating a user without an associated login is not supported in SQL Server 2008 R2.
With the full stack trace:
Microsoft.SqlServer.Management.Smo.SmoException: Creating a user without an associated login is not supported in SQL Server 2008 R2.;
at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
What is a good way to resolve this issue.
i've considered:
creating a login (and incur the wrath high atop the thing)
deleting the user (and incur the wrath from high atop the place)
select some rather than all objects to script, and don't script the user that offends SQL Server 2008 R2
But i'll let people on SO post answers, get answers upvoted, and accept an answer that best solves the problem.
As instructed. Just don't script the database users that have no associated login. You can do this in the Tasks > Generate Scripts wizard (pointing 2008 or later SSMS at your 2000 instance) by choosing to select specific database objects and unchecking any troublesome users:
I suspect that your SQL Server 2000 database has user aliases: these were required in SQL Server 6.5 in some circumstances because it was, er, crap,
Note what MSDN says:
sp_addalias is provided for backward compatibility. Microsoft® SQL Server™ version 7.0 provides roles and the ability to grant permissions to roles as an alternative to using aliases.
Run sp_helpuser on the SQL Server 2000 box and review the output and remove them