SQL Server 2008 :: Unable To Access Database Using Service Account

Jun 22, 2015

I'm trying to connect to a database using a service account that we got created. The ID is an AD account and was added to the db as such. When I try to connect to the database using the account with the password I get [login failed for domainid]. The DBA mentioned that its setup to use windows auth, however, I can't connect with this service account using windows Auth, due to I'm using to connect via code.

How can I connect to the database from my code using this ID?

I have the ID and pwd in my code to connect with, does the ID have to be setup differently in the Database?

View 1 Replies


ADVERTISEMENT

SQL Server 2008 :: Query To Find Service Account Through Which It Is Running?

Jul 23, 2015

Without going to services.msc / configuration manager, is there anyway to know the service account through which SQL server is running?

View 6 Replies View Related

SQL Server 2008 :: Unable To Get Correct Service Name Using Registry Query

May 22, 2015

DECLARE @DBEngineLogin VARCHAR(100)
DECLARE @AgentLogin VARCHAR(100)

EXECUTE master.dbo.xp_instance_regread
@rootkey = N'HKEY_LOCAL_MACHINE',
@key = N'SYSTEMCurrentControlSetServicesMSSQLServer',
@value_name = N'ObjectName',
@value = @DBEngineLogin OUTPUT

[Code] ....

Query to get the exact servername ( do not want to use @@servername), either need to use registry to read or using DMV...

View 3 Replies View Related

SQL Server 2008 :: Create Authentication Account With Read-write Access To Only 1 Table?

Apr 7, 2015

How can I create a SQL authentication account with read-write access to only 1 table in a SQL database.

View 1 Replies View Related

Unable To Run SQL Agent With A Service Account Not In Admin Group

Jul 26, 2007

Am trying to run SQL Server Agent with a service account which is not in the Administrators group. Have done the following -
1. Removed the service account from the Administrators group on the machine
2. Assigned sysadmin privileges to the service account
3. Added it to the SQLServer2005SQLAgentUser$ComputerName$MSSQLSERVER role
4. Through SQL Configuration Manager assigned this account to the SQL Server Agent service
However, this does not start the Agent as a service. What is it that is missing?

View 4 Replies View Related

Recovery :: Unable To Disable Log Shipping 2008 With SA Account (or Any Other Admin)

Mar 24, 2012

I recently enabled log shipping on our production database, and I had initially accepted the default of 72 hours to delete copied logs. Well, i am running out of space quick, and I need to edit it to something like 6 hours.

When I try to disable log shipping in order to recreate it, or if I try to edit the secondary server settings when I am logged in as SA, or my windows account which has the sysadmin role assigned, I get an error that says:

Only members of the sysadmin fixed server role can perform this operation. Error 21089.

I've restarted the sql service, disabled and enabled the permission on my account, but for the life of me, i cannot get this to work!

View 10 Replies View Related

Setup And Upgrade :: Unable To Register SPN Using Domain Service Account 2012

Jul 23, 2012

I am working with a client who is rolling out 50+ VM's based of a template we created.  This is SQL 2012 CU1 running on Windows Server 2008 R2.  Using the default service account the installer has it registers fine and we get the following in the SQL log.

The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/server.domain.com:1433 ] for the SQL Server service.

When we change to a domain service account through SQL configuration manager we see the following and cannot connect remote using integrated authentication The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/server.domain.com:1433 ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.

My understanding is you should and could change service accounts using the SQL Server Configuration Manager and it would set all permissions.  Is there something we need to do in addition to get this up and working?

Convert DTS to SSIS |
Document SSIS |
30+ SSIS Tasks |
Real-time SSIS Monitoring |
Quick Starts |
BI Blitz

View 9 Replies View Related

SQL Server 2008 :: Unable To Start Agent Due To Blocked Access

Jun 28, 2015

Had some big problems with my SQL Server 2008 R2 SP1 during the last maintenance running on Windows Server 2008 R2 Enterprise ( upgraded from Standard). I'm getting the following error,

"SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online."

I did a google search and found others with the problem but the resolution isn't working for me. I ran the following commands, heck I ran them multiple times. No errors come back running these commands. But the same error keeps happening, I even restart the service and then the server again.

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO

The msdb got too big for the disk it was on. I had maintenance plans to clear out the all of histories but I didn't think of the mail items. When I finally saw this problem I tried clearing them out using the stored procedures only with it finally failing because the transaction log got full. Since we didn't have a lot of jobs scheduled I decided to just recreate the msdb. So I scheduled a maintenance window, download SQL Server Service Pack 3.

my steps are as follows:
->diff backup of msdb
->stopped the service and started it again with: NET START MSSQLSERVER /T3608
->detached msdb with: SQLCMD -E -SP-SRVR-SQL-01 -dmaster -Q"EXEC sp_detach_db msdb"
->moved it off the drive
->restarted the service without any startup flags
->recreated msdb with: SQLCMD -E -SP-SRVR-SQL-01 -i"D:Microsoft SQL ->ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb.sql" -o"D:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb62715.out"

I looked at the log file and there were no actual error messages so I applied service pack 3 and restarted server after it installed, was actually prompted to restart. In my tests I was never prompted to restart the server.Now I never started the agent service after recreating the msdb database since I knew it wasn't on the same version. I just went directly to the latest SP. Our applications are running fine but now I cant do scheduled backups.

View 1 Replies View Related

Setting Up Access For Network Service Account

Mar 6, 2007

I am trying to connect to a sql server from my asp.net application via windows authentication using the Network Service account. When I try to create a login for the ComputerNameNetwork Service account I get the following error.

I know I haven't mistyped it because I clicked the check names button and it showed as a valid id.

So what gives?

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Create failed for Login 'PREMIERDCNetwork Service'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

Windows NT user or group 'PREMIERDCNetwork Service' not found. Check the name again. (Microsoft SQL Server, Error: 15401)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=15401&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


View 5 Replies View Related

Whether To Use Local System Account Or Domain Account For Service Account

Jan 5, 2006

During install of SQL Server 2005, we can of course use a domain account or the built-in system account for running the services.  I lean toward domain for obvious reaons but would like to know a +/- to each option and why I'd choose one over the other and what consequences or limitations one may encounter if I choose one over the other.

View 6 Replies View Related

SQL Server 2008 :: Unable To Change Database Context

Apr 28, 2015

USE master
Declare @db as nvarchar(258) = quotename (N'tempdb')
EXEC (N'USE' + @db + N'; EXEC(''SELECT DB_NAME();'');');

View 5 Replies View Related

SQL Server 2008 :: Unable To Open Database File (MDF)

May 6, 2015

I have a SQL Server 2005 database file (a .mdf file) that I am trying to open in SQL Server Management Studio so I can add a field to a table, but I am unable to open the file. I can't say that I really understand how SQL Server handles these databases. I especially don't understand the "attaching" and "detaching" operations.

I am working in VB.Net 2008 now, but my background is with VB6 using the JET engine. It was just so straightforward using the JET engine, but seems so much more complicated with SQL Server. I am trying to use .mdf files the same way I used .mdb files. I want my application to find the database file, "attach to it", and let me manipulate it.

At one time I was able to open my database in Sql Server Management Studio and edit the design of the database. The application still works but I am no longer able to modify the database because I cannot attach to it in Management Studio.

Here is a big clue: the files are no longer in the special folder anymore, which is c:Program Files (x86)Microsoft SQL ServerMSSQL.2MSSQLDATA. I might have deleted the files, stupidly, thinking they were redundant. I still have the .mdf file (and the _log.ldf file) on my hard drive and the application can still open it, but when I try to use Management Studio to attach to the .mdf file, I get this error:

Microsoft SQL Server Management Studio Express

An error occurred when attaching the database(s). Click the hyperlink in the Message column for details.

here are the details:

Unable to open the physical file "c:Program Files (x86)Microsoft SQL ServerMSSQL.2MSSQLDATAHEALSExamsSQL.mdf". Operating system error 2: "2(The system cannot find the file specified.)". (.Net SqlClient Data Provider)

Indeed the file is not there, but why is Mgmt Studio looking there? Why doesn't it just open the file where it is? What can I do to get it back? I even copied the files to c:Program Files (x86)Microsoft SQL ServerMSSQL.2MSSQLDATA? I get the same error.

Here is another clue: In Management Studio, when I right-click Databases, and chose Attach, it brings up a dialog. There I click "Add" to get another dialog in which I will select a database, but before the dialog appears I get this error:

Locate Database Files - KURANT-WIN7SQLEXPRESS
C:UsersJason KurantDesktop
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.

View 3 Replies View Related

What Permissions Are Required For SQL Server Service Account To Call Web Service Using CLR Integration?

May 18, 2007

Hello! I have the following problem. I developed CLR Stored Procedure "StartNotification" and deploy it on db. This sp calls external web service. Furthermore, this sp is called according with SQL Server Agent Job's schedule. On my PC SQL Server works under Local System account and this web service is called correctly (Executed as user: NT AUTHORITYSYSTEM). But on ther other server the following exception is raised during job running:
Date 17.04.2007 16:42:10
Log Job History (FailureNotificationJob)

Step ID 1
Server MSK-CDBPO-01
Job Name FailureNotificationJob
Step Name MainStep
Duration 00:00:00
Sql Severity 16
Sql Message ID 6522
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: CORPmssqlserver.
A .NET Framework error occurred during execution
of user defined routine or aggregate 'StartNotification':
System.Security.SecurityException: Request for the permission of type
'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed. System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net. The step failed.

What is the reason of this behaviour? Unfortunately I do not have direct access to this server.
I have the following guesses:
1) CORPmssqlserver may have not enough permissions to call web service
2) Something wrong with SQL Server account's permissions
2) Something wrong with SQL Server Agent account's permissions
I will take the will for the deed. Thanks.

View 1 Replies View Related

User Account Per SQL Server Service && SQL Agent Service, Why?

Jul 30, 2007

Hi all,
 I do understand that it is highly recomended to have aserprate user (perfered a domain user account) for each of the SQL Server service and SQL Agent service.
What is the reason behind that? (Someone told me to not run the service with an account that has a powerul privilegs! - I don't undrstanmd this point can you explain it please?)
What is the diffrent between: 1- Local System account 2 -Network Service account
 
Thanks in advanced!
CS4Ever

View 4 Replies View Related

SQL Server 2008 :: Service Broker Queue In Database

Feb 3, 2015

I had to restore a database in one of the staging servers the other day. However, upon completion, I found out that the service broker queue in the database is not working anymore. The service broker queue error was similiar to this error:
The activated proc dbo.procedure_name running on queue database_name.dbo.queue_name output the following: '<error message>.'

View 0 Replies View Related

My .Net Applicable Unable To Access My DB After SQL Report Service

Oct 8, 2006

Hi, when I am using the Report Manger to open a report, I am unable to acess the Database from my .Net application and vice versa - error report from MS Visual Web developer - "Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".

View 1 Replies View Related

Am Unable To Access SSIS Even Though The Service Is Up And Running.

Nov 13, 2007

I've lost access to SSIS and BIDS.

I'm a SQL 2005 developer DBA with a 1.5 years experience with SQL Server 2005. It has been a while since I needed to use SSIS. I used it with no problems earlier this year when I was managing the team conversion to SQL Server 2005. Now it no longer appears on my START > Programs > SQL Server 2005 menus. I had to reinstall SQL Server 2005 and Visual Studio 2005 months ago and must have lost it then some how.

How do I get access to BIDS and SSIS again?

SQL Server Integrated Services shows up in my Services list as running.
I've already tried Add/Remove Programs to drop that component from SQL Server 2005, reboot, Add it back, reboot. Still does not show up in my menus and the Service is running. The Setup Bootstraplog summary for this effort shows no failures and shows this:

Product : Microsoft SQL Server 2005 Integration Services
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0021_xxxx-xxxx_DTS.log


My SQL Server level is 9.0.3054. The About Info is:

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 7.0.5730.11
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600


My Visual Studio About Info is:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0096213-41845
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0096213-41845
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-0096213-41845
Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77626-009-0096213-41845
Microsoft Visual J# 2005
Microsoft Visual Web Developer 2005 77626-009-0096213-41845
Microsoft Visual Web Developer 2005
Microsoft Web Application Projects 2005 77626-009-0096213-41845
Microsoft Web Application Projects 2005
Version 8.0.50727.762
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005

Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB937061)

Also, in case it is relevant, I've NEVER installed SQL Server Express or had it installed.
When I reinstalled, I installed SQL Server 2005 before VS 2005 since I know that has caused problems with some people.

Please help me get SSIS and BIDS access again.

Thanks,
Paul

View 6 Replies View Related

SQL Server 2008 :: Restoring A Database / Server Using A Remote Server As The Service Call?

Jan 4, 2013

if you can restore a database to Server B using Server A as the service. Meaning we would issue the command on Server A but somehow point to Server B as where we want the restore to happen.

The backup file would be in a location independent of both servers.

View 4 Replies View Related

Unable To Connect To SQL Server Database CANNOT ACCESS THE OLD THREAD

Mar 1, 2007

The reason I had to start a new thread was that the old thread seems to be closed. There is no "Reply" button showing.

I still have the same problem. The last post asked if I was sure I was using SQLExpress.

I only have SQLEXPress and I have never had anything else. Therefore the question becomes - Why does the system seem to think I have another version?



Alan

View 1 Replies View Related

Sqlserver 2005 Unable To Start Mssqlserver Service (access Denied)

Aug 12, 2007

View 2 Replies View Related

DTS Fails As A Job With Service Startup Account As &#34;System Account&#34;

May 9, 2002

I have several DTS jobs that runs well as a job with my nt login account for the SQL agent service startup account, but if I use the System account
they fail with this error.
" Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider"

The data has change access to the System account under the NT security.

Thank you in advanced.

Jorge

View 2 Replies View Related

Sqlserver 2005 Standard Edition Unable To Start Mssqlserver Service (access Denied)

Aug 12, 2007

All,

I have installed sqlserver 2005 using the standard msdn universal installation discs on my laptop running vista business.

The mssqlserver service will not start automatically as the setup configures it
and I cannot start the service manually because I get the 'Access Denied' error message

I am logged on the the computer with adminstration privileges

Thank for all help received in advance,


Dave.....

View 2 Replies View Related

SQL Server Service Account

Jul 20, 2005

SqlServer2k is on the domain serverSqlServer2k is on a laptop tooI want to copy a database from the domain to the laptop over the networkusing the copy database wizard.I have done this before with no problem but this time I get thefollowing error:Your SQL Server Service is running under the local system account. Youneed to change your SQL Server Service account to have the rights tocopy files over the network.I went into the properties of MSSQLSERVER under Services andApplications and see no setting described.Where do manage the SQL Server Service?*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 3 Replies View Related

Moved Aspnetdb To SQL Server - What Permissions Do I Need To Give The ASP IIS Service Account For That? (Getting: Cannot Open Database Aspnetdb Requested By The Login. The Login Failed.)

May 12, 2008

I am getting the error:
Cannot open database "aspnetdb" requested by the login. The login failed.
When I browse to my ASP.NET 3.5 LINQ web application on the IIS 6.0 server on Server 2003.
I imagine this is because while I granted SQL Server 2005 login and permissions to my database that the application stores its data in, I did NOT grant any rights to the service account the IIS Application Pool uses for its identity to the aspnetdb database on SQL Server which is where all my roles information is stored at.
My question is what are the MINIMUM permissions needed for this database so it can perform its roles related functions?
I'm using Windows Authentications with the SQL Role provider for authorization.
 
Thank you.
 
 
EDIT: I think I only need to open the aspnetdb database and add my login to the aspnet_Roles_FullAccess role.  Is that correct?

View 2 Replies View Related

What Account Runs SQL Server Service?

Sep 18, 2001

We are debating whether to run the SQL Server service as Local System, a domain user without local admin rights, or a domain user with local admin rights. MSDN recommends local admin rights, but doesn't require them.
I would like to get some idea of how the real world handles this. If you run as a local admin, how do you handle the security implications? And if you run without local admin rights, what gotchas have you run into with extended stored procs, replication, etc?

Thanks,
Jerry Ratner

View 1 Replies View Related

Changing The SQL Server Service Account

May 4, 2004

I have a SQL 2000 (SP3) running on a Windows NT 4.0 (SP6) box used in our test environment. The SQL Server was configured to run under the local system account before I got here. In an effort to standardize things, I tried changing the SQL Service account to run under a designated domain user account purpose built for the job. We use this particular account for all of our new-build servers (which are W2K). This domain account is configured to be a "Power User" on the NT 4.0 Server in question.

Soon after changing things over to run under the new account, all the developers complained that they could no longer connect to the server. I could through QA and EM, but none of the developers could.

The developers are using WebLogic and JDBC drivers for the most part. I wasn't aware that the SQL Server service account affected client connectivity. Was I wrong or is there something else at work here?

Thanks,

hmscott

View 4 Replies View Related

SQL Server Service Account Questions

Sep 13, 2007

I have recently installed 2005 Standard and 2005 Reporting Services (on a separate server), today we built a service account for the SQL services in Active Directory. I planned to use SQL Configuration tools to change the account but it fails with the message:

'No mapping between account names and security IDs was done'

I ended up going through and following the manual steps outlined in KB article 283811 - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q283811

But I am baffled and concerned as to why it failed.

Any advice?


Future guru in the making.

View 5 Replies View Related

Changing SQL Server Service Account

May 31, 2006

Guys,
I have got WINDOWS 2000 Advanced Server and MS SQL SERVER 7.0 running on my live server. Now when we are planning for replication, we have found that SQL server will require to run under a domain account. At the moment there are so many ASP pages running on our server accesses different databases created using SQL server 7.0. Most of them are DSN connections to the database. Now if i create a domain account and restart the server and MS SQL services with the domain account, how is it going to effect the current web pages running on it?
Any help will be greatly appreciated.
Thanks

View 3 Replies View Related

SQL Server 2008 :: Must Setup Be Run With A Domain Account?

Nov 6, 2015

I am running a SQL 2008r2 install while logged onto the server with a local admin account, not a domain account. I am specifying a domain account to run the SQL service. The install fails saying the service account credentials are invalid but I am 99.9% sure they are right.My theory - the local admin account running Setup cannot validate the service account creds against AD. Is it a requirement to run Setup while logged on with a domain account?

View 4 Replies View Related

System Account For MSSQLSERVER Service In SQL Server 6.5

Jul 20, 2005

Hi,I changed the login for MSSQLSERVER service for 6.5 box to "Thisaccount" from "system account" and then again changed back to "systemaccount". Now I cann't connect thru Enterprize Manager to my server.All my services r running and I can connect to my database thru anapplication as before. I cannot re-boot the machine as it is inproduction. Any thoughts?Thanks in advance.Subodh

View 1 Replies View Related

SQL Server Browser Service - Account Priviliges

Sep 6, 2007

I read an MSDN article that states the following.

SQL Server Browser listens on a UDP port and accepts unauthenticated requests using SQL Server Resolution Protocol (SSRP). SQL Server Browser should be run in the security context of a low-privileged user to minimize exposure to a malicious attack. By default, SQL Server Browser starts using the Local System account. The logon account can be changed by using the Windows Services program. The minimum user rights for SQL Server Browser are as follows:

* Deny access to this computer from the network.
* Deny logon locally.
* Deny logon as a batch job.
* Deny logon through Terminal Services.
* Log on as a service.
* Read and write the SQL Server registry keys related to network communication (ports and pipes).

In our case the SQL Server Browser service is running under the same Windows account as our other SQL Server services. Do you recommend creating a separate Windows account for the SQL Server Browser service as described above?

Can you help me understand how an attack can occur?

Thanks, Dave

View 1 Replies View Related

How To Set Up An Dedicated Account For SQL Server Agent Service?

Mar 11, 2008

I'm thinking of using SQL Server Agent Service for my PDA app. But, I want to use different accounts for SQL Server and SQL Server Agent Service. How can we do this in SQL Server 2005? Do we do this when installing it? Thanks

View 3 Replies View Related

Unable To Archive Analysis Service Database

Mar 7, 2007

Hi

For strange reasons, I am now unable to backup (archive) any of the databases in Analysis Service. :eek:

When I try to archive, I get a dialog box with the following error:

"[MicroSoft][ODBC Driver Manager] Data source name not found and no default driver specified"

I am able to process my cubes and dimensions and am totally lost as to why I'm getting this problem :S

Will appreciate your help.

Thanks.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved