System/User View

Mar 7, 2005

:confused: How can we determine which views in SQL-database is system or user, by making a query to any system tables?

Thanks in advance,
Jai

View 4 Replies


ADVERTISEMENT

System.Data.SqlClient.SqlException: Login Failed For User ''. The User Is Not Associated With A Trusted SQL Server Connection.

May 17, 2006

 
Hi all,
Can someone explain it to me  why I am getting the following error when I try to connect SQL server express with .NET 2.0?
 
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: Login failed for user ''. The user is not associated with a trusted SQL Server connection.Here is my code and i am using windows authentication:
<%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.SqlClient" %>
<%
        Dim connAkaki As SqlConnection    Dim cmdSelectAuthers As SqlCommand    Dim dtrAuthers As SqlDataReader        connAkaki = New SqlConnection("Server=.SQLEXPRESS;database=akaki")             connAkaki.Open()        cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest",  connAkaki)    dtrAuthers= cmdSelectAuthers.ExecuteReader()            While dtrAuthers.Read()          Response.Write("<li>")          Response.Write(dtrAuthers("Firstname"))              End While        dtrAuthers.Close()    connAkaki.Close()    %>
 

View 2 Replies View Related

Programmatically Adding A User To The System User Role

Dec 27, 2006

We have been working on an application that will be using a forms-authenticated report server (RS2005) as a reporting back-end. Using the reporting services web service I have been able to assign permissions to objects in reporting services no problem. The issue is that each user needs to be added to the System User role to be able to use the report builder properly. I can't seem to find a way to do this programmatically. Any idea?

View 1 Replies View Related

Trigger On System View

Mar 24, 2006

Hi,

Is there a way to create a Trigger on the Systemview [sys].[dm_exec_connections] ?

The Statement below Fails.

CREATE TRIGGER [dbo].[TG_CLEAN_LOCK_ID] ON [sys].[dm_exec_connections]

AFTER DELETE

AS

I need a trigger to be fired when a Connection ([sys].[dm_exec_connections] .[connection_id]) drops.

Is it principally impossible to create a trigger on a system view or is it just a lack on permissions making my SQL fail?

Is there any other way for surveying wether a connection is alive or not, without polling?

Thanks in advance

Raimund





View 3 Replies View Related

HOW Can You View Operating System Of The Sql Server 2k

Sep 19, 2006

ARIAL

HOW can you view operating system of the sql server 2k??

View 2 Replies View Related

What Is The System View For Master Keys

Nov 17, 2006

What system view do i use to determine is a database has a master key?



Thanks,



Ed

View 1 Replies View Related

How To Examine SQL Clause Of An System View

Apr 13, 2008



I'm having some difficulties getting sql server replication to properly filter joined tables to my subscribers. I would like to examine the contents of the view the system uses to select the data from my subsidary tables. Unfortunately these views are marked as system views, and I cannot view the underlying SQL clause.

I imagine this data is stored somewhere in yet another system table... does anyone know how I can examine the sql statement of a view that is marked as a 'system view'?

Thanks,

MD

View 12 Replies View Related

How To Create A System Type Table/ Change User Table To System Table.

May 23, 2007

Is there any Posibility to change a User Table to System Table.

How to create one system table.

I am in Big mess that One of the Table I am using is in System Type.

I cant Index the same. Is there any Mistake we can change a user table to system table.....

View 9 Replies View Related

How To Get Information From System Table Or View For Trigger's Definition

May 29, 2008

Such as check all triggers that assign value to some columns ?

Thank you very much.

View 1 Replies View Related

Error Msg 3701 : Cannot Drop The View &#39;x&#39; Because It Doesn&#39;t Exist In The System Catalo

Jun 25, 2001

I am work on SQL Server 6.5

When I want to drop a view then appear error message :

"Msg 3701, Level 11, State 1 Cannot drop the view 'EUL_ODBC_SCHEMAS',
because it doesn't exist in the system catalogs."

Has anybody else experienced this, and do you know what is causing the warning?

Thanks in advance for any replies.

View 2 Replies View Related

How To Prevent System Administrator To View And Edit A Database Structure And Data

Dec 26, 2007

I represent a software development house and we have developed a client server system based on SQL Server. Most of our customers have already purchased Enterprise License of SQL Server, therefore they own the SA Login and Password. We are bound to attach our Database with their Server on their machine.

My question is how can we stop a System Administrator of SQL Server to view our Database Structure, Queries, Data installed on their SQL Server on their machine.

Our database structure is a trade secret and we cant reveal the structure to the client.

please answer this question by email to me at farhandotcom@gmail.com

Thanks & Regards
Farhan

View 1 Replies View Related

User Rights System

Feb 22, 2007

I need some advice with a msSQL 2005 databaseI'm creating a administration program in vb.net based on a new msSql db. This programme is involved with customeradmin, facturation, products, sales,...by example: Some employees don't has anything to do with product, so they don't need the rights to delete, create or edit it.The question is how can i resolve this problem, because i don't find any good solution. The rights are for every employee different, and can be changed by a admin panel. The admin can give a employee specific rights for every part of the programmeso how can we give a user certain rights when he is logging in into the program.thanks, BoardD :S ;)

View 1 Replies View Related

Identifying System/User Databases

Nov 12, 2002

Hi,

i´m looking for TSQL-Code (7.0/2000) to identify, if a SQL Server Database ist a SystemDatabase or a UserDatabase. In the sysdatabases there is no information abount that.

Skol,
Peter

View 4 Replies View Related

How To Get User Name Of The Person Loged In To The System In SQL

Sep 27, 2007



Hi,

I have written a trigger for audit trail of one table in SQL and it has to get the user name who is doing the changes from the application(.net)
I have used the SQL user name and password while connecting the .net application to the database, and because of this whoever log in to the application and make changes on that table data, in the audit trail it still shows as the database user name.

I want to display the user name of the person logged in to the application

In the query i am using "System_user" for getting the user name. And the connection string in my application has a default uid and pswd.

I want to retain uid and pswd in the connection string but still want the query to get the name of the correct logged in user to the application.

Can anybody say me if this possible.

Thanks
Gayathri.

View 3 Replies View Related

Deny User Permissions To See System Views?

Jun 4, 2008

Hi all, Is there any easy way to not allow a user to see system views?  I have set up 1 view for a login, and I have to use an ODBC connection to access it.  However, the 3rd party application I'm using is apparently timing out because of the number of tables/views that are returned. TIA! - Mark 

View 2 Replies View Related

Login Failed For User 'NT AUTHORITY/SYSTEM'.

Jun 9, 2008

Hi,
I can view the site fine on VS developlement sever, but not through IIS 7. Whenever i try to run it, i get this error: Login failed for user 'NT AUTHORITY/SYSTEM'. The problem is that i am not using this user to access my database, so i don't know where it came from. I mapped this new user to my database and changed my web.config file accordingly to see if it works, but it did not.
i have looked high and low for this, but i don't seem to find a solution that solved my problem. I am running Vista, IIS 7 and have forms security on my website.
Any suggestions will be very much appreciated.
E

View 5 Replies View Related

Domain User Or Local System Account ?

Jul 20, 2005

Hello,My server is part of a W2K domain. What do you advice me as account torun my SQL*Server, service started with a domain user account or aslocal system ?I need advices from a security point of view.Thank's in advance

View 4 Replies View Related

Logging With Another System User Cannot Access My Database

Mar 3, 2008

Hi,

I am using SQL Server Express Edition 2005 as a backend database working with Visual Basic 2005.

I am using Vista and having two users to access to my computer. User-1 and User-2.

I created a database in User-1 and works fine Visual Basic 2005.

Now the problem is when i login to my computer system with User-2. I cannot able to access the database with encountering error like "User-1/SQLExpress". I know that i cannot able to access to database which was created in User-1.

Do you any solution to this problem. when i login with user-1 and user-2 it should able to access database.

Thanks.

Regards
Kashif Chotu

View 1 Replies View Related

How To View All User Permissions?

Mar 14, 2007

I've seriously looked, but this simple concept eludes me. How do I go about viewing all the permissions granted to a database user? Like whether or not they can execute a stored procedure.

View 1 Replies View Related

SQL User Defined View

Aug 22, 2007

I've a view in which one of the fields were  DATEDIFF(day,contract date,received) AS AgeOfAccount. I changed it to DATEDIFF(day, m.received, CASE WHEN m.clidlp > m.clidlc THEN m.clidlp ELSE m.clidlc END) * - 1 AS AgeOfAccount. When I execute the view  I'm getting an error. But the results are getting displayed properly. That's what's puzzling me. Could someone tell me what the error is.
 
The following errors were encountered while parsing the contents of the sql pane. 
Your entry cannot be converted to a valid date time value.

View 4 Replies View Related

How To Assign The View To A User?

Oct 29, 2006

im using the Northwind database, i use T-SQL commands to create a view that restricts users from seeing the address, city for all employees.
i dont know how to assign the view to a user in the database using Enterprise manager.
pls help me, im really needing a answer.
thanks!

View 5 Replies View Related

A New User Cannot View Reports

Nov 28, 2007



Hi,
i have a prob;lem while using report manager.when i login As "administrator" to the report manager i can see all the folders and i can check also reports. when i create new users with some role and i login as new user i can see the specified folder and report but when i click to see the report this message appear:
" Your browser does not support scripts or has been configured not to allow scripts".
Note that these same reports i can check them when i login as administrator

i am using sql server 2005

please it's important to resolve this problem as soos as possible
thx
labiba

View 3 Replies View Related

Identifying Difference Btwn System And User Objects??

Mar 17, 2000

Does anyone know the logic that Enterprise Manager/SQL Server uses to distinguish system objects from user objects. I've looked through all the sysobjects in the database and there doesn't seem to be any unique logic for seperating all objects. User tables are easily distinguished from system tables (U/S) but thats not the case with stored procedures and views. I'm looking for suggestions...
Thanks,
Adam

View 1 Replies View Related

Can SA User Access Folder Located In Local System?

Mar 6, 2014

Is there any way sa user can access folder located in local system.

Server Info:
SQL Server 2008 r2
OS: Windows Server 2008

View 1 Replies View Related

How Do I Change The Type Of A Stored Procedure From User To System?

Aug 11, 2005

I built a database by using a generated script from the originaldatabase. It built the System Store Procedures as User type. How do Ichange them back to System type?

View 4 Replies View Related

Set Grid View Header According To User

Apr 10, 2008

i have one grid view in a web page

then i want to set GRIDVIEW header value according to user input

how can i do this pls help me ....




Yaman

View 2 Replies View Related

User Can View All Database Names

Apr 17, 2008

I create a user then I create a database and assign my newly created user as owner

When I login as this new user everything works fine BUT my newly created user can still see other database names even though he is not allowed to use them.

How can I prevent him from seeing other database names.

P.S. I use the GUI

Thank you

View 2 Replies View Related

One Remote User Can View My Report Another Cannot?

Dec 4, 2007

I have Developer's Edition of SQL Server installed on my PC. I want my users to run and view my new RS report from their PCs across the network without installing SS on their machines.

We experimented a little bit by asking one user to use these URLs...http://mymachine/reports$myinstance and http://mymachine/reportserver$myinstance) after giving her browse rights in report manager from my PC.

When she uses the first URL, she gets a popup asking for sign in info, but gets nowhere when typing in her windows sign in info. When she uses the second, she gets thru to the report choices but gets an error like...


* An error has occurred during report processing. (rsProcessingAborted)

* Cannot create a connection to data source 'xxxxx'. (rsErrorOpeningConnection)

* For more information about this error navigate to the report server on the local server machine, or enable remote errors

...after choosing my report. xxxxx is the name of the only datasource in the report.

Before we began, we also turned off 'enable anonymous access' and instead clicked 'integrated windows authentication' in IIS on my pc.

My user is on a different domain controller than I am. I asked a colleague who is on the same domain controller to try the URLs and he had no problems running my report from either. He wasnt given any explicit permissions/rights at either the reporting or db level.

Does anyone have a clue?

View 6 Replies View Related

How Do I Grant User To View Folder

Mar 22, 2007

We have a custom security working with forms authentication. When we browse to http://servername/reports the UILogon.aspx page comes up, and login with the Admin account is fine we can reach the report manager and see the folders. But when we login with account User1 , which is not an admin account.Login is fine but User1 does not see any folders in report manager. So how do i assign roles to User account when using custom security extension.



chi

View 1 Replies View Related

System.Data.SqlClient.SqlException: Login Failed For User

Aug 12, 2005

when i browser the page on browser the following error dispaly
" System.Data.SqlClient.SqlException: Login failed for user xxxx "sqlAdaptor , sqlconnection and dataSet are all fine. i can even preivew dataset, but i don't know while it doesn't display in browser.

View 1 Replies View Related

System.Data.SqlClient.SqlException: Login Failed For User

Jul 8, 2004

Here's the error stack:

System.Data.SqlClient.SqlException: Cannot open database requested in login 'MYKYTYNMDB'. Login fails.
Login failed for user 'OMM_IUSER'.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.GetConnection(String strConnection)
at DreamweaverCtrls.DataSet.DoInit()

i have just exported all objects from one sql server to another and no matter how many times i check the password i keep getting this same error..
I KNOW for a fact that the password and username are correct and that they have all of the correct permissions..
what am i doing wrong?

View 6 Replies View Related

Database Design For Ticketing System; User Ticket Quotas

Mar 21, 2006

My question takes two parts; firstly, is the new table that I'm proposing going to handle the business logic I describe below, and secondly, if I put the new table in, how in hell do I use it?

Right; present schema attached.

The idea, which I hope is fairly clear from the schema, is that you send it a buch of parameters about the event, admission date, etc, and it will return all tickets matching those parameters. An example stored proc for this is below:


CREATE PROCEDURE [dbo].[getSingleTicketsByParameters]
@eventIdINT,
@standIdINT,
@admissionDateIdINT,
@bookingDateIdINT,
@concessionIdINT,
@bookingMinQuantityIdINT,
@bookingMaxQuantityIdINT,
@membershipIdINT
AS
SET NOCOUNT ON
SELECT
[tblTickets].[id],
[tblTickets].[booking_date_id],
[tblTickets].[booking_min_quantity_id],
[tblTickets].[booking_max_quantity_id],
[tblTickets].[ticket_concession_id],
[tblTickets].[membership_id],
[tblTickets].[event_id],
[tblTickets].[stand_id],
[tblTickets].[admission_date_id],
[tblTickets].[price],
[tblTickets].[availability],
[tblTickets].[description],
[tblTickets].[admin_description],
[tblTickets].[ticket_open],
[tblTickets].[ticket_live],
[tblEvents].[event_name],
[tblEvents].[event_open],
[tblStands].[stand_name],
[tblStands].[stand_open],
[tblBookingDates].[booking_start_date],
[tblBookingDates].[booking_end_date],
[tblTicketConcessions].[concession_name],
[tblBookingMinQuantities].[booking_quantity],
[tblBookingMaxQuantities].[booking_quantity],
[tblAdmissionDates].[description],
[tblAdmissionDates].[admission_start_date],
[tblAdmissionDates].[admission_end_date],
[tblAdmissionDates].[date_open],
[tblMemberships].[membership_name]
FROM [tblTickets]
LEFT JOIN [tblEvents] ON [tblEvents].[id] = [tblTickets].[event_id]
LEFT JOIN [tblStands] ON [tblStands].[id] = [tblTickets].[stand_id]
LEFT JOIN [tblBookingDates] ON [tblBookingDates].[id] = [tblTickets].[booking_date_id]
LEFT JOIN [tblTicketConcessions] ON [tblTicketConcessions].[id] = [tblTickets].[ticket_concession_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMinQuantities ON [tblBookingMinQuantities].[id] = [tblTickets].[booking_min_quantity_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMaxQuantities ON [tblBookingMaxQuantities].[id] = [tblTickets].[booking_max_quantity_id]
LEFT JOIN [tblAdmissionDates] ON [tblAdmissionDates].[id] = [tblTickets].[admission_date_id]
LEFT JOIN [tblMemberships] ON [tblMemberships].[id] = [tblTickets].[membership_id]
WHERE 1=1
AND ([tblEvents].[id]=@eventId OR @eventId=0)
AND ([tblStands].[id]=@standId OR @standId=0)
AND ([tblTicketConcessions].[id]=@concessionId OR @concessionId=0)
AND ([tblAdmissionDates].[id]=@admissionDateId OR @admissionDateId=0)
AND ([tblBookingDates].[id]=@bookingDateId OR @bookingDateId=0)
AND ([tblBookingMinQuantities].[id]=@bookingMinQuantityId OR @bookingMinQuantityId=0)
AND ([tblBookingMaxQuantities].[id]=@bookingMaxQuantityId OR @bookingMaxQuantityId=0)
AND ([tblMemberships].[id]=@membershipId OR @membershipId=0)
GO



So. It's all about to get horribly, horribly complex (well, it is to me) so take a deep breath.

Tickets are subject to quotas. However, quotas are subject to... well, at the moment they can be based on event, stand, admission date, concession, or any combination of these. They can also be based on an individual ticket. All quotas, however, are annual; they only apply to ticket purchases in the same year. For example:
- you can't buy more than 4 tickets for date A, in stand B at event C, per year.
- you can't buy more than 2 tickets for stand D per year.
- you can't buy more than 4 of ticket number 123.

Now, I'm thinking that all I need to manage this is one table, and it's going to look a little like this:

tblQuotas
id INT PK
ticket_id INT FK
event_id INT FK
stand_id INT FK
admission_date_id INT FK
quota INT

So, if I put a record in there with an event, stand and admission date - and a quota - then I've met the first business rule that I described above. If I put in a record with just a stand id and a quota, then I've met the second sort. If I put in one with just a ticket id and a quota, then I've met the third.

Now we return to that big SQL statement above. The one that says "get me all eligible tickets that match these parameters". And it's got to get a lot bigger because I now need to not only join in tblQuotas, to see if any quotas apply to the ticket I've chosen (or to the event, stand, etc that make it up), but I've also got to join in tblBasket, and tblOrders, and tblUsers, to find out how much of any particular quota they've already used up in previous orders. Although that's only orders placed in the current year, mind. And of course I also now haveto pass the users ID in as a parameter so I can look up their order history.

Your head's hurting too, right?

So... this is where I've got to:

SELECT SUM(ticket_quantity) FROM [tblBasket]
INNER JOIN [tblTickets] ON [tblBasket].[ticket_id] = [tblTickets].[id]
INNER JOIN [tblOrders] ON [tblBasket].[order_id] = [tblOrders].[id]
WHERE
[tblTickets].[stand_id] = @standId
AND [tblOrders].[user_id] = @userId
AND ([tblOrders].[order_date] BETWEEN '2006/01/01' AND '2006/12/31')


What I want to do is incorporate that into the big SQL query up top, in such a way to make it only return tickets that not only match the ticket parameters but that also aren't linked to stands, admission dates or anything else, that the user has reached their quota on.

Oh, and I'm in a bit of a hurry so do try and get a move on won't you? ;)

But seriously - how do I put those two SQL querys together? Do I need one for each paramater that might have a quota attached, or is there a quicker way? All suggestions and advice, up to and including "get an easier job, dude", received gratefully :)

View 2 Replies View Related

SQL 2012 :: Restricting What A User Can View In SSMS

Feb 5, 2015

I want to provide access to one of my users to a database on the production server. I do not want this user to be able to view anything other than the tables in that database, or the other databases on my production server.

I gave him access to one DB - TestDB- and made him data_reader on that DB. I had set that as his default database. However, when he logs in using SSMS he can see from Object Explorer a listing of all the databases on that server, although he can't access any of those. This is an external user and I don't want him to see any of that stuff, including other objects (SPs, Views, etc.,) even within TestDB.

To summarize, I want to grant access to a windows user to see/select from ONLY tables in TestDB of my production server, and I do not want him to be able to see any objects other than tables of this DB from SSMS.

View 1 Replies View Related







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