On MS-SQL 2k I have a created user. Security for the SQL instance isset to mixed.When I attempt to connect to SQL using Enterprise client on anothermachine on the local network using Windows Auth I get the error: DBName-Login Failed for user ('null')- Reason: Not associated with atrusted SQL Server Connection.What am I over looking?TIA
I am working with SQL server management studio express and have added a variety of user- defined constraints to my table. I would like to edit these constraints (not using T-SQL if possible), but I can't find where they are stored! When I made them I didn't really keep track of what I named them, or how exactly I defined them, as I was assuming i would be able to go back easily and change them, in some sort of object-explorer/editor type window- but that is exactly what I can't find.
I know this is probably a flick of a switch but I cannot figure out which switch. Setup is SQL Server / Stored Procedures / DAL / BLL(skipped for testing) / PL. The stored procedure queries from only one table and two columns are ignored because they are being phased out. I can run the stored procedure and preview the data in the DAL but when I create a page with an ODS linked to the DAL and a GridView I get this error. I checked every column that does not allow nulls and they all have values. I checked unique columns (ID is the only unique and is Identity=Yes in the table definition). I checked foreign-key columns for values that are not in the foreign table and there are none. Any ideas why do I get this? Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Hi, I am getting the above error when trying to load a report into my Web Application, I have tracked the error down to one specific field in my database. Even though this field is a NVarChar field and is of size 30 it would seem that there is an issue returning the value from the field. I can write it into the database no problems but when I try to get it out of the database it returns the above error. e.g MOB 401.908.804 - Fails 0401.907.324 - okay 8239 9082 (pager) - fails Anyone got an idea on how to fix this???? Regards.. Peter.
I have a database instance which of course I can connect to and edit data. I would like to set up other users for this database that can just as easily connect but that only read data?
Our company has several SQL Server 7 databases. One of them has now on two occassions, set itself to 'Single User' mode. I am completely baffled as to what can be causing it.
There's no jobs set up to do it. There's no stored procedures programmed to do it. The SQL Server Log shows that a DBCC CHECKDB ran at 18:00:37.73 and that users attempted to and couldn't log in from 18:01:01.95 onwards. There is a maintenance plan set to run every two hours that does a backup, integrity checks, so it fired the CHECKDB.
I like to know how I may store some user-specific data at the beginning of a session and retrieve the same data later during the session in a SQL command. For those of you familiar with ORACLE, I am trying to mimic the SET_CLIENT_INFO and GET_CLIENT_INFO functions of ORACLE's DBMS_APPLICATION_INFO package on SQL Server.
I wrote a simple SSIS package that runs a batch and a stored proc. They both run fine. I can see the stored procedure run and in process under task manager I see the batch run. However I don't want the batch to run under the System account, how can I change to another user. Thank you.
I am trying to set up Web Synchronization using Merge Replication. The Distributor and Publisher are on the same machine. Subscriber is a windows mobile application which syncs the data using web synchronization. I have configured IIS on web server for the sync. However there is no domain user on database and web server. Is it possible set up web sync without a domain user? Which user can I then use to give permissions on the snapshot share folder.
The account i setup to access the db in Sql 2005 Proper on the Production serve is Represented by the name in the above example as “aspuser�. I created this user in security, logins. And I gave permissions to this on the Db level “create procedure delete, select, update insert.�
I get a error when i run the page in the browser that says “login failed for aspuser.�
I know virtual directory is configured properly. I can run aspx page in the directory with out a db connection, without and error.
I have created a database now I am setting login details for that user. I am using slq server authentication and entering a password of recommended length.
I enter my details in my webconfig file and I get -couldnot connect to database specified in connection string for sql data provider.
when I check the login properties the password has changed it appears to be the password for NT Authoritysystem, ie same length, what it is Idont know.
To allow users enter chinese character into table, I did try to change the field type to nchar and this is workable. But I have few hundred tables.. Is there anyway to change the setting in easier way? by instead change the field type one by one for each table?
I tried change the collation to Chinese_PRC_90_BIN for the database, but it is not support chinese input..
I have created an web reference called ReportingSerivce 2005. i am trying to set an user to have browser rights without going into Report Manager.
But I can't get the SetPolicies function to work correctly. Any ideas?
Code written in VB.
Dim rs As ReportingService2005 rs.Url = "https://wa.hrconnect.treas.gov/reportserver/reportservice2005.asmx"
Dim Item As String = "/" Dim Policies() As Policy Policies(0) = New Policy Policies(0).GroupUserName = TxtUser.ToString Policies(0).Roles = New Role(0) {} Policies(0).Roles(0) = New Role Policies(0).Roles(0).Name = "Browser" Policies(0).Roles(0).Description = "May view folders and reports." rs.SetPolicies(Item, Policies)
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
I'm using MS SQL 2000 with enterprise manager I have a customers table called high_customer, it has a primary key called IDI have an invoices table called high_invoices, it has no primary keys but it does have a column for customer ID.I want to set it so if a customer is deleted from the customers table, any invoices with that customerID are deleted from the invoices table.Do I need to specify a constraint? If so how do I do it in enterprise manager.Thanks
Hi, I have the following problem: I have a table called Jobs with the fields: JobNumber, Name, Customer, ... And a table called Customers with the fields: ID, Name, Address, ... Obviously Jobs is linked to Customers with the Customer<->ID fields. I want to set it up so that if a Customer is deleted, then any Jobs that had that customer listed now have the Customer field set to NULL. Can I do this with a constraint, or will I need to use a trigger? Cheers,Little'un
Hello, I am not a DBA and I need to do the following. I have 2 tables A and C and both have a common fileds say emp.Emp is pkey in C . There can be a record in C but not in A.If a record is inserted in A then it checks for the same employee info in C .If not found it do not allow to insert a record in A. How to go for it? Thanks!
Hiya peops im creating a constraint using enterprise manager for 1 of my tables n was wondering how u constructively create a constraint expression, there is a specific style,right??
i have added my tables and defined foreig keys and primary keys for my table, but when i try to put the data it gives me some error reagards to parent key..and it wont let me drop the table... can anybody tell me how to drop the foregin key..i have tried (
ALTER TABLE module DROP CONSTRAINT ATTENDANCEID_FK;) this formula and it wont work,
heres my tables and relationships:
CREATE TABLE ATTENDANCE (ATTENDANCEID char(4) NOT NULL, StudID char(4) NOT NULL, ModuleID char(4) NOT NULL, Week1 VARCHAR(10), Week2 VARCHAR(10), Week3 VARCHAR(10), Week4 VARCHAR(10), Week5 VARCHAR(10), Week6 VARCHAR(10), PRIMARY KEY (ATTENDANCEID));
ALTER TABLE ATTENDANCE ADD FOREIGN KEY (studID) REFERENCES student(studID); ALTER TABLE ATTENDANCE FOREIGN KEY (moduleID) REFERENCES module(moduleID));
insert into ATTENDANCE values ('F1','A1','E1','Yes','Yes','Yes','Yes','Yes','Yes'); insert into ATTENDANCE values ('F2','A2','E2','Yes','No','Yes','Yes','No','Yes'); insert into ATTENDANCE values ('F3','A3','E2','Yes','Yes','Yes','No','Yes','Yes'); insert into ATTENDANCE values ('F4','A4','E2','Yes','Yes','Yes','Yes','No','Yes'); insert into ATTENDANCE values ('F5','A5','E1''Yes','Yes','No','Yes','Yes','Yes'); insert into ATTENDANCE values ('F6','A6','E2','Yes','Yes','Yes','Yes','Yes','No'); insert into ATTENDANCE values ('F7','A7','E1','Yes','Yes','Yes','Yes','No','No'); insert into ATTENDANCE values ('F8','A8','E2','Yes','Yes','Yes','No','Yes','Yes'); insert into ATTENDANCE values ('F9','A9','E3','Yes','Yes','No','Yes','Yes','Yes');
CREATE TABLE MODULE (ModuleID char(4) NOT NULL, ATTENDANCEID char(4) NOT NULL, ModuleName varchar(45), ModuleCode varchar(6), PRIMARY KEY (ModuleID));
ALTER TABLE MODULE ADD FOREIGN KEY (attendanceID) REFERENCES attendance(attendanceID);
insert into MODULE values ('E1','F1','Workshop Research and Project Implementation','Im3023'); insert into MODULE values ('E2','F2','Advanced Database Development','SD3042'); insert into MODULE values ('E3','F3','Advacned Information Systems Develpment','SD3043');
I am fairly new at SQL and also new to this forum. So I don't know if this topic belongs here or not.
But anyways, I found this tutorial online. However, I am having trouble completing it. Can someone please help me?
Given the following table definitions:
CREATE TABLE USERS ( USERID CHAR(5) PRIMARY KEY, NAME VARCHAR(30), RATING CHAR(1) CHECK (RATING IN (A, B,C,D) )
CREATE TABLE ITEMS ( ITEM_NO NUMBER PRIMARY KEY, DESCRIPTION VARCHAR(50), OFFERED_BY CHAR(5) REFERENCES USERS(USERID) ON UPDATE CASCADE ON DELETE CASCADE, START_DATE DATETIME, END_DATE DATETIME, RESERVE_PRICE NUMBER )
CREATE TABLE BIDS ( USERID CHAR(5) REFERENCES USERS ON UPDATE CASCADE ON DELETE SET NULL, ITEMNO NUMBER REFERENCES ITEMS(ITEM_NO) ON UPDATE CASCADE ON DELETE CASCADE, BID NUMBER, BID_DATE DATETIME, PRIMARY KEY(USERID,ITEMNO,BID_DATE) )
Directions: Indicate whether the statement is accepted or rejected; and if accepted indicate its effects. Evaluate each statement INDEPENDENTLY.
1) INSERT INTO ITEMS VALUES(1009, Red Bicycle,U01,1999-01-08, 1999-02-10, 30) 2) UPDATE ITEMS SET ITEMNO=1008 where ITEMNO=1001 3) DELETE FROM ITEMS WHERE ITEMNO=1005 4) INSERT INTO ITEMS VALUES(1010, Green Bicycle,U07,1999-01-08, 1999-02-10, 30) 5) UPDATE BIDS SET ITEMNO=1011 WHERE ITEMNO = 1001 6) DELETE FROM USERS WHERE USERID=U01 7) UPDATE ITEMS SET ITEMNO=1020 WHERE ITEMNO=1001 8) DELETE FROM BIDS WHERE BID > 1001
ORDER_ITEM (OrderSK, ItemNumber, Qty, ServiceSK, UnitPrice) SERVICE (ServiceSK, Description, UnitPrice)
How could I modify the database structure to enforce the data constraint that ORDER_ITEM.UnitPrice must be equal to SERVICE.UnitPrice for the corresponding service.
I have to change someones username in my database in a couple of tables. When I try to make any changes, I get an error that there is a constraint. Is there a way to make the changes without removing all the constraints then replacing them? Thanks
Just getting into scripting sql. I have a little script that adds and drops a default value for a column. But I cannot get it to run when the column already has a default value specified. If I didn't script the contraint and specify a name I have no name to specify when trying to drop it.
ALTER TABLE users ADD CONSTRAINT dev1 DEFAULT 1 FOR ns_email_flag ALTER TABLE users DROP CONSTRAINT dev1
How do I remove any existing default values using script?
How does one know what a particular trigger or constraint is supposed to be doing on a table. I am just two days old on this position, and no form of documentation, at the same time I am expected to trouble-shoot some error messages. Thanks for your help.