For SQL Server master database. Please also tag sql-server
Questions tagged [master-db]
11 questions
3
votes
1 answer
Cannot recover the master database. SQL Server is unable to run
Right,
I powered off development server because it was hanged, when restarted directory services database was corrupted, so fixed it, then figured out that IIS Manager's metadata.xml is messed up, so fixed it using backup too.
But now SQL Server…

Mathematics
- 7,314
- 25
- 77
- 152
1
vote
1 answer
Cannot connect to SQL Azure master from worker role
We're currently developing against SQL Azure and have (unsuccessfully) tried to point a worker role to the master database in SQL Azure in order to automate database operations which require the master.
Unfortunately this doesn't seem to work.
A bit…

iagomartinez
- 172
- 10
1
vote
1 answer
Create logins, create user from stored procedure in Azure
I've inherited a very old app that runs on SQL Server 2005. I'm trying to move this app to Azure.
One thing the stored procedures in this app do is create new database logins and new users. I know that many of the functions and system procedures it…

DCPetterson
- 21
- 1
0
votes
4 answers
Querying master.sys.databases view in SQL Server 2008 R2 from c# is not working
I'm using the code below to find if a database exists but the ExecuteNonQuery always returns -1.
I've seen the master.sys.databases view and it has the database POS
SqlConnection tmpConn = new SqlConnection("Data…

Uzair Farooq
- 917
- 3
- 15
- 25
0
votes
0 answers
Granting server-level roles to Azure AD Logins
I have an Azure Managed Identity service, I wish to grant it permissions to use the sys.dm_exec_input_buffer function in Azure SQL Database.
According to this documentation, I must grant VIEW SERVER PERFORMANCE STATE permissions.
According to this…

mark
- 47
- 1
- 2
- 9
0
votes
0 answers
using the MASTER database in SQL Server for data tables
I've started doing some SQL consulting work for a former colleague. He has SQL Server Express 2014 and it looks like the two previous consultants had no compunction about setting up his main work tables in MASTER, as opposed to anywhere else.
I…

ulysses1904
- 77
- 4
0
votes
0 answers
Running background stored procedure using sp_procoption and waitfor time
I have created a stored procedure in my SQL Server Express that I am calling my Web API in and it is running fine. I want it to play in the background like a job / schedule using waitfor time in SQL Server to auto start it at startup of…

Mahavirsinh Padhiyar
- 1,299
- 11
- 33
0
votes
0 answers
Can a Master DB in SQL Server be set to read only
I know how to set a user db, in SQL Server, to Read Only mode. Can the Master DB be set to read only? If it is set to read only can users still log in?

benjamin moskovits
- 5,261
- 1
- 12
- 22
0
votes
1 answer
SQL Server : kill active connections hold by MASTER database
I have tried below code to kill SQL connection other than Master database:
DECLARE @kill varchar(8000) = '';
SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), session_id) + ';'
FROM sys.dm_exec_sessions
WHERE database_id =…

Paul
- 23
- 7
0
votes
1 answer
query on master database throws UnintentionalCodeFirstException in DatabaseFirst
Having huge problems with creating model for sql servers master db.
I selected database first, didn't include any objects, so I've an empty model:
masterModel.cs:
*//------------------------------------------------------------------------------
//…

peer____42
- 45
- 8
0
votes
1 answer
SQL Server 2008 R2 giving named provider error 40 :sql error 2
When I start SQL-Server2008R2 I get the error :-
SQL Server named provider error 40 cannot connect to SQL Server :sql error 2
On checking 'EventViewer from Administrative tools' i found out the below error
Cannot recover the master database. SQL…

Sujit Prabhakaran
- 295
- 3
- 12
- 26