Tuesday, May 28, 2013

[SQL 2012] Backup/Restore a Database Schema (not the Database) / Database vs. Schema

[SQL 2012] Backup/Restore a Database Schema (not the Database) / Database vs. Schema


Backup/Restore a Database Schema (not the Database) / Database vs. Schema

Posted: 28 May 2013 02:58 AM PDT

Is there a way to backup/restore a Database Schema (not the Database) in SQL Server 2012? (or SQL Server 2008 R2). In oracle your could backup/restore a user/schema. Can this be done in SQL Server? I know in SQL Server you can have mutliple databases per instance and multiple schemas per database, so I would like to know if I could backup/restore a single schema in SQL Server. If so, how can this be done?I also would like to know is it better in SQL Server to set up multiple schemas within a database or create a separate database for each schema? What are the pros/cons of having one SQL Server database with 3 schemas verses having 3 SQL Server databases?Thanks in advance, Kevin

contained sql server user with password - Password Expired policy ?

Posted: 27 May 2013 09:44 PM PDT

sql server 2012 11.0.3000Partial containment type I have create a new contained database and create a DB user in it . During the creation of the account , it promted that my password does not meet the password policy complexity requirement . My concern is not on the password complexity but the password expired policy . How do i know if the contained DB user i created will expired ? there are no option for me to select to include or exclude the policy. This server is under workgroup and my local group policy mentioned the maximum password age is 90 days . Does it mean my contained DB user will expired after 3 months ?

Error in attaching Adventureworks 2012 database

Posted: 27 May 2013 08:20 AM PDT

TITLE: Microsoft SQL Server Management Studio------------------------------Attach database failed for Server '..........\MSSQLSERVER2012'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------Directory lookup for the file "C:\CodePlex Database\AdventureWorks2012_log.ldf" failed with the operating system error 2(The system cannot find the file specified.). (Microsoft SQL Server, Error: 5133)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476------------------------------BUTTONS:OK------------------------------

Error in attaching Adventureworks 2012 database

Posted: 27 May 2013 09:55 AM PDT

hi i have problem in attaching Adventure works 2012 database Attach database failed for Server '..........\MSSQLSERVER2012'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------Directory lookup for the file "C:\CodePlex Database\AdventureWorks2012_log.ldf" failed with the operating system error 2(The system cannot find the file specified.). (Microsoft SQL Server, Error: 5133)

No comments:

Post a Comment

Search This Blog