Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Could not recognize new keyword in 2005

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-01-04 : 09:46:17
JANAKIRAM writes "Hi,

I am using SQL Server 2005 & Windows XP O/s with SP6.

My SQL Server could not recognize the all new SQL Keywords & Methods incorporated into 2005.
It's givng Incorrect Syntax error.

Why so. What am I missing to cinfigure before using them.

Please let me know.

Thanks & Regards
Janakiram"

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-04 : 10:01:22
Did you restore a database?
Check it's not running in v2000 compatability mode.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

janakiram_infy
Starting Member

3 Posts

Posted - 2007-01-09 : 12:18:35
Thanks for the prompt reply.

I didn't restore a database.
How can I check it's not running in v2000 compatability mode.

Exact problem is:
I already have v2000 installed in my system.
I installed v2005 without any errors.
Later I found that all my own databases were there in v2000 are appeared in v2005 also. how are they come here?!

I tried to execute the fallowing query:
"ALTER DATABASE Northwind SET ALLOW_SNAPSHOT_ISOLATION ON"
Error is:Incorrect syntax near 'ALLOW_SNAPSHOT_ISOLATION'

Error is not only this, for all the new keywords & methods incorporated into v2005.

Please help me out on this, otherwise I could not proceed on my system.

Thanks & Regards,
janakiram
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-10 : 03:58:01
Sounds like you are connected to your v2000 server not to the v2005 server.

Try select @@servername - that should tell you which you are connected to (presumably the v2000 is a default instance and the v2005 is a named instance).

Also try
sp_dbcmptlevel 'master'
and the same for the database you want to check.



==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-01-10 : 04:27:55
Which tool you are using to connect to SQL 2005?

Check the output of SELECT @@VERSION command. It will indicate whether you are connected to SQL 2005 or 2000.

If you have installed SQL 2005 as named instance, try to connect using ServerName\InstanceName notation.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhuotp
Yak Posting Veteran

78 Posts

Posted - 2007-01-10 : 04:40:42
By looking at the error it seems like u r connected to SQL Server 2000 using SQL Server 2005 Management Studio. If u see Northwind database in your server generally it is SQL Server 2000(if u exclusively restored Northwind to SQL server 2005 is an exception), by default SQL server 2005 comes with Adventureworks database in place of Northwind.
Apart from what Harsh and NR has said , you can make out a server whether it is SQL Server 2000 or 2005 by seeing SQL Server Management Studio Displayed Name.

For SQL Server 2000 will have name like -- YourServerName (SQL Server 8.0...)
or YourserverIP (SQL Server 8.0..)

For SQL Server 2005 will have name like -- YourServerName (SQL Server 9.0...)
or YourserverIP (SQL Server 9.0..)


Madhu
Go to Top of Page

janakiram_infy
Starting Member

3 Posts

Posted - 2007-01-17 : 04:45:32
Hi nr, harsh & Madhu,

Yes, you are correct. By default, v2005 mnagement studio's opening with v2000 databeses. All this time I tried to execute the queries in the version 8.0 that's why it could not recognize the new keywords incorporated into v2005.

I tried to connect using myservername\sqlexpress i.e instancename. It worked.

I have learnt so good thing.

Thanks to every one who helped me out solving the issue.

Thanks & Regards,
Janakiram
Go to Top of Page
   

- Advertisement -