DB Engine :: Spid Is Locking Out Access To Logins In SSMS

Aug 11, 2015

SQL2008R2...Have a SPID  that started yesterday and contained a command to drop a server audit.  This did not finish (after 3hrs) so I killed the SPID. Problem is it's still there (sp_who2) and I think it's now blocking access to viewing editing logins within SSMS as I'm getting "Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)" when double clicking a login.Do I need to restart the instance as killing the "alter server" transaction (SPID=62) is not working? Code to show blocking transactions returns this.

View 12 Replies


ADVERTISEMENT

DB Engine :: Unable To Start Audit Job From SSMS

Oct 8, 2015

SQL server 2012, I tried to start Audit log from SSMS, I received following error.

Enable failed for audit error 33222, for more information see sql Server error log .

query ss.dm_os_ring_buffers

View 8 Replies View Related

DB Engine :: Overriding Ssms Windows Credentials

Oct 2, 2015

I just installed sql server 2014 on a second pc I will be using to vpn into our parent company's domain.  When I use explorer to look at file system folders on servers in the parent domain on which I have permissions, I am prompted correctly for my windows creds in their domain which are different from the creds in my originating domain and I can see those files.  But when I open ssms and try to connect using server name or ip address, I see two problems....

1) ssms is using my originating domain creds without giving me the opportunity to change them
2) whether I use a server name or ip address I get an error saying login from an untrusted domain cannot be used with windows auth 18452.

View 11 Replies View Related

DB Engine :: Cannot Connect To Named Instance From Local SSMS

Jul 22, 2015

I've two instances(Default, Named[dynamicsFINANCE]) running on SQL server 2014. However, when I try to connect to named instance say (dynamics FINANCE) using SQL authentication from local SSMS, I get below error message.A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)I assigned a static port number to the named instance [dynamicsFINANCE] 1450. I also setup the firewall rule to allow access to Port 1450.

View 4 Replies View Related

DB Engine :: SSMS Connects To Different Instance With Same Hostname - If Ports Are Same

Jun 9, 2015

We have a 2 servers  with 2 default instances, 

Environment- SQL server 2012 SP2 | Windows Server 2008 R2

1server:
hostname-serverA , Instance-serverA and port-2040 Ip-192.164.1.1

2server:
hostname-serverB , Instance-serverB and port-2040 Ip-192.164.1.2

If i do a SSMS connection-the possible connections strings which can be used to connect to Instance "serverB" should be,

a.serverBserverB
b.serverB,2040
c.192.164.1.2,2040

Note: but even the connection string "serverBserverA,2040" also connects to Instance "serverB", when i try to connect from SSMS, In SSMS it shows the wrong instance name like, "serverBserverB", but it actually connects to  Instance "serverA"

i.what is the reason behind this?
ii.Is there any way to avoid this connection, by performing server property changes, if any ?

View 5 Replies View Related

DB Engine :: Connection To Server Instance From SSMS Fails Without Specifying Port

Oct 27, 2015

connecting to a SQL Server Instance. I have a SQL server DB on a server having an Instance not running on the default port. Let's say ServerAInstanceA has the services exposed on Port 12345. When I'm trying to connect to ServerAInstanceA without specifying the port number, while I can connect from one client machine (ClientA), I am unable to connect from a different client machine (ClientB).On a side note, when I provide the port number, I can connect both from clients A and B. My question is, when I do not provide the port number, why is one client machine able to connect while the other isn't?

View 4 Replies View Related

DB Engine :: Cost Vs Time When Including Actual Query Plan In SSMS

Nov 11, 2015

I have two queries yielding the same result that I wanted to compare for performance. I did enter both queries in one Mangement Studio query window and execute them as one batch with the actual query plan included.Query 1 took 8.2 seconds to complete and the query plan said that the cost was 21% of the batchQuery 2 took 2.3 seconds to complete and the query plan said that the cost was 79% of the batch.The queries were run on my local development machine. I was the only user. No other programs were running at the time of this test. The results are repeatable.I understand that the query with the lowest cost is not necessarily the fastest query. On the other hand, the difference is quite big. The query that has approx. 80% of the cost takes 20% of the time and the other way around. I have two questions:

Is such a discrepancy normal?Can conclusions be drawn from the cost distribution? For instance, does the query that takes 8.2 seconds but only costs 21% scale better?

View 9 Replies View Related

DB Engine :: Possible To Force Row Level Locking In Server 2015 Before Inserting Data

Nov 11, 2015

Is it possible to force row level locking in Sql server 2015 before inserting the data  and release the same afterwords..find the code for which we would like to impliment the same

DECLARE @TravelAgentid Varchar(20)
DECLARE @Date DATETIME2(7)
DECLARE @InsDate DATETIME2(7)
set @TravelAgentid ='A101'

[code]....

View 11 Replies View Related

DB Engine :: Migrating Logins Related To Specific Database Not Whole Server Level?

Aug 25, 2015

<g class="gr_ gr_78 gr-alert gr_gramm Punctuation replaceWithoutSep" data-gr-id="78" id="78">Friends,</g>
<g class="gr_ gr_78 gr-alert gr_gramm Punctuation replaceWithoutSep" data-gr-id="78" id="78">I</g>

i am migrating one database from SQL Server 2008 where I have around 20 databases to SQLServer 2012. To migrate the login I was thinking about to use SP_Help <g class="gr_ gr_114 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="114" id="114">revlogin</g> store procedure but now what I believe is this SP scripts out whole server level login and I don't need all the logins in the server except related to the database that I am migrating to.

<g class="gr_ gr_418 gr-alert gr_gramm Grammar multiReplace" data-gr-id="418" id="418">please</g>

best way to migrate logins only related to the specific database to the new server. 

View 4 Replies View Related

SQL Logins And Web Access

Jul 9, 2001

I have created 2 SQL logins for use in connecting to an SQL server database (v7) from my web server. My idea is that one login (WebAdmin) would be assigned the db_owner role and one login (WebPublic) db_datareader and db_datawriter roles.

However, I have run into a problem. Only one of the logins works. The other generates an "Invalid object name" error. The login that works is the login that is listed as the owner in the SQL Server Enterpise Manager Tables pane. Even if the other login has a db_owner role in the user properties box.

Can anyone tell me what is going on?

My code looks something like this:

<%
Set CN=Server.CreateObject("ADODB.Connection")

CN.Open "Driver={SQL Server};SERVER=<ip address>;UID=<either WebAdmin or WebPublic>;PWD=<appropriate password>

Response.Write "Connection Opened!<BR>"
[this part works in both cases]

Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open "Select * from map_gallery_primary_geographies", CN,3, 3

[this generates the "Invalid object name" error for the login that is not listed as owner in the Enterprise Manager]

Response.Write "Value of the first field's record: " & RS(0)

View 2 Replies View Related

Lost SQL Logins, But Still Have DB Logins - Script To Recreate SQL Logins?

Jan 21, 2007

ok, first, I know... I forgot to run a backup of the master database, and I forgot to run a script to caputure logins. Not that that is out of the way... I need to recreate the logins under the Securities tab below the databases. All the company databases have the user names and passwords assigned to them, but they are not able to login, because they are not able to authenticate to the SQL server first.

Is there a script that someone has that will copy the company database security info for the users and recreate them in the SQL security tab?

I know that I can rebuild them manually, but I need to delete them first in the application software, then delete them from the databases, and then recreate them in the application software... and as simple as that sounds... it is a slow moving process.

Any assistance would be greatly appreciated.

Thanks,

John

View 3 Replies View Related

Record Locking In Access ADP

Jul 23, 2005

I'm trying to figure out what happened.I have have two Tables in SQLServer called "Contacts", and "Jobs"Whenever someone changes a record in either table I update two fieldscalled "Modby" and "Moddt" with a trigger. The Trigger may alsocontain other things as well.Here's the wierd thing.If the Modby Moddt statement is the first statement in the trigger Idon't get a "record changed by another user" but if it comes later inthe trigger I do.I think it has something to do with the LockDelay Key but I'm not sure.Any Ideas?

View 3 Replies View Related

Access Locking Problem

Jul 4, 2007

I've been working on this problem for days and cannot seem to figure it out. I'm using the Microsoft Access Driver in an ASP web page to try to update a database. I'm using adLockPessimistic, but it is acting like I'm using adLockOptimistic.



Before you ask, I'm using MDAC 2.8 SP2 on my Windows 2003 Server.



If I open two web pages at the same time, both trying to increment a counter in a database 100 times, the end result should be a value of 200. But in most trials, I get a number less than 200, like 187. It almost seems like it is not locked at all, ecept for the fact that I sometimes get an error telling me I can't update the data because it is locked by another user.



So... I can read OK, but not save because sometimes its locked by another user and sometimes the increment doesn't really increment, therefore it seems like I have adLockOptimistic instead of adLockPessimistic. I do get adLockPessimistic when I read back the lock type.



Any help would be great!




Code Snippet

for i = 1 to 100
if ( len(Request.Form("zipcode")) > 0 ) then
call LogImpression (38)
end if
next



Function LogImpression (CampID)
'This increments the impression counter for a campaign in the vendors database
On Error Resume Next

Set adoCon = Server.CreateObject("ADODB.Connection")
'adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("accessdb/vendors.mdb")
adoCon.Open "DSN=vendorDB"
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT vendors.impressions,vendors.ID FROM vendors WHERE ID=" & CampID & ";"
rsAddComments.CursorType = 2
rsAddComments.LockType = 2
rsAddComments.CursorLocation = 2

rsAddComments.Open strSQL, adoCon, 2, 2, adCmdTableDirect
if (NOT rsAddComments.EOF) then
Err.Clear

MyCount=CInt(rsAddComments.Fields("impressions")) + 1
rsAddComments.Fields("impressions") = MyCount
rsAddComments.Update

if Err.Number <> 0 then
'we had an error, row was locked
Err.Clear

MyCount=CInt(rsAddComments.Fields("impressions")) + 1
rsAddComments.Fields("impressions") = MyCount

rsAddComments.Update
end if

end if
rsAddComments.Close


Set rsAddComments = Nothing
Set adoCon = Nothing
end function





Thanks, Lee

View 1 Replies View Related

Access Denied When Connecting Remotely Via SSMS

Jan 10, 2006

Hello,

Only the server administrator user can connect to SSIS from remote workstations.  All other users encounter "Access denied".  What security settings are necessary to permit regular user access to SSIS?  Firewalling is not an issue.  SSIS is running and works fully for the server administrator user.  All users can manage the Database with SSMS just fine; only SSIS cannot be accessed by regular users.

 

Server Configuration Notes:

Windows Server 2003

SQL Server 2005 Standard

 

Workstation Configuraiton Notes:

Windows XP Professional

SSMS (installed from the SS2005 media)

 

Thank you.

View 7 Replies View Related

Logins To Only Access Certain Tables

Feb 13, 2007

i want to be able to create a login to my database that cannot access the whole db but only certain tables.

how do i do this in sql 2005?

View 1 Replies View Related

Data Access :: Transactions And Table Locking

Sep 3, 2015

Multi user ASP.Net website, SQL Server backend.When using transactions to insert multiple rows into a table and then commiting them once you're happy that everything looks good, the table(s) gets locked before commiting.Basically, I want to perform updates and inserts under a transaction but still allow other users to carry on using the site and potentially the tables that are being used with the transaction.

Question: Is there a way to stop the table lock occurring and for SQL to just do a record lock?, thus avoiding blocking other users?I know that a possibility is to use Snapshot replication, but am a little worried about turning it on due to the small team we have for testing.

View 10 Replies View Related

SQL Security :: Windows Server Firewall Not Blocking SSMS Access From All IPs

Nov 6, 2015

We have a hosted server with a website and sql server 2008 on.

The windows firewall is turned on for all networks / profiles and says its blocking incoming traffic.

I see a lot of login attempts in the windows logs where hackers are trying to connect to it. I can also access it via SSMS from multiple external ips.

Everywhere I've googled says that incoming traffic should be blocked by default by the firewall.

There are no obvious rules that allow SSMS access.

If I do a blocking rule on inbound rules for a single ip that does work, blocking it from that ip, but any other ip's can still connect.

In the firewall log file I can see the allowed connections on port 1433 etc. other than the dropped one from the test blocking rule.

View 5 Replies View Related

Integration Services :: Login To SSMS Got Access Denied Error

Sep 9, 2015

When I try to connect to "Integration services" in "SSMS" with my window authentication, for some servers can able to connect. But for some server i am getting error like "Access denied".

To fix these Access Denied, as per instruction from google, i have configured the Administrative Tools-->Component Services->Component Services-->Computer-->My Computer-->DCOM Config-> Microsoft SQL Server Integration Services 11.0--> Right
Click-->Properties-->navigate to “Security”--> then adding the Active direcotry login in the "Launch and Activation Permissions", "Access Permissions" and "Configuration Permissions".

Then this issue was fixed. I want to know why this was happening to some servers only, what is the reason behind this.

View 5 Replies View Related

Data Access :: Connecting To Server Using SSMS - Login Failed For User

Mar 21, 2014

I have a windows 2008 with SQL Server 2008 R2 VM on Azure. I am trying to connect to the SQL server for the first time using SSMS, but have not been able it. I have a VPN tunnel, so I am connecting using Windows authentication. The error I get back from SSMS is:

Login failed for user 'domainusername'. (Microsoft SQL Server, Error: 18456).In the event viewer I see this error message: Login failed for user 'domainusername'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]

I have done the following:

- created an endpoint for port 1433
- opened port 1433 in the firewall
- Ran the MSSQLSERVER service as the build-in users Network Services, Local System, and Local Service, and as a local and domain administrator, with the same exact result each time.
- I get the same result trying to connect locally or remotely.
- I get the same result trying to connect using sqlcmd.

View 4 Replies View Related

Does Security Admin Have Access To Create Logins Using Sp_addlogin

May 31, 2007

i have an asp.net web application that uses SQL2000 backend. any users login to the application using a proper SQL login. so each user has unique logins

One of the roles within the application is to allow the user to create new logins for the application which inturn creates a SQL login. for this i have been using the following special sp's within an application specific sp:-

EXEC sp_addlogin @strUsername, null, 'WEA_MIS', @loginlang
EXEC sp_grantdbaccess @strUsername, @strUsername
EXEC sp_addrolemember @strRole, @strUsername
EXEC sp_password NULL, @strPassword, @strUsername




the only way ican get this to run is if the user executing the sp is a member of sys admin, ideally i dont want to be giving anyone access to sys admin. i thought security admin would allow me to do the above but it doesnt. Is there any other ways or ideas to get around this problem

Cheers,
Craig

View 5 Replies View Related

Data Access :: Restore Failed Because Licensed Limits 10240mb Per Database In SSMS

Jun 26, 2015

I've been restoring database from couple of times but getting failed because of following error.

I've been using SSMS free version from microsoft website.

Error system.data.sqlclient.sqlerror: create database  or alter database failed because the resulting cumulative database size would exceed your licensed limit of 10240MB per database.

View 3 Replies View Related

SQL 2012 :: Grant Read-only Access To Windows Logins On Remote Standby Database

Mar 23, 2015

We log ship our production database tansaction logs to a secondary database on a separate remote domain.

Incidentally, this was not set up via the "Ship Transaction Logs" wizard, but instead we had to use the various system stored procedures after restoring a copy of the database on the remote domain in standby mode.

We now have an issue where users are unable to access the remote secondary database without having sysadmin privileges. Clearly we want to avoid this!

We want to be able to use Windows Authentication mode on the server of the secondary database. But since the two domains differ, is it possible to even achieve this?

How can we set up read-only access for users on the secondary database without giving them sysadmin privileges?

View 3 Replies View Related

DB Engine :: How To Enable Remote Access

Jun 8, 2015

On my SQL Server 2014 SP1 on Windows Server 2012 R2, allow inbound TCP 1433 and UDP 1434 seems to not be enough for managing remotely any named instance on this server.

View 8 Replies View Related

DB Engine :: User Access Reverting Back

Aug 3, 2015

I have user called DBA_USER he has db_owner access on (123DB) database ....

But when ever my machine restarted the user was getting access error (i.e.. you don't have access on this database) and i checked his access on that particular database his access got reverted back ....

Here my question is why this particular user getting this type of error ....

View 7 Replies View Related

DB Engine :: Cannot Access Destination Table - Appears Sometimes

Apr 23, 2015

I have a simple powershell script, that is writing single row to remote SQL server as sort of keepalive solution for branch machine. It opens System.Data.SqlClient.SqlConnection, SqlBulkCopy writes table, and closes connection.

Sometimes script throws an error in form of - Cannot access destination table.

We are not managing internet connectivity in that place, so I don't know for sure, but can this error be caused by connection timeout that comes when script tries to write ?

View 4 Replies View Related

DB Engine :: Determine Database Access History?

Jul 31, 2015

I was asked to determine the last time 2 databases were accessed.

Are the .trc files an accurate way to determine the database access history?

View 5 Replies View Related

Export Logins To Server With Already Existing Logins

Jul 17, 2001

Hello,

I would move a Database to another server. I try to use DTS but I have problems with this process because DB have big tables, I think. I try to use DETACH and ATTACH procedures but logins doesn't export. And more, in new server there are already logins from another DBs.

What's the best way to solve this problem?
Please, help
Thanks

View 3 Replies View Related

Moving DBs From SQL Server Logins To Windows Logins

Apr 3, 2007

I am a systems analyst and work with an app that runs against 2 SQL Server DBs. Though I have some familiarity with SQL Server and SQL, I am not a DBA.

The app executable is tied to a Windows service.
When we install the app, we run a process that builds 2 dbs to include:
Tables, indexes, stored procedures, views and user accounts.
SQL Server is set up for mixed mode authentication.

Normally, the dbs run off the local db user accounts which are tied to local logins with the same names.
We have a client that wants to remove our standard logins so that they can run on only a Windows login.
I know I should be able to tie the db users to a Windows login.
And I can do the same for the service.

But I am at a loss as to how to get this done.
How do you associate db users with a Windows login?
When I have tried sp_change_users_login I get an error that the Windows login does not exist. (Though I have added the Windows account to the DB.)

Hope this all makes sense.

View 2 Replies View Related

DB Engine :: Backup On Remote Server - Access Error

Nov 12, 2015

I am trying to make my maintenance plan to backup on a remote server but it fails with:

"failed with the following error: "xp_delete_file() returned error 2".

I am pretty sure its because it doesnt have full access to the share folder... My question is, how can I grant access to it, if I am using a local account as sql agent service: NT ServiceSQLSERVERAGENT.I need to change the service account?

View 13 Replies View Related

Access 2000 Frontend MS SQL 2000 Backend - Locking Problems

Aug 20, 2007

We are using an Access 2000 project to view our SQL Tables and using Access 2000 Runtime to Access the forms in the project. We have written in a locking system in VB and removed the video controls to prevent users from accessing the same records. But of course now we need to make the video controls available. This has now thrown up the problem of multiple users accessing the same records. We have tried to write code to lock records when then video controls are used but this is not working as well as we hoped. Can anyone please suggest any way of setting up locking on SQL using triggers from the Access frontend? or any other types of locking systems that could be written in the Access front end.

View 1 Replies View Related

Connection Problem From Access Front End Application To SQL Desktop Engine Backend

Jul 23, 2005

Hi there,I sincerely hope that someone out there can help. I have twoinstances of the SQL 2000 Desktop Engine running. One is on my localmachine for development and the other is on another machine on ournetwork which is the production environment. I have built an Access2003 front end application which connects to this database. Thisworks fine locally, as you would expect. I successfully installed thedatabase on the production machine and am able to connect to it viaAccess 2003 (using the Data Link Properties window) and from thirdparty database manager software (similar to Enterprise Manager). I amnot able to to connect to the database via my application.I am using the "sa" account with a strong password. This is myconnection string:strConnection = "Provider=sqloledb;DataSource=server02;UserId=sa;Password=strong;Initial Catalog=Test"The error I'm getting is:"Connection cannot be used to perform this operation. It is eitherclosed or invalid in this context."The connection string is the only thing that changes in my code when Iswitch from my local to my production database. Is there some reasonthat I can't use the "sa" account in this fashion that I'm not awareof? I'd rather not use integrated security for simplicity's sake asthis is a small, internal application. Also, I would have thoughtthat if that was the issue, I couldn't use "sa" at all, even locally.I'm going to post to the Access group as well but thought someone heremight have some advice to offer as well.Thanks,Barb

View 2 Replies View Related

DB Engine :: Unable To Select Data From A Table Even After Providing Select Access

Aug 28, 2015

I am unable to the access on table even after providing the SELECT permission on table.

Used Query by me :

Here Test is schema ; Card is table ; User is Satish

To grant select on Table

GRANT SELECT ON TEST.Card  TO satish
Even after this it is not working, So provided select on schema also.
used query : GRANT SELECT ON SCHEMA::TEST  TO Satish.

View 8 Replies View Related

Spid

Dec 14, 2000

Could someome please tell me what is going on with the following stored procedure:

EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters

View 1 Replies View Related







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