Tag Info

Hot answers tagged

4

You can impersonate that login and use the HAS_DBACCESS built-in function. USE master; GO EXECUTE AS LOGIN = N'your_login_name'; GO SELECT name, HAS_DBACCESS(name) FROM sys.databases; GO REVERT; If you need to find the user mapping in each database (e.g. the user name in the database is not always the same as the login name), you can use dynamic SQL, ...


3

You can use System Stored Procedure sp_msloginmappings which show account mapping information in all databases -- Create Temp Table CREATE TABLE #loginmappings ( LoginName nvarchar(max), DBName nvarchar(max), Username nvarchar(max), AliasName nvarchar(max) ) -- Execute System Stored Procedure INSERT INTO #loginmappings EXEC ...


2

Double check that the paths you are trying to restore to exist on the D drive. SQL Server will not create the directory path if it doesn't exist. If you haven't already, run the restore command with the verify only option MSDN. If that is successful here are a few additional things you can try to isolate why it is failing If you have the space on the ...


2

This code will tell you what you have, change it, and show the new value. Adjust DB name, logfile name and filegrowth size (KB or MB and *8*1024). USE [YourDB] Go SELECT growth*8 as filegrowth_KB FROM sys.database_files Where name = N'YourDB_log' Go USE [master] GO ALTER DATABASE [YourDB] MODIFY FILE ( NAME = N'YourDB_log', FILEGROWTH = 1024KB) -- adjust ...


1

Your question is too wide I am not sure a clear answer can be given but I would try. As such sitting from here I cannot tell you what could break after chaning compatibility level. Only you can find it out by running each and evry procedures,functions, views and triggers you have. Microsoft has documented breaking changes in SQl server 2008 R2 before ...


1

You can update the registry of the Subcriber here you will see the actual status select * from [Publish_Database]..syssubscriptions here the update for all articles subscribes update [Publish_Database]..syssubscriptions set status=2 where srvname='server' After that the snapshot should become effective again



Only top voted, non community-wiki answers of a minimum length are eligible