Creating User From Application

Feb 16, 2004

I'm trying to create a user from a powerbuilder application through powerscript.
I'm trying to create first the login using sp_addlogin
but I'm getting the following error
[microsoft][odbc for sql server]the procedure sp_addlogin cannot be executed in transaction.

Plz does someone know what should I do?

View 1 Replies


ADVERTISEMENT

Failed To Generate A User Instance Of SQL Server Due To Failure In Retrieving The User's Local Application Data Path. Please Make Sure The User Has A Local User Profile On The Computer. The Connection Will Be Closed

Dec 7, 2006

This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database)
Help pleaseee

View 3 Replies View Related

Creating A New User For Sp Execution Say Sa (to Whom I Am In Need Of Creating Under My User Defined Db )

Jul 11, 2007

I am in need of creating a new user for stored procedures execution say sa (to whom i am in need of creating under my user defined db)

View 1 Replies View Related

Please Help *** Failed To Generate A User Instance Of SQL Server Due To Failure In Retrieving The User's Local Application Data Path

Apr 28, 2008

Hi all hope some one can help - please bear with me new to this
Basically I have had to change pc's so I copied and pasted my ASPNET.MDF and LDF from my old pc to new PC including webpages/apps etc.. created.
However now all I get is "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path """"
Just don't understand what permissions the db should have, does it need to match the SQL Express owner...
 
any help would be most appreciated
 
Thanks
 
Chris 
 
 

View 5 Replies View Related

Failed To Generate A User Instance Of SQL Server Due To Failure In Retrieving The User's Local Application Data Path

Jun 21, 2005

I installed my asp.net 2.0 web application  and sql express june editon on my windows 2003 server.When the application tries to reach the database i am getting the following error"Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed."I can understand that it has something to do with user right but more than that I am pretty lost. Can anyone translate this error for me and give me some tips on what do to.I checked first the user running the sql express service and saw it was the NETWORK SERVICE user. I changed it to be the local system account but that did not make any difference. The application is running just fine on my local computer(Win XP sp2). This one has SQL express April edition though.

View 3 Replies View Related

Analysis :: Creating User Who Can Only Do User Management Activities?

Nov 25, 2015

I would like to limit the role of an user In Visual Studio only to assign roles to other users for the cubes. Other than that the user should not be able to create / delete the exisiting cubes or dimensions.

View 2 Replies View Related

Creating Tables Within My Application.

Jul 20, 2005

I am having the following problem and any help would be GREATLYappreciated:In an application I am developing, at some points we create a newtable. When I create this table on another users box, I can not accessit from my box. In sql server I am dbo, but the table created by myapplication when run on a different box has an owner of : "FCxxxx". Ihave sent permissions on this thing to public, but I am still gettingan error when I try to query this thing from my application. And I cannot get query analyzer to recognize this thing. I can see it inEnterprise manager. I would think there is a way to handle this sortof thing. If anyone out there has done anything like this I would bemuch obliged for any ideas. Thanks.Sincerely,Ed HawkesJoin Bytes!

View 1 Replies View Related

Creating A Subscription Via An Application

Mar 9, 2007

Hello,

I am wondering if there is some sample code out there that shows how to create a subscription for a report on reporting services via a win app or if anyone has a better suggestion. We are wanting to have a report that resides on reporting services server be sent to a client via email subscription, but do not want the client to goto the actual website that host reporting services. Thanks in advance.

John

View 3 Replies View Related

Creating UserInstance DB At Application Startup

Mar 3, 2007

Hi,

I'm developing a WinForms app that will be deployed via ClickOnce deployment and that uses SQLExpress as a local data store. In order to avoid the upgrade DB problem, I'm having my application check for a database and check its version on startup. I am able to successfully create the database if it does not exist, but when I try to connect to the new database, I get a login failed error. However, if I restart the app, it is able to connect to the newly created instance. Here's what I'm doing:

If the db does not exist, I connect using this connect string:
Data Source=.SQLEXPRESS;Integrated Security=True;User Instance=True;Connect Timeout=60

I then issue a CREATE DATABASE command and run my table scripts. I then try to reconnect as

Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ImportToolData.mdf;Integrated Security=True;User Instance=True;Connect Timeout=60

When i attempt to connect to the newly created database, I get a login failed error message. However, if I restart the application and try to connect using that same connection string, it succeeds. Any ideas why I would have to restart the app to successfully connect to the new database?Thanks, Scott

View 6 Replies View Related

Creating A Mobile Application With SQL Server Compact Edition

Jun 28, 2007

Hello!!



I completed that example that I pasted in the subject part and when I try to synchronize my mobile database, the data from the server appear in my pocket pc; but when i refresh the data on my pocket pc they do not show on the server.



Can anyone give me a hand?



thanks

View 3 Replies View Related

Creating A Distributed Service Broker Application Without Using Certificate.

Aug 14, 2007



hi all,
i want to create a service broker application between two different instances.
can i achieve the dialog security and transport security with out using certificate?
like we can achieve the transport security using windows authentication (both the instances are in same domain).
so how to achieve the dialog security with out using certificates.

if any body has any link plz provide me.


Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!



View 3 Replies View Related

Creating A Database Based Webservice And Accessing It Through Windows Application

Jun 11, 2008

Geekz,
My problem is that , I had setup blog on server say, blog.xyz.com [I am using blogengine.net, which is in ASP.Net]. It is using sql server2005 as a backend for storing its blog's posts. After settingup blog, i tried  to access its database through my windows application. But while development I was getting error that
"An error has occured while establishing a onnection to the server. When connecting to SQL server 2005, this failure may be caused by the fact that under the defaukt settings SQL server doesnot allow remote connections.(Provider Named Pipes, error :40 - Could not open a connection to SQL Server)"
 I am using  [String ConnectionString = "Data Source=sql-v123.mesa11.1Server.net; Initial Catalog=abc; User ID=xyz; Password=xyz123";]
Then I decided to created a webservice that will access the data from databse blog and store it somewhere in datatable  and using windows application i will retrieve those data for end user. So I want to to know that whether i can access the datatable of webservice holding the blog data from windows application or not. if answer is Yes, then please provide me with source or some great links. Or if There is any other option so that I can access my database directly from windows application, then it would be better. Looking for your answers.
 Thanks and regards

View 3 Replies View Related

Creating Instance Of SqlServer.Dts.Runtime.Application Takes 30 Seconds

Jan 9, 2008



Hi guys, need help again.

I'm running packages from C# code and thus I need to create an instance of SqlServer.DTS.Runtime.Application.
In my maching, creating the application instance doesn't even take 1 sec but when the application was deployed to our QA server creating the instance took 30 secs (always ... every single time with no exception).

this single code is taking the 30 secs:

Application integrationService = New Application();

Does anyone have any idea what I need to check or configure to make this faster?

View 5 Replies View Related

User Application Statistics

Jul 16, 2014

I have an application audit table (e.g. audit_log) which records the following information :

user_id row_creationaction

200392014-05-15 13:09:20.00020
200482014-05-15 13:15:22.55020
200392014-05-15 13:30:33.54021
200482014-05-15 15:44:14.74721
200482014-05-16 08:10:27.52320
200482014-05-16 08:39:21.18721
200482014-05-19 08:22:54.92020
200482014-05-19 08:24:06.59721
200482014-05-19 09:42:34.90720
200482014-05-19 10:23:19.09021

where action is defined :
20 = login
21 = logout

How can I query the table for following management information (in SQL SERVER 2008)?

1. Last user login?
2. How long(i.e. duration) user has been online for the day?
3. How many times user has login or logout per day?
4. which users logged into system on certain day?
5. Which users still logged in after 11pm?
6. Any other statistic that could be useful to management?

View 1 Replies View Related

Application / User Defined Categories?

Mar 9, 2004

I have about 10 required (never to change) categories in my tbAccountCategories table, but after that, the user can add as many
as he/she wishes. I use an identity field to identify each record. The problem is I want to reserve the first 20 rows for the application and thereafter is for the user. Should I just create 20 rows with the category description field = 'Reserved' ?

Also, how do I reindex the identity fields that it cleans up gaps and starts back at 0?

Mike B

View 4 Replies View Related

Finding Out All The User Tables Being Used By An Application

Jul 23, 2005

Here's the situation, developers inherit a web app from someone,backend SQL db has about 120 user tables and the db is also being usedby other apps. Developers don't have a list of user tables being usedby this app, now, I need to create a new db based on this one, whichwould be used by this app only. So, I intend to find all the usertables being used by this app, then copy its schema and possibly dataas well to a new db. FYI, current ERD is not this app.One option to find out all the user tables being used by this app is todo recursive search for FROM and JOIN against the full spectrum of theuncompiled source code, then, weed through such an extracted list whenin doubt about a particular table, one caveat is a portion of code withsql stmt could have already been commented (no longer being used thoughstill in the code).Better option?TIA.

View 3 Replies View Related

Restrict Application User With Specific Data?

Oct 18, 2013

i am using sql server 2008R2 and i want to restrict my application user to view only the data(ships) related to him only.

We have database and many vessels with many owners, basically wants the owner could only view his owned vessels not the vessel owned by another owner.

View 2 Replies View Related

SQL Security :: User Login Failed For Web Application

Nov 19, 2015

We have a Web application that requires user authentication.  We have a Login Page for user's to login and be authenticated.  We also manage the user accounts using SQL Server Membership Provider.  We created aLogin user in SQL Server and used this user's privileges to connect to SQL Server in our website's connection strings.  Example, in our Web.config file, the connection string is:

<connectionStrings>
  <addname="MyConnectionString"connectionString="Server=MYSERVERNAMESQLSERVER2012;Initial
Catalog=MyDatabase;User Id=TUser;Password=MyPassword"providerName="System.Data.SqlClient"/>
</connectionStrings>

The problem now is when a user logs in, it's throwing an error that TUser's password has already expired.  We did not enforce the password policy and expiration date for this user.  So, I'm wondering why it's giving me this error.

View 2 Replies View Related

ASP .NET Application Is Hanging When Number Of User Grows

Aug 22, 2007

Hi,


Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.




Help Class Modified Code:
--------------------------------------
Code :


' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If



Data ObjectBase :
---------------------------


'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

View 6 Replies View Related

Login Failed For 'user' (Application Role)

Oct 16, 2006

I've created a database in SQL Express and I have a Windows form attempting to connect to it through SQL Authentication. Connection string:

private string connString = @"Data Source=.sqlexpress;Initial Catalog=SQLTestDatabase;User ID=SearchAppRole; Password=password;";

The role I have added to the database is an Application Role. It has been added to the Database permissions with Grant checked for "Select" and "Authenticate".

If I test this with query analyzer, it returns expected results (if I remove Grant from 'Select', it fails)

sp_setapprole 'SearchAppRole', 'password'

select * from recipe

If I edit my connection string (for testing purposes) to use the sa account, the application can connect and run the Select statement:

private string connString = @"Data Source=.sqlexpress;Initial Catalog=SQLTestDatabase;User ID=sa; Password=sa_password;";

However, I cannot get the application to successfully logon and run the select statement when using the user id and password of the Application Role. I get error:

System.Data.SqlClient.SqlException: Login failed for user 'SearchAppRole'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj


I can't find much information on Application Role...I just want one basic permission for the application as a whole. Any help is appreciated. Thanks.

View 3 Replies View Related

Permissions Granted To An Application Intead Of A User

Feb 20, 2007

I have an application that talks to an access db located on a 2000 server. I would like grant permissions to the application instead of a specific user. Any help would be great...

View 6 Replies View Related

Server Error In Application. Problem When User Name Has An Apostrophe In Name.

May 16, 2006

This is my code and all works great except when there is an apostriphe in the logon name. 
Example:  MRPJUser ( works greate )
Example: MRPJ'User (I get the server error at the bottom) 
Is there an Imports statement that would fix this, or where is my code failing, and what do I need to do to fix it?
 
 
<Code>
Imports System.Web.Security

Imports System.Security.Principal
Imports System.Threading
' Imports System.Net.Dns
Public Class LogIn
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim hostName As String = Request.ServerVariables("REMOTE_HOST")
txtIPAddress.Text = hostName
Session("ComputerIP") = txtIPAddress.Text
txtUserName.Text = HttpContext.Current.User.Identity.Name()
Session("UserName") = Trim(txtUserName.Text)
TextBox1.Text = Trim(Session("UserName"))
LoadPage()
End Sub
</Code>
 
 
 
Server Error in '/ITWorkOrder' Application.



Line 1: Incorrect syntax near 'Test'. Unclosed quotation mark before the character string ' '.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'Test'. Unclosed quotation mark before the character string ' '.Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:




 [SqlException: Line 1: Incorrect syntax near 'Test'.Unclosed quotation mark before the character string ' '.]   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742   System.Data.SqlClient.SqlCommand.ExecuteReader() +42   ITWorkOrder.LogIn.LoadPage() in C:InetpubwwwrootITWorkOrderLogIn.aspx.vb:163   ITWorkOrder.LogIn.Page_Load(Object sender, EventArgs e) in C:InetpubwwwrootITWorkOrderLogIn.aspx.vb:156   System.Web.UI.Control.OnLoad(EventArgs e) +67   System.Web.UI.Control.LoadRecursive() +35   System.Web.UI.Page.ProcessRequestMain() +750
 

View 1 Replies View Related

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

How To Set My ASP.NET Application To Access SQL Server 2005 Using Client's User Credentials?

Jan 29, 2007

Hi guys,I'm not sure if I'm just bad at googling but I can't seem to find a way to set an ASP.NET 2.0 web application to connect to SQL Server 2005 using the current client's user credentials. My web application is using Integrated Windows Authentication so its Page.User.Identity is set to a DOMAINusername value... I want to pass that to my connectionstring or have my connections pick up the identity automatically and use that Identity when accessing the db server.Oh and another thing, my IIS Application Pool is using a specific Identity itself, so I don't know if that might affect the above.Hope someone could help. 

View 2 Replies View Related

SQL Server 2012 :: Query For User Access To Application Modules

Mar 24, 2015

I have to create a query that will be returning the users and the application modules they have access for. Along with the list of users and modules the query should also return if any module is not accessible for that user.

The 'ApplicationUsers' table is like this:

CREATE TABLE #ApplicationUsers
(
userId INT,
UserName VARCHAR(50)
)
INSERT INTO #ApplicationUsers VALUES
(1, 'Daniel'), (2,'Martin'), (3, 'Brandon'), (4, 'Doug')The 'ApplicationModule' table is like this:

[Code] .....

I used pivot query but there are a couple of limitations in it(may be I am making mistakes in it). First, the pivot columns are static whereas I need dynamic column names(Application Modules). Second, I need to include all the users with all the modules with access or without access that I am unable to achieve.

View 5 Replies View Related

Installing Onto Windows 2003 Server For Multi-user Application

Apr 22, 2006

Good Day,

I have an application that is being developed on Visual Studio 2005 (VB) and SQL Express. The application is set up to use the SQL Express on the development computer, and if an Internet or CD install is built, it installs SQL Express as expected. The question is, when it is time to deploy and put the SQL Express database on the 2003 server, how should the install on the server be done and how should we set the database path to the server?

Thanks,

Dave

View 1 Replies View Related

Data Access :: Login Failed For User When Run Application In Network

Jun 9, 2015

When i wanna run Application in other computers in network. The following error occurs.

error : System.Data.SqlClient.SqlException: Login failed for user 'Suren-PCGuest'.ConnectionStr = "Data Source=SUREN-PCMSSQLSERVER,1433;Initial Catalog=WorkFlow;Integrated Security=True";

View 5 Replies View Related

Can An Authorized User Like SA Create A Table Which The Owner Is Any Users Who Use The Application?

Aug 20, 2007

Hi,

autorized user: sa
any user : nuran
temporary table: birtablo

I need a stored procedure will execute by sa and it will create some required temporary tables for each users. For example table name is birtablo. I mean sa will create table for nuran, and when I checked the owner of the table (birtablo) I want to see nuran not dbo.
sa will execute following command:

create table nuran.birtablo (...........)

Is it possible to cerate a table by sa on behalf of any user? If it is, could you please explain?



Thanks

Nuran

View 5 Replies View Related

How To Propagate User Identity Form Application Server To Database

Apr 21, 2008

Hi All,

I am new to MS SQL SERVER 2005.
My web application using SQL Server 2005 as back end database to store all the information.
I am using connection pooling to get connection form db.
But my fron end user( user who logged in into webapplication) lost his identity b'coz for database user is application server.
Now I wanna to track front end user in db.

In oracle I can do it by using CLIENT_IDENTIFIER. But in sql server I don't know how to do it.

in oracle i can do it as below
public void setIdentity(Connection conn, String identity) {
PreparedStatement ps;
try {
ps =
conn.prepareCall("begin dbms_session.set_identifier(?); end;");
ps.setString(1, identity);
ps.execute();
ps.close();
} catch (SQLException e) {
// Handle the exception
}
}
<!--[if !supportLineBreakNewLine]-->
once the transaction is complete, the application should reset the identity as follows:

public void clearIdentity(Connection conn) {
PreparedStatement ps;
try {
ps = conn.prepareCall("begin dbms_session.clear_identifier(); end;");
ps.execute();
ps.close();
} catch (SQLException e) {
// Handle the exception
}
}
<!--[if !supportLineBreakNewLine]-->
Please guide me for same.

Thanx in advance.

Bhadu<!--[endif]-->

View 6 Replies View Related

Creating A User By SID

Jan 5, 2008

I am trying to create a database setup script that will work on various OS languages. One of the things the set up script has to do is grant permissions to the NETWORK SERVICE account. This is simple when we are running on the English version of Windows with the command:




Code Block
CREATE USER [NetworkService] WITH LOGIN [NT AUTHORITYNETWORK SERVICE];




Unfortunately, if you run this on a French language version of Windows, the login is called something like [NT AUTORITESERVICE RUSSEAU] or something similar. This causes the script to fail.

I think I should be able to get around this by using the well known SID for this account (S-1-5-20) and SUSER_SNAME() to resolve to the name for the account in the local language.

Here is the code I've written:




Code Block
SET @user = quotename(SUSER_SNAME(0x010100000000000514000000));
SELECT @user;
CREATE USER [NetworkService] FOR LOGIN @user;






Everything seems to be working up to the last line. The SELECT @user line returns [NT AUTHORITYNETWORK SERVICE] on my English language server as expected. Unfortunately, the last line results in a syntax error.

This may be a really dumb question, but I'm not really a DB developer, so I'm stumped. Any ideas on how I could make this work?

Thanks,
Bill

View 4 Replies View Related

Creating User Accounts

Jan 17, 2005

Hi,
how do you create a username and password for a database in SQL.

Thanks

View 3 Replies View Related

Creating A Read Only User

Oct 10, 2005

I'm not in our IT section but am responsible for the running of a finance application on SQL 2000.

I want a Read only user set-up on the SQL DB so that we can use Crystal and Access to look at the tables.

IT have some concerns with this as they say it by passes all security.

Are they spinning me a line?? Surely read oonly is read only? Can a user be restricted to a specific database as there are a number running on the same server.

Many thanks for any advice comments.

Tony

View 2 Replies View Related

Creating User In SQL Server

Mar 11, 2007

i am a newbie in SQL Server. i want to add a new user to my database, whom i want to grant only insert, update, delete, select commands and some procedures/triggers. i need to log on to the database using that user from my asp.net application. i might have several users to log no to the system and for each user i need a set of tables in the databse. i want to wirte the procedures /triggers once for all the users in the database where they can access. i can write the procs under dbo schema, but i what about the tables?

currently i am using SQL Express to test my database. i have Management Studio Express installed on my PC.

S ]-[ /- | ]-[ /- N

View 2 Replies View Related







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