Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the code that hve Error :
SQL
ALTER DATABASE [Zuama] SET DELAYED_DURABILITY = DISABLED 
GO
EXEC sys.sp_db_vardecimal_storage_format N'Zuama', N'ON'
GO
USE [Zuama]
GO
/****** Object:  User [WebServiceAcc]    Script Date: 1/6/2015 8:13:00 PM ******/
CREATE USER [WebServiceAcc] FOR LOGIN [WebServiceAcc] WITH DEFAULT_SCHEMA=[WebService]
GO
/****** Object:  User [ruser]    Script Date: 1/6/2015 8:13:00 PM ******/

and the error:
Msg 102, Level 15, State 6, Line 74
Incorrect syntax near 'DELAYED_DURABILITY'.
Msg 15007, Level 16, State 1, Line 81
'WebServiceAcc' is not a valid login or you do not have permission.
Posted
Updated 6-Jan-15 23:04pm
v2

1 solution

DELAYED_DURABILITY was introduced at SQL Server 2014, so it isn't applicable to the 2012 version. Hence, your DB doesn't know what to do with the command!
 
Share this answer
 
Comments
‫محم د‬‎ 7-Jan-15 5:25am    
So if i delete this line its ok ??
and how about :
CREATE USER [WebServiceAcc] FOR LOGIN [WebServiceAcc] WITH DEFAULT_SCHEMA=[WebService]
OriginalGriff 7-Jan-15 5:38am    
I have no idea if just deleting the line will work: you are trying to import a database from a newer version to an older version, and I can't say "this will cause no problems" as I have no idea what else your DB will contain that may cause you problems - even if they don't cause syntax errors!
Personally, I'm always wary of "down versioning" anything - it's always given problems.

Why not use the same version and you should be safe?

(But from the look of your error messages it won't work as you are logged in with a user that doesn't have sufficient permissions)
‫محم د‬‎ 7-Jan-15 5:50am    
I solve both of them
generate scrip have an option for generate script for sqlserver 2012
and I create Script from users and restore ... :)
OriginalGriff 7-Jan-15 5:54am    
That's the safest way to do it!
:thumbsup:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900