Removing Foreign Key Restriction

Apr 13, 2008

Hi everyone,
My first table has a column named "customer" that is directed to "customers" table "id" column as foreign key.
I wanted to change "id" name so i wanted to delete it and create another column of another name but i cannot delete that column because it is attached as fk to another table.
How can i remove th fk constraint ?
Thanks.

View 3 Replies


ADVERTISEMENT

Removing Data Base Size Restriction

Jul 10, 2007

About a month ago I restored a data base that had been originally created in MSDE into a full version of SQL Server 2000. I thought that the size restriction would automatically be removed by putting it into the full version of SQL. I was wrong and about a week or so later the data base reached the 2GB size and needed attention. I received some assistance through Microsoft and they walked my client through the process of removing the size restriction. Since then everything has been OK.



Now I am doing something similar. My client has a data base that was originally created in MSDE. We upgraded them to SQL Express and the data base has now grown to 4GB which is the max that SQL Express allows.



We will be installing SQL for Workgroups this week.



My question is this. Is there a setting I must change inside the data base or in SQL for Workgroups that will allow the data base to grow beyond 4GB? We need to let it expand to whatever they need and I cant seem to find any documentation on whether or not I have to change a setting for this data base.



Thanks for your help. Jean

View 3 Replies View Related

Removing Foreign Keys

Feb 1, 2004

Hi everyone,

I've been using VS.NET to design and implement my SQL databases. This has been simple and effective.

I've deployed the database onto the production database server and it's been performing without a hitch for some time now.

My problem is that I now need to remove a foreign key relationship on the production database as I have had a relationship between two tables but now not wanting the relationship since the data that had the relationship is now not wanting to be compulsory. I've had a look in the system.foreignkey (I think) table but I can't make head or tail of it.

Long story short, how can I find and remove the relationship from Query Analyser / Enterprise Manager ? I know how to do this in VS.NET diagram (just delete the relationship) but when you open the production database in VS.NET the diagram is no longer there.

Any help will be appreciated!!

Thanks!
Andrew

View 1 Replies View Related

Access Restriction

May 5, 2004

I want to access mssql2000 server only by 'sa' & database login ids. I want to restrict windows administrator account to access the database. Please help !!!

Our enviorment :- SQL2000 with SP3 on Windows2000 advanced server with latest service pack..

View 2 Replies View Related

Column Restriction

Sep 26, 2007

In SQL 2005 is there a way where you can restrict certain columns on a table from being view from a user(s) or group, without creating a view?

View 2 Replies View Related

Adding A Restriction To An Insert

Feb 16, 2006

I'm inserting rows from one table to another and trying to figure out how to not allow nulls from one field. ie - the feeder table can have nulls, but when I insert into the other table, I don't want the records that have NULLS in one field to insert. I hope that's clear.

View 3 Replies View Related

Constraint/Restriction Question

Feb 7, 2008

Hello all,

First of all I would like to show my satisfaction at this great forum.

I'm quite a beginner at SQL and would like to ask a question.

Let's say I have a table of Students and a table of Subjects with their respective details. Now I want to create another table that references both the previous tables so that I would know what subjects the Student is attending. My problem is how to put a restriction in the new table on the number of subjects that each student can have (e.g. each student can only apply for 8 subjects, not more).

I've heard about triggers and other possible solutions, but it's too advanced for me at the moment, so I'd like to possible find a solution through the new table.

Roughly, I guess the new table (let's call it StudentAttends) will have the student id from the Students table and the subject id from the Subjects table. Now how should I add the above restriction?

Thanks for your help!

View 1 Replies View Related

Multi Processor OS Restriction?

Jul 23, 2005

Hi, Ive been told this, but I hope it is NOT true. I have an sqlserver2000 installation running on a server that has four processors.It is on a active network but is not the domain controller soessentially it is fully dedicated to servicing the needs of sqlserver, (a bit of browsing, a bit of ms Office, but almost whollydedicated to sqlserver. Now, the big question, why, when the serverproperties have been set to utilize all four processors, can any onejob never get more than 25% of cpu time? I can launch multipleinstance of QA and run the same job on each one and that will utilisemore and more cpu time, but if you launch multile QA windows fromwithin one insance of QA, you can NEVER get more than 25% CPUutilisation. Now i have to run a job (FTS is a good example,re-indexing lots of db's another, or even a huge query with multipleufd's on computed cols which I hoped would grab lots of CPU time thatthey need, but no. So do I have to live with this or can I tell eitherwindows or sql server to grab more cpu when it want to ie use my spareCPU capacity more efficiently or am i working on a misguided premiseand 25% per job is your lot?DMAC

View 4 Replies View Related

Horizontal Data Restriction

Jul 20, 2005

I have 2 installations:1. W2k with MS SQL 2000 sp2.2. W2003 with MS SQL sp3.There are two databases in all instalations: "maindb" and "userdb". Thetable with data is in maindb.In the 1'st installation I restict user access to all data in table in thisway:- create user's login and user in databases maindb and userdb.- create view in userdb with "where" clause as dbo (dbo is owner of thisview). This clause restict access to data. (create view userdb.dbo.table asselect * from maindb.dbo.table where ...)- add user to group "Public" in maindb.- add role "data reader" to user in userdb.- effect: user can access data only by view, can not access any data inmaindb.I do the same in secound installation:- effect: user can not access data by view - message like this: "userhave not permission to select on maindb.dbo.table"Is this bug in sp3 or in sp2 ?Is there another way to horizontal restrict access data in tables?In Sybase ASE this method (restict by view) works ok. And there is newproperty of ASE 12.5.1 - administrator can define context of login - the"where" clause will be added automatically to any select.Please help me. Thank You for any advice.

View 2 Replies View Related

What Kind Of Constraint-restriction I Need To Apply, And How To

May 22, 2008

Hello

I have the following table, and i need to know, what kind of Constraint-restriction and how to apply using management studio for the next case

Table ITEMSProperties
===============================================================================
ItemID (PK-FK) ValueType (PK-FK) PropertyValue (NVARCHAR)
-----------------------------------------------------------------
1 1 (1=Color) Red
1 2 (2=Date) 01/01/2001
2 1 Blue
2 2 021/badStr/08badstr



Well, so ..
If I don€™t want bad Dates-Strings stored in this table, for the ValueType = 2, .. What kind of constraint-restriction or maybe a trigger, I need to use and please tell me how to aplly using management studio ?

View 3 Replies View Related

Transact SQL :: Additional Restriction On Inner Join Needed

Sep 28, 2015

I have two employee tables called EmpA and EmpB.Each table has the same attributes of Employee ID and Email address.I do an inner join on email address like this:

select * from EmpA
inner join EmpB on EmpA.email = EmpB.email
where EmpB like '%@mydomain.com'

I now want to modify the above where I want to output rows such that

 EmpA.employeeid <> EmpB.employeeid

View 9 Replies View Related

Question On Size Restriction For Sql Express And Sql 2005 Standard

May 17, 2006

If i create a database in SqlEX and then move it to a sever running Sql 2005 standard, am Is my database still limited to the 4GB size?
 
 

View 1 Replies View Related

SQL Server 2012 :: How To Set Some Restriction On Table Names While Creating

Nov 26, 2013

I need to ensure some naming standards to users while creating tables.

All table name should be in same pattern

(ie., ) TeamName_EmpId_tablename

I need a way to restrict user to follow the naming standard. If any user tries to create table without the above naming standard system should not allow.

View 5 Replies View Related

SQL Server Admin 2014 :: Restriction On DML Statements In SSMS

Apr 27, 2014

I would like to know if there is any option to Restrict DML statements in SSMS for a user where the same user should be able to perform these actions through application on particular database.

View 1 Replies View Related

Transact SQL :: Column Length Restriction When Naming CTE Column?

Jun 22, 2015

My CTE is failing and I don't know why...Is there a Common Table Expression column name length restriction???

View 2 Replies View Related

GetSchemaDataset For Cube Restriction With Space In The Cube Name

May 27, 2008

When I make a call to GetSchemaDataset with a restriction of a cube name with a space in the name of the cube the call fails. Following is a sample of the code: adoRestriction = new AdomdRestriction("CATALOG_NAME", "Contoso Telecom_Contoso"); adoRestrictions.Add(adoRestriction); dataSet = conn.GetSchemaDataSet("MDSCHEMA_CUBES", adoRestrictions); I am running SQL Server 2005 Analysis Services SP2. Is there some way to qualify the cube name in the restriction or is this just a bug? Thanks.

View 1 Replies View Related

Removing *

Aug 18, 2005

Hi! I am trying to remove an "*" I used to transfer a file from Excel to SQL. I put the "*" in the NULL values so that I would not get an error. Now that I have the file in SQL, I need to remove the :*" from some columns in my table. How can I select all of those in a column and delete them without deleting each individual one. Any ideas?

Thanks for your help.

Scott

View 6 Replies View Related

Removing Old Bak

Jan 15, 2008

Started with maintenance cleanup task set up bak and directory did not delete the files.

Then found this http://blog.solidsoft.com/blogs/richards_infrastructure_blog/archive/2007/07/12/369.aspx

Copy script

use master
declare @dt datetime
select @dt=getdate()-2
EXECUTE master.dbo.xp_delete_file 0,N'D:BackupAcctDB',N'BAK',@dt

Get message

Msg 22049, Level 16, State 1, Line 0
xp_delete_file() returned error 2, 'The system cannot find the file specified.'

Anyone else get problem with removing BAK files

View 4 Replies View Related

Removing Padding From Var

Feb 7, 2008

I have a search box to look up using a number as an identifier. Currently my query is where x = @enteredNumber, but some place where a user might get the number it is padded with zeros. We can have them just see the number and retype it.
 EG: 000000123  would be entered as 123.
 But, I would like to let them copy and paste, but then strip the zeros (left padding only).
EG:
@num = stripPadding(@enteredNumber)
IE:
@num = stripPadding(000000123)
@num = 123
 

View 2 Replies View Related

Removing A Default...

Sep 4, 2002

Hi,

I'm using SQL Server 7.0 SP3. I added a column to a table like so:

ALTER TABLE T704_RELATIONSHIP_INDEX_CLIENT_REPORT_STORE
ADD Universe_Member_Set_cd INT NOT NULL DEFAULT 1

What is the syntax for dropping the 'DEFAULT' from this column once it has been created? I've looked in BOL but can't seem to get the syntax correct.

Thanks in advance,
Darrin

View 1 Replies View Related

Removing The Duplicates

Aug 2, 2000

I need to remove the duplicates from a table. If a record exits 4 times in a
table I need to delete 3 records and retain only one occurance of that.

I need a query to do this.

Can anybody help.

-Rajesh

View 3 Replies View Related

Removing BuiltinAdministrators

Mar 20, 2002

Hi all,

I am using SQL 2k SP2 on Win 2K Advance server Cluster. My problem is how to remove builtinAdministrators login. Earlier when I tried it was doing failovers from one node to another and not stopping. I was not able to do anything. Any help is appriciated

thanks,
Minesh.

View 3 Replies View Related

Removing DB Suspect

Aug 31, 2000

I wonder if one can give a hint on remove a DB suspect,
Mind you I have used SP_dbremove still did not remove the DB
This is on SQL 7.0 box

Any idea welcomed

Saad

View 2 Replies View Related

Removing A Filegroup

Apr 25, 2000

Hello,

A few days ago one our database's default filegroup filled up. To solve the problem one of my colleagues created a new filegroup. This didn't solve the problem as no objects were placed on this filegroup and the initial one is still full. The idea was to expand the original filegroup over a new physical disk, not to create a new filegroup on that disk. Unfortunately, this is what happened.
To solve this I want to delete the new filegroup, but when I issue the command 'alter database PvgOmcsOds remove filegroup ternary' I get the message 'Server: Msg 5042, Level 16, State 7, Line 1 The filegroup 'ternary' cannot be removed because it is not empty.' Yet there're no objects placed on this filegroup.
How can I get rid of this filegroup?

Stef

View 2 Replies View Related

Removing Transaction Log From SQL 7 DB

Apr 7, 1999

I am trying to remove a transaction log that has grown too large for its databse and server. I have truncated the log and have run dbcc shrinkfile with the EmptyFile Option, but when I try to use alter database remove file and am I told that the object is not empty and cannot be removed. The server is in dbo use only.

What am I missing?

View 1 Replies View Related

Removing Filegroup

Mar 8, 2001

Hi all,

I am trying to remove one of the filegroups in the development database to shrink its size down. I started with emptying and removing its files and ran:
dbcc shrinkfile
(pubs_data_1,emptyfile)
go

and it ran fine, with 'DBCC execution completed' message

but when I tried :

alter database pubs
remove file pubs_data_1
go

I got 'pubs_data_1 cannot be removed because it is not empty'.
I even tried to go to each of the tables and delete from them first which didn't work, then drop all tables in that filegroup (I knew which tables are located on that filegroup), that didn't work either.

Any ideas? Is there a way to check what else sits on that filegroup?

Thanks

View 2 Replies View Related

Removing Replication

May 8, 2003

Hi,

We had transactional replication set up by a consultant with remote distributer, push subscription to the publisher (main production database). However, the subscriber machine had fatal crash and is unrecoverable. Now, replication jobs have been failing on distributor and we immediately need to disable and remove replication as it has started causing problems with transaction log backups on production database.

How can I completely remove this whole replication from publisher and distributor?

Please help.

Thanks,
Shaili

View 5 Replies View Related

Removing SQL 6.5 Software

May 28, 1999

Dear Concerned DBAs,

I am wanting to pick someones brain and find out if there is anything I can do to successfully remove and reinstall SQL Server Version 6.5? I have already removed the software from the SQL Setup icon in ProgramsMSSQL Server 6.5 and went and removed the setup.exe and mssql files associated with the software from the server. Now when I attempt to reinstall the software back onto the server after a hard reboot, I do not get the option once the SQL Server Version 6.5 disk is placed into the CD-Rom to install SQL Server. The only options I get are upgrade, server configurations, etc.

Can anyone or everyone give me a hand as to where to take this dilemma other than rebuilding the server from the ground up?

Anticipatorily Yours,
Daimon Russell

View 3 Replies View Related

Removing Certain Characters

Aug 18, 2006

Hello all,

I have a table named users. It consists of user names, user ids, etc... The problem is that whoever designed the ASP code before me allowed people to enter info in any format they want. This poses a problem because now the name can have 1, 2, or sometimes 3 spaces in between the last and first names. And sometimes the middle initial is used with a period following it. This creates problems when I am trying to execute a Select statement since it won't match if there are an unknown number of spaces in the string and throws an error when a period is used.

Is there a SQL query I can execute to change all the user_names into a format such as the following:
LastName, FirstName MiddleInitial

Like I said, it is already almost the same, just has too many spaces and some have periods after the middle initial

View 5 Replies View Related

Removing Duplicates

Jan 27, 2005

I have a members table and have added an extra few thoushand members to it. Now I need to remove the duplicates.

It doesnt matter which duplicate i remove as long as there are unique email addresses.

so here is the format of the table:

id
email
firstname
lastname
datebirth

if i do a:

SELECT COUNT(DISTINCT Email) AS Expr1
FROM Customer

it returns 21345

and

SELECT Count(Email)
FROM Customer

returns 28987

I can get the unique email addresses into another table by going:

SELECT DISTINCT emailaddress INTO DistinctCustomer
FROM Customer

but this will only return unique email addresses. How do i select distinct email address and all other fields into a new table? or just remove duplicates where email address appears more then once?

Thanks in advance

Tom the SQL beginner

View 5 Replies View Related

Removing A Paratiotion

Jun 24, 2008

i want to build a paratiotin which the key of the paratition will be a datre in this structure :
20080101235959
20080102235959
20080103235959
20080104235959
20080105235959
and so on.....
and i want that when there is a paration that it's "date" is more then 30 days to delete it (and that its data will be deleted too)
how do i do that?
thnaks in advance
peleg





Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

View 5 Replies View Related

Removing Primary Key

Nov 27, 2005

Hi How do i remove the primary key for this table


create table table2
(col1 int,
col2 int,
primary key(col2))


Thanks
Vic

View 2 Replies View Related

Removing Last Two Char

Apr 25, 2007

Afternoon all

What is the quickest way to remove the last two char from a colunm and leaving the rest of the colunm intact.

cheers

View 4 Replies View Related







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