Security Error When Execute Sp From An Application, But Not From SQL Management Studio.

May 8, 2008


Hello,
I am facing a very odd behavior with SQL server 2005.
I have a database role with specific permissions to execute only some of the stored procedures in the database. I also have a SQL login/user attached to the role.

If I execute one of the stored procedures from the application (web application, with Microsoft enterprise library database block) I am getting a security error stating that I need select permission for the schema.
However, If I execute the same sp with the same parameters from SQL management studio, connecting with the same SQL login as in the application I can execute the sp without any security errors. The SQL management studio is in on a different server than the targeted database.

Are there any differences between executing stored procedures from SQL MS and from application when using the same SQL login?

Thanks,
IT

View 6 Replies


ADVERTISEMENT

User Token Is Different When SP Is Executed In Management Studio Vs Application

Sep 18, 2007

Hello,

I have a stored procedure that outputs login token and user token information. The stored procedure has

WITH EXECUTE AS CALLER specified.

When I execute the stored procedure from Management Studio I get the following output from the stored procedure



<login_token pid="267" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" />

<login_token pid="2" sid="Ag==" name="public" type="SERVER ROLE" />

<login_token pid="3" sid="Aw==" name="sysadmin" type="SERVER ROLE" />

<login_token pid="257" sid="AQIAAAAAAAUgAAAAIAIAAA==" name="BUILTINAdministrators" type="WINDOWS GROUP" />

... (more groups)

<user_token pid="7" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" />

<user_token pid="0" name="public" type="ROLE" />

<user_token pid="5" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2NrCAUAAA==" name="MYDOMAINPeople" type="WINDOWS GROUP" />
<user_token pid="16" name="approleDirector" type="ROLE" />

<user_token pid="16384" name="db_owner" type="ROLE" />




When I execute the stored procedure through my application (IIS application connecting to SQLServer 2005 through SQL Native Client - not .NET)
I get the following


<login_token pid="267" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr0AYAAA==" name="MYDOMAINjoe" type="WINDOWS LOGIN" />

<login_token pid="2" sid="Ag==" name="public" type="SERVER ROLE" />

<login_token pid="3" sid="Aw==" name="sysadmin" type="SERVER ROLE" />

<login_token pid="257" sid="AQIAAAAAAAUgAAAAIAIAAA==" name="BUILTINAdministrators" type="WINDOWS GROUP" />

... (more groups)

<user_token pid="1" sid="AQUAAAAAAAUVAAAAdbl1VI3r6l4jX2Nr4QQAAA==" name="dbo" type="WINDOWS LOGIN" />


The login token is the same but the user token is dbo instead of the actual user.


What am I doing wrong?

Thanks.

View 9 Replies View Related

Different Results When Running Procedure From Management Studio Vs Application Code

Apr 28, 2008

I'm updating a process that recreates a large table every night. The table is the result of a bunch of nightly batch processes and holds a couple million records. In the past, each night at the end of the batch jobs the table would be dropped and re-created with the new data. This process was embodied in dynamic sql statements from an MFC C++ program, and my task is to move it to a SQL Server 2000 stored procedure that will be called from a .Net app. Here's the relevant code from my procedure:
sql Code:






Original
- sql Code




-- recreate new empty BatchTable table
print 'Dropping old BatchTable table...'
exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table

-- validate drop
If exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Begin
RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT
End Else Begin
print 'Old BatchTable dropped.'
End

print 'Creating new BatchTable...'
SELECT TOP 0 *, cast('' as char(3)) as Client, cast('' as char(12)) as ClientDB
INTO dbo.BatchTable
FROM differentDB.dbo.BatchArchives

--validate create
If Not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Begin
RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT
End Else Begin
print 'New BatchTable Created.'
End






    -- recreate new empty BatchTable table    print 'Dropping old BatchTable table...'    exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table     -- validate drop    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)    BEGIN        RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT    END ELSE BEGIN        print 'Old BatchTable dropped.'    END     print 'Creating new BatchTable...'    SELECT TOP 0 *, CAST('' AS CHAR(3)) AS Client, CAST('' AS CHAR(12)) AS ClientDB    INTO dbo.BatchTable    FROM differentDB.dbo.BatchArchives     --validate create    IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)    BEGIN        RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT    END ELSE BEGIN        print 'New BatchTable Created.'    END

The print statements are there because the .net app will read them in and then write them to a log file. Some of the other mechanics are there to mimic the old process. The idea is to duplicate the old process first and then work on other improvements.

This works in Management studio. The .Net App reports that the old table was dropped, but when it tries to create the new table it complains that "There is already an object named 'BatchTable' in the database." I have verified that the old table is removed.

Any ideas on how to fix this?

View 4 Replies View Related

What Is The Security Setting To Allow Editing Of Stored Procedures From Management Studio?

Nov 28, 2007

Greetings
Running SQL Server 2005. The developers on the project can see and edit stored procedures from within the Visual Studio IDE (via Server Explorer) but when they connect through management studio, the stored procedures do not show up at all.

Is there a seperate security setting specifically for management studio?

The user has:

The dbCreator Server Role

Is mapped to the development database as dbo with datareader/datawriter/db owner/public role
Is mapped to master reader/writer/public
Is mapped to model reader/writer public
Is mapped to msdb reader/writer public
Is mapped to tempdb reader/writer publuc

This is probably more security than the user needs, but was grasping at straws to let them edit stored procedures...

View 4 Replies View Related

SQL Security :: Can Hide Databases From Users Who Don't Have Access In Management Studio

Apr 21, 2015

I have a client who would like to access his database via SQL Server Management Studio. I created a login for him. This login has access only to his database on the server (I set this up using the user mapping), the Securables has Connect to SQL checked (otherwise he won't see his database).  When I test this login, he is able to see all the other databases on the server, though when he clicks on the ones he doesn't have access to, it will tell him that he can't access that database.  He can access his database alright.  My question is, can I hide all the other databases from him, and only display that only database he has access to?  I have tried many different ways, I can't seem to be able to do so.

View 6 Replies View Related

I Need Some Simple Security (for SQL Server Management Studio) In A Group Of Programmers.

Dec 5, 2007

Hi, I'm working in a web project.
In our lab, all the PCs are installed with SQL Server Management Studio, and the codes of the site are left by the previous batch of programmers.
Here is briefly how our web works, the web will call the sql server providing a username (userA) and password (aaaaaa) to log into the database, then the web can connect to the database to do various functions like select, insert, update and delete.

Currently anyone can go to thier SQL Server Management Studio on thier PC to edit various things like names and columns of tables by logging in as userA.

But, we now only want a small number of users to have the ability to change things in the database. What are some ways we can do that?

Something that I've thought of is that only allow userA to log in and do functions like select, insert, update and delete and do not have the ability to edit things like names and columns of tables. Have a userB with password only known to me that can have full control of the database which I have done.

View 2 Replies View Related

Can't Access Reporting Services In Management Studio Or Web Interface Using Windows Integrated Security

May 12, 2008

I know from searching this forum that there have been many variations of the issue I'm currently suffering, but I haven't found anything quite like mine or a solution to solve it. The issue I'm running into is that I am unable to log on to Reporting Services using Management Studio or the web interface when Windows Integrated Security is enabled. I have full functionality using basic security, but the risks involved make it impossible to deploy basic authentication out into production. The error I'm receiving in Management Studio is The request failed with HTTP status 401: Unauthorized. (Microsoft.SqlServer.Management.UI.RSClient). I recieve the same error when I try the web interface.

I've looked the most recent logfile in WindowsSystem32LogFilesW3SVC1 and these entries match up to the time I attempted my authentication.



Code Snippet
2008-05-12 20:30:42 <Edited: Server IP> GET /reports - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:42 <Edited: Server IP> GET /reports - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 301 0 0
2008-05-12 20:30:42 <Edited: Server IP> GET /reports/ - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:46 <Edited: Server IP> GET /reports/home.aspx - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 302 0 0
2008-05-12 20:30:46 <Edited: Server IP> GET /reports/Pages/Folder.aspx - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:47 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 2 2148074254
2008-05-12 20:30:47 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 1 0
2008-05-12 20:30:47 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 1 2148074248
2008-05-12 20:30:49 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 2 2148074254
2008-05-12 20:30:49 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 1 0
2008-05-12 20:30:49 127.0.0.1 POST /ReportServer/ReportService2005.asmx - 80 - 127.0.0.1 - 401 1 2148074248
2008-05-12 20:30:50 <Edited: Server IP> GET /reports/Pages/Folder.aspx - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 500 0 0
2008-05-12 20:30:50 <Edited: Server IP> GET /Reports/js/ReportingServices.js - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:50 <Edited: Server IP> GET /Reports/js/ReportingServices.js - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 200 0 0
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/styles/ReportingServices.css - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/images/blank.gif - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/images/blank.gif - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 200 0 0
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/images/48error.jpg - 80 - <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/styles/ReportingServices.css - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 200 0 0
2008-05-12 20:30:54 <Edited: Server IP> GET /Reports/images/48error.jpg - 80 DomainUserName <Edited: Server IP> Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 200 0 0
2008-05-12 20:31:07 127.0.0.1 GET /reports/ - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:31:07 127.0.0.1 GET /reports/ - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 1 0
2008-05-12 20:31:13 127.0.0.1 GET /reports/ - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 2 2148074254
2008-05-12 20:31:13 127.0.0.1 GET /reports/ - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 401 1 0


I tried to highlight one of each of the HTTP errors I am getting. 401.2 and 401.1 are the ones I kind of expected, but have no idea why I'm getting them. The 500 0 error is a bit troubling, because unless I'm mistaken thats a server side error.

Here's my current setup. As far as I can tell, I've done everything to set up correctly for Windows Integerated security.



My Specs
The server machine running all SQL 2005 services. It resides in a domain. All Clients are in the same domain.


Intel Dual Processor 3.20 gig Xenon

Windows Server 2003 w/ SP2

Microsoft Sql Server 2005 w/ SP2
Reporting Services Setup
The virtual directories Reports and ReportServer are set to Windows Integrated Security with Anonymous Access disabled. All other checkboxes in Directory Security are unchecked. For permissions in Reports, I have:


Administrators (servernameAdministrators) - Full Control

ASP.NET Machine Account - Modify, Read & Execute, List Folder Contents, Read, Write

Authenticated Users - Modify, Read & Execute, List Folder Contents, Read, Write

Creator Owner - No permissions

Domain Users - Read & Execute, List Folder Contents, Read

SQLServer2005ReportingServices]WebServiceUsers$... - Read & Execute, List Folder Contents, Read

SQLServer2005ReportServerUsers$... - Read & Execute, List Folder Contents, Read

SYSTEM - Full Control

Users (CompNameUsers) - Read & Execute, List Folder Contents, Read
In ReportServer I have the same permissions except Authenticated Users is absent.

At one point, I even added the account Everybody and gave it full control, and I still recieved a HTTP 401 error. Any help at what I might be missing would be a godsend.

Thanks.

View 1 Replies View Related

Security Rights Needed To Start And Stop Services From SQL Server Management Studio

Jun 21, 2007

Hello everyone.

I have a question about granting enough rights to allow a non admin user to start and stop a sql server service via the SQL Server Management Studio by right clicking on the server node.



I have changed the acl's of the SQL Server service security and gave the user rights to start and stop the service. This does allow them to connect remotly to the server using computer manager and they successifully start and stop the service. But, in SQL Server Management Studio the option still does not show up, unless he is a admin of the server.



Does anyone know what other security settings I need to address for the start and stop to show up when I right click on the server node?

Thanks for any help

View 3 Replies View Related

T-SQL And Visual Basic 2005 Codes That Execute A User-Defined Stored Procedure In Management Studio:How To Declare EXEC &&amp; Sp?

Jan 17, 2008

Hi all,

In my SQL Server Management Studio Express (SSMSE), I executed the following sql code suuccessfully:
--insertNewRocord.sql--

USE shcDB

GO

CREATE PROC sp_insertNewRecord @procPersonID int,

@procFirstName nvarchar(20),

@procLastName nvarchar(20),

@procAddress nvarchar(50),

@procCity nvarchar(20),

@procState nvarchar(20),

@procZipCode nvarchar(20),

@procEmail nvarchar(50)

AS INSERT INTO MyFriends

VALUES (@procPersonID, @procFirstName, @procLastName, @procAddress,

@procCity, @procState, @procZipCode, @procEmail)

GO

EXEC sp_insertNewRecord 7, 'Peter', 'Wang', '678 Old St', 'Detroit',

'Michigon', '67899', 'PeterWang@yahoo.com'

GO

=======================================================================
Now, I want to insert a new record into the dbo.Friends table of my shcDB by executing the following T-SQL and Visual Basic 2005 codes that are programmed in a VB2005 Express project "CallshcDBspWithAdoNet":
--Form1.vb--

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form1

Public Sub InsertNewFriend()

Dim connectionString As String = "Integrated Security-SSPI;Persist Security Info=False;" + _

"Initial Catalog=shcDB;Data Source=.SQLEXPRESS"

Dim connection As SqlConnection = New SqlConnection(connectionString)

connection.Open()

Try

Dim command As SqlCommand = New SqlCommand("sp_InsertNewRecord", connection)

command.CommandType = CommandType.StoredProcedure


EXEC sp_insertNewRecord 6, 'Craig', 'Utley', '5577 Baltimore Ave',

'Ellicott City', 'MD', '21045', 'CraigUtley@yahoo.com'


Console.WriteLine("Row inserted: " + _

command.ExecuteNonQuery().ToString)

Catch ex As Exception

Console.WriteLine(ex.Message)

Throw

Finally

connection.Close()

End Try

End Sub

End Class

===========================================================
I ran the above project in VB 2005 Express and I got the following 5 errors:
1. Name 'EXEC' is not declared (in Line 16 of Form1.vb)
2. Method arguments must be enclosed in parentheses (in Line 16 of Form1.vb)
3. Name 'sd-insertNewRecord' is not declared. (in Line 16 of Form1.vb)
4.Comma, ')', or a valid expression continuation expected (in Line 16 of Form1.vb)
5. Expression expected (in Line 16 of Form1.vb)
============================================================
I know that "EXEC sp_insertNewRecord 6, 'Craig', 'Utley', '5577 Baltimore Ave',

'Ellicott City', 'MD', '21045', 'CraigUtley@yahoo.com' "in Line 16 of Form1.vb is grossly in error.
But I am new in doing the programming of T-SQL in VB 2005 Express and I am not able to change it.

Please help and advise me how to correct these problems.

Thanks in advance,
Scott Chang

View 22 Replies View Related

T-SQL And Visual Basic 2005 Codes That Execute A User-Defined Stored Procedure In Management Studio Express (Part 2)

Jan 23, 2008

Hi Jonathan Kehayias, Thanks for your valuable response.

I had a hard time to sumbit my reply in that original thread yesterday. So I created this new thread.

Here is my response to the last code/instruction you gave me:

I corrected a small mistake (on Integrated Security-SSPI and executed the last code you gave me.

I got the following debug error message:

1) A Box appeared and said: String or binary data would be truncated.

The statement has been terminated.

|OK|

2) After I clicked on the |OK| button, the following message appeared:

This "SqlException was unhandled

String or binary data would be truncated.

The statement has been terminated."

is pointing to the "Throw" code statement in the middle of

.......................................

Catch ex As Exception

MessageBox.Show(ex.Message)

Throw

Finally

..........

Please help and advise how to correct this problem in my project that is executed in my VB 2005 Express-SQL Server Management Studio Express PC.



Thanks,
Scott Chang

The code of my Form1.vb is listed below:

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form1

Public Sub InsertNewFriend()

Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=shcDB;Integrated Security=SSPI;"

Dim connection As SqlConnection = New SqlConnection(connectionString)

Try

connection.Open()

Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)

command.CommandType = CommandType.StoredProcedure

command.Parameters.Add("@procPersonID", SqlDbType.Int).Value = 7

command.Parameters.Add("@procFirstName", SqlDbType.NVarChar).Value = "Craig"

command.Parameters.Add("@procLastName", SqlDbType.NVarChar).Value = "Utley"

command.Parameters.Add("@procAddress", SqlDbType.NVarChar).Value = "5577 Baltimore Ave"

command.Parameters.Add("@procCity", SqlDbType.NVarChar).Value = "Ellicott City"

command.Parameters.Add("@procState", SqlDbType.NVarChar).Value = "MD"

command.Parameters.Add("@procZipCode", SqlDbType.NVarChar).Value = "21045"

command.Parameters.Add("@procEmail", SqlDbType.NVarChar).Value = "CraigUtley@yahoo.com"

Dim resulting As String = command.ExecuteNonQuery

MessageBox.Show("Row inserted: " + resulting)

Catch ex As Exception

MessageBox.Show(ex.Message)

Throw

Finally

connection.Close()

End Try

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

InsertNewFriend()

End Sub

End Class

View 6 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Qu

Jan 24, 2008



Hi,

I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query window

Please see the image through this url http://kyxao.net/127/ExecutionProblem.png


Any ideas for this issue?

Thanks a lot

View 1 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Query Window

Jan 23, 2008

Hi,I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query windowPlease see the image attached http://kyxao.net/127/ExecutionProblem.png Any ideas for this issue?Thanks a lot Jalijack 

View 2 Replies View Related

Ent Mgr. Management-CurrentActivity-Application - Error?

Mar 26, 2004

I'm having a problem with couple of users on our network not connecting to SQL exactly right. In the CurrentActivity window under the application column these users are not showing the authenticated usernames. Example: it should be username@computername but all that shows is @computername. These users get weird security problems that I have not been able to resolve. Our network admin is looking into it but he's not sure why these users should be any different than the rest. Any suggestions?

View 5 Replies View Related

SQL Security :: Cannot Expand List Of Database Tables Using Contained Database Login With Server Management Studio

Jul 30, 2015

In SSMS, I connect Object Explorer to a partially contained database using a contained user login with password. This user has a database role of dbdatareader. When I try to expand the Tables in the database, I get the error: 

The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

Is there a way to set permissions for the contained user so that this could be done?

View 4 Replies View Related

Management Studio Error

Mar 15, 2006

When executing export data task and through the wizard to include
column names within a flat file desitination and get the following
error listed below. If you uncheck the box and don't include the column
names it works correctly.



Error

- Pre-execute (Error)

Messages

Information 0x402090dc: Data Flow Task: The processing of file "C:Documents and Settings*Desktop est_2.txt" has started.

(SQL Server Import and Export Wizard)



Error 0xc0202095: Data Flow Task: Failed to write out column name for column "ClientSubGroupID".

(SQL Server Import and Export Wizard)



Error 0xc004701a: Data Flow Task: component "Destination - test_2_txt"
(22) failed the pre-execute phase and returned error code 0xC0202095.

(SQL Server Import and Export Wizard)

View 9 Replies View Related

Error When Trying To Start Management Studio

Aug 1, 2006

Hello Guys,

I am getting the following error when I try to start SQL 2005 Management Studio to manage my SQL Server :
Cannot load the DLL xpstar.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).

Any ideas ?

Thanks,

View 4 Replies View Related

Error Connecting In Management Studio

Sep 6, 2007

Hello,

I am having problems connecting to my SQL Server instance with Management Studio; basically the setup is as follows;

*Single server running windows 2003 enterprise - in a workgroup not domain
*SQL Server is installed on this machine
*When I try and connect from the same machine using its own IP address and Windows authentication I get the 18452 error "login failed for {NULL} user"

I am testing it like this because Sharepoint is failing in configuration wizard because it is connecting the same way - at least the login failure audit logs say the same.

Many thanks for answers

View 5 Replies View Related

Error Connecting To Express Using Sql Management Studio

Feb 7, 2008



Hi,

The issue,

I have had SQL express installed and working ok, however, I can no longer connect


OS: XP sp2.0

.net installed
ver1.1 .. 2.0 sp1, 3.0sp1 and 3.5

The install of SQL was using the SQLEXR_adv download

I have removed SQL and all associated applications folders and windows SQL services

I have re-installed many times but always receive the same issue.

I re-built the .net 2.0

The issue I have is when I try and connect form my applications or with Express sql management studio I receive the following error:

It looks like a .net2.0 issue


TITLE: Connect to Server
------------------------------
Cannot connect to RNASHLTOPSQLEXPRESS.
------------------------------
ADDITIONAL INFORMATION:
The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. (System.Data)
------------------------------
The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. (System.Data)
------------------------------
The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. (System.Data)
------------------------------
Configuration system failed to initialize (System.Configuration)
------------------------------
Unrecognized configuration section system.serviceModel. (C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Configmachine.config line 136) (System.Configuration)
------------------------------
BUTTONS:
OK
------------------------------

View 1 Replies View Related

SQL Server Management Studio Express Error

Jul 12, 2007

I'm trying to run the disk usage reports from the SQL Server Management Studio and I'm getting an error. I right-click on a database, go to Reports, then Standard Reports and select Disk Usage by Table. I get the error below. Can anyone help?



===================================

Object reference not set to an instance of an object. (System.Xml)

------------------------------
Program Location:

at System.Xml.XmlReader.CalcBufferSize(Stream input)
at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding)
at System.Xml.XmlTextReaderImpl..ctor(String url, Stream input, XmlNameTable nt)
at System.Xml.XmlDocument.Load(Stream inStream)
at Microsoft.SqlServer.Management.Reports.StandardReport.LoadRdlDocument()
at Microsoft.SqlServer.Management.Reports.Report.LoadReportQueriesFromRdl()
at Microsoft.SqlServer.Management.Reports.StandardReportFactory.GetReport(ReportInfo reportInfo, ReportContext context)
at Microsoft.SqlServer.Management.Reports.ReportsManager.GetReport(ReportInfo reportInfo, ReportContext context)
at Microsoft.SqlServer.Management.Reports.ReportsManager.ShowReport(ReportInfo reportInfo)

View 1 Replies View Related

Installation Error On Management Studio Express

Mar 14, 2008

Hi, I'm still getting error 2908 while installing the SQL Server Management Studio Express. The file downloads, I run it and it goes through the setup wizard. It gets almost all the way through the installation and then gets this error. The complete message is 'The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The install then rolls back. Any suggestions?



Product: Microsoft SQL Server Management Studio Express -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The arguments are: {2AC4F9E9-0BFA-4CAC-BA2E-D089C63637F5}, ,


Product: Microsoft SQL Server Management Studio Express -- Error 1935. An error occurred during the installation of assembly 'Microsoft.ReportViewer.WebForms,Version="8.0.0.0",Culture="neutral",PublicKeyToken="b03f5f7f11d50a3a",FileVersion="8.0.50727.42",ProcessorArchitecture="MSIL"'. Please refer to Help and Support for more information. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, component: {B68B643F-A989-4510-9D98-0B2385E85ADF}

View 4 Replies View Related

Installation Error On Management Studio Express

Mar 14, 2008

Hi, I'm getting error 2908 while installing the SQL Server Management Studio Express. The file downloads, I run it and it goes through the setup wizard. It gets almost all the way through the installation and then gets this error. The complete message is 'The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The install then rolls back. Any suggestions?

Here's the errors that are getting generated in the application log


Product: Microsoft SQL Server Management Studio Express -- Error 1935. An error occurred during the installation of assembly 'Microsoft.ReportViewer.WebForms,Version="8.0.0.0",Culture="neutral",PublicKeyToken="b03f5f7f11d50a3a",FileVersion="8.0.50727.42",ProcessorArchitecture="MSIL"'. Please refer to Help and Support for more information. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, component: {B68B643F-A989-4510-9D98-0B2385E85ADF}


Product: Microsoft SQL Server Management Studio Express -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The arguments are: {2AC4F9E9-0BFA-4CAC-BA2E-D089C63637F5}, ,

View 1 Replies View Related

Get Timeout Error With TableAdapter But Not With SQL Server Management Studio

Jan 4, 2008

I have found a similar problem in Google but that thread doesn't have any conclusion. So that I wish a new thread can help solve this problem ultimately.http://forums.asp.net/rss.aspx?ForumID=54&PostID=1600414Problem description:TableAdapter will raise timeout exception when I try to execute a SQL containing subquery and grouping. However, if the same SQL is executed in SQL Server Management Studio. The response time is always less than 1 second.Solution provided in previous link:Increase the timeout setting of the command - I think this is not the solution. As the default timeout should be 15 seconds, how could it get a timeout error if it execute a SQL supposed to be finished within a second?I have encountered similar problem before. However, I can't remember the exact detail. My solution for that moment seems to be using join instead of subquery in the SQL. Unluckily, this trick does not work this time.Please provide any other suggestion. Thanks in advance.

View 6 Replies View Related

Error Trying To Connect To Reporting Services Using SQL Management Studio

Jul 13, 2007

Hi.



I have some strange error trying to connect to Reporting Services.

At the beginning I was suspecting some accounts issues.

But after checking all the accounts under wich ASP.NET, SQL SERVER, Reporting Services are running I don't even know what to think.

After searching internet for answers the only similar problems' solutions were remove RS and install it again.

Have anybody here had this problem? Can you just fix something without reinstalling RS? The error is:





Object reference not set to an instance of an object



------------------------------
Program Location:

at Microsoft.SqlServer.ReportingServices2005.RSConnection.GetSecureMethods()
at Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(String methodname)
at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()
at Microsoft.SqlServer.Management.UI.RSClient.RSClientConnection.CreateConnection(String connectionString)
at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.CreateConnectionObject()
at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.RSTypeImpl.GetConnectionObject(UIConnectionInfo ci)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RSType.GetConnectionObject(UIConnectionInfo ci)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectorThread()

View 2 Replies View Related

SQL Server Management Studio Express Startup Error

Apr 13, 2008

When launching Microsfot SQL Server Management Studio Express, I get a Popup Error box (!) without any text. After pressing the OK button, everything seems to work fine. Any ideas as to what it's trying to tell me?


View 3 Replies View Related

Management Studio Express Installing Error In Vista

Jan 29, 2007

At installation Management Studio Express in Vista there is a mistake with what that number. Management Studio it is not supported in Vista?

View 5 Replies View Related

Error Running SSIS Package From Management Studio

Aug 7, 2007

Hi

I created SSIS Package to transfer tables from one sql2005 DB to another sql2005 DB.
When I execute the package from the BIDS it execute succesfully.
However, when I import the package (file system) to the management studio - msdb - stored packages and run the package from there (right click: Run Package) I get this error:

the validate method on the task failed, and returned error code. the validate method must succeed and indicate the result using an out parameter.

what is the reason for this error?

I aprriciate your help.





SeoAndSo.com

View 6 Replies View Related

Error Installing SQL Server Management Studio Express

Dec 7, 2006

Yesterday I successfully installed Microsoft Visual Basic 2005 Express Edition which included SQL Server 2005 Express.  Today I noticed I needed to download the Management Studio seperate download.  I downloaded SQLServer2005_SSMSEE.msi and executed it and get the following error:

 

Error reading from file C:...SQLServer2005_SSMSEE.msi. Verify that the file exists and that you can access it..

 

Solved my own problem.  Once I moved the msi to C: the installation worked.  Apparently the path it was in was too long causing it to be unreadable. c:xxxxxxxxSQLServer2005_SSMSEE.msiSQLServer2005_SSMSEE.msi.

 

View 1 Replies View Related

Error Importing SSIS Packages On SQL Management Studio

Aug 6, 2007



I encounter this error when importing SSIS packages using SQL Server Management Studio:

===================================
Unable to cast object of type 'Microsoft.SqlServer.Dts.ObjectExplorerUI.ImportPackageAsAction' to type 'Microsoft.SqlServer.Dts.ObjectExplorerUI.ISimpleAction'. (Microsoft.SqlServer.DtsObjectExplorerUI)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.ObjectExplorerUI.DtsServerMenuItem.Invoke(INodeInformation parent, String mode, String assembly, String type)

The Integration Services that I'm using has just been rebuilt due to problems after installing SP2. I'm using Integration Services 9.0.3042. I can't find anything having this same problem. Any help will be appreciated.

Thanks!

View 4 Replies View Related

Attach Error In Sql Server Express Management Studio

Mar 14, 2006

tried to attach a database in sse-ms, and for some reason the database name is changing to G:someFoldersomeFolderdb.mdf, even tho i dont have a drive g:,

during "attach as" screens inside sse-ms, , ie attach>add> then select the database the mdf loction is what it is suppose to be ie C:inetpubwwwrootapp_datachp11wroxunited.mdf but the database name in the same screen shot is G:someOtherFolderAndPathwroxunited.mdf and the attach as is also the G:someOtherFolderAndPathwroxunited.mdf.

pretty confused, could use a clue, thanks



View 3 Replies View Related

Integration Services :: Getting Error While Execute SSIS Package From Console Application

Apr 23, 2015

SSIS package working fine directly.I got following error while execute SSIS package from C# console application.

The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]" in the connection manager collection of "OLE DB Destination".
Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
OLE DB Destination failed validation and returned error code 0xC004800B. One or more component failed validation. There were errors during task validation.

Code : 

   public static string RunDTSPackage()
        {
            Package pkg;
            Application app;
            DTSExecResult pkgResults;
            Variables vars;
            app = new Application();
            pkg = app.LoadPackage(@"D:WORKPackage.dtsx", null);
     Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = pkg.Execute();
}

I have recreate the application with again new connection in SSIS. Still not working.

DB : SQL Server 2008 R2

View 6 Replies View Related

'Too Many Characters' Error In Sql String - Working In SQL Management Studio But Not In Code Behind???

Jan 26, 2008

Hello i constructed the following query in SQL management studio and it runs fine, exactly how i want it to. However when i run it in my code behind i get the error: 'Too many characters in character literal'
I desperatly need to use this query exactly how it displays in the mangement tool - why wont it work the same in my code behind?
(I am using c# in my code behind and binding the results of the query to a gridview)
Regards
"SELECT DISTINCT (dbo.AuthorList(publicationID))+ ';' + ISNULL(' Editor: '+Publication.editor, '')+ '' + ISNULL(' "'+Publication.title+'"', '')+ '' + ISNULL(' Book: "'+Publication.booktitle+'"', '')+ '' + ISNULL(' '+Publication.type, '')+ '' + ISNULL(' '+Publication.journal, '')+ '' + ISNULL(' Series: '+Publication.series+'.', '')+ '' + ISNULL(' '+Publication.school, '')+ '' + ISNULL(' '+Publication.institution, '')+ '' + ISNULL(' '+Publication.organisation, '')+ '' + ISNULL(' '+Publication.month, '')+ '' + ISNULL(' ('+convert(nvarchar, Publication.year)+')', '')+ '' + ISNULL(' '+Publication.publisher, '')+ '' + ISNULL(' '+Publication.address+'.', '')+ '' + ISNULL(' '+Publication.howpublished, '')+ '' + ISNULL(' Ed: '+convert(nvarchar, Publication.edition)+'.', '')+ '' + ISNULL(' '+Publication.note, '')+ '' + ISNULL(' Vol:'+Publication.volume+'.', '')+ '' + ISNULL(' No:'+Publication.number+'.', '')+ '' + ISNULL(' Pages:'+Publication.pages+'.', '')+ '' + ISNULL(' Chapter:'+Publication.chapter+'.', '') AS SingleColumn, Publication.publicationID FROM Publication;"
 
 

View 1 Replies View Related

Cannot Install Workstation Components (Management Studio,etc) (ADD_LOCAL Error)

Feb 27, 2008

I have Vista Ultimate (IIS Enabled), SQL Server 2005 Developer Edition
(downloaded and ran the SP2 Update), Visual Studio 2008. VS2008
installs no problem. When I install SQL Server 2005, I get an error
when it trys to install the last part( Workstation Components,
Management Studio, etc).
I have tried FULLY, MANUALLY removing all SQL products and registry
entries. I have used Windows Installer Cleanup Utility. I have tried
Microsoft's recommended way of manually removing SQL Server 2005.
If I manually run SqlRun_Tools.msi the error comes up right away.


The error is:
"A component that you have specified in the ADD_LOCAL property is
already
installed. To upgrade the existing component, refer to the
template.ini and
set the UPGRADE property to the name of the component."


Here's the Setup Error log: http://toby.pastebin.com/f63405e24
Any help?! Thanks!
-Toby

View 11 Replies View Related

Management Studio Disconnects With Error Msg 0, Level 11, State 0, Line 0

Nov 3, 2006

I am trying to run the following:

select * from sysindexes

The operation begins and results are produced but after about 200 results, I get the error - Msg 0, Level 11, State 0, Line 0 - and it disconnects.

This is a DB moved (restored) from SQL 2000 to SQL 2005.

Any ideas would be appreciated. I am the "make do" DBA and not very good at it yet, I am afraid.

Regards,

Mike







View 8 Replies View Related







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