Determining Uniqueness Of An Index In SQL Server 2000
Jan 23, 2008
Is there a system table column to query to determine whether an index is defined as unique in SQL Server 2000? It is easy to find this info in SQL Server 2005, but I don't see a valid column for this on dbo.sysindexes.
View 5 Replies
ADVERTISEMENT
Sep 4, 2004
I want to make sure that usernames and folder names (that are stored in the database) are all unique when created by the admin through an admin control panel.
How would I code and use an Index to make sure that the 2 columns are unique?
I've looked at examples on the net but nothing is telling me how I can create an index through Enterprise Manager? Thanks
View 1 Replies
View Related
Sep 4, 2004
I want to make sure that usernames and folder names (that are stored in the database) are all unique when created by the admin through an admin control panel.
How would I code and use an Index to make sure that the 2 columns are unique?
I've looked at examples on the net but nothing is telling me how I can create an index through Enterprise Manager? Thanks :)
View 2 Replies
View Related
Nov 30, 2005
I am reading "SQL Server Query Performance Tuning Distilled",on page 104 it talks about one of the index design recommendationswhich is to choose the column that has very high selectivity of valuesinstead of a column that has very few selectivity of values.My question is if I have currently indexes on my tables that have1, 2, 3, 4, ... values only on thousands of rows, are these nonclusteredindexes pretty much useless indexes that I should get rid of?And I know that pretty much the number of selectivity values willalways remain very low.Thank you
View 1 Replies
View Related
May 12, 2008
Hi all
I have Re-Builld index Job,it is runnining evry week.now a days my queries are runnign very slow.eben after running re-build indexs.Please guide me how to check where was the problem.
I am suspecting Stastitics how check the stastitics updation.
any help appreciated.
View 1 Replies
View Related
Jun 11, 2007
Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out. I need to know this to pick the correct upgrade version.
-Kyle
View 1 Replies
View Related
Jun 11, 2007
Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out.
-Kyle
View 4 Replies
View Related
Jun 9, 2006
I'm trying to connect to a sql database, but I don't know what myserver is in the following code.Dim strConn As String = "server=myserver;database=Northwind"I can't get the code to link up with my Northwind database.I'm running everything locally if that helps.Thanks!Jon
View 2 Replies
View Related
Nov 11, 2007
Hi everybody,
I am trying to determine the optimum amount of server memory that would be required for my SQL Server application. According to a book, it is calculated as follows:
Minimum memory required = System memory + User memory + Database process memory
I have thought about ways to determine each component of memory.
1) I could determine the System memory utilized from the Task manager (Total - Available), when the SQL Server service has been started, and no applications are running.
2) I could determine User memory by ascertaining the number of concurrent users during peak usage time of the application and then multiplying it with 0.5 MB.
3) I could determine Database process memory by summing up the "memusage" column in the SysProcesses table, at the time of
peak usage and multiplying it with 8.
Please let me know whether they are correct.
View 4 Replies
View Related
Dec 5, 2007
I'm trying to find out how to determine the Server name of the server that a stored proc is running on.
Something that is similar to DB_NAME()
i.e. SERVER_NAME()
TIA
John
View 7 Replies
View Related
Oct 1, 2015
I have a report that I want to render in different languages. Easy enough. However, the way I want it to work is for the user to go to a particular URL, and depending on whether the URL is, say, .fr for France, or .uk for the UK, it will recognize the URL and render the report in the correct language.The problem is, in testing, I've been trying to use the global &ReportServerURL but it does not seem to work.
Do I take it, then, when I put the report live, it will not recognize the URL that appears in the browser, and so won't be able to tell whether the URL is .fr or .uk and so forth?
View 4 Replies
View Related
Sep 21, 2000
When I select a fieldname in a db as a primary key this will keep the uniqueness of that fieldname, but how is that work when I select 2 fieldnames (in Enterprise Manager) and click on the Key it will mark them as my primary key, but I can insert duplicates values in either fieldname.
Can someone explain this to me.
Thanks
View 2 Replies
View Related
Aug 7, 2007
hi
am new to sql...i need to write a query ..it is like two teams can play more than 1 game but on different dates..
so if i create the table like this
Create Table Games( TeamName1 char(30),
2 numGoals1 int,
3 TeamName2 char(30),
4 numGoals2 int,
5 play_date char(10),
6 primary key(TeamName1,TeamName2,play_date),
7 Check(TeamName1!=TeamName2)
8 );
this violates the constraint if i give the two teams on the same date..how to give the condition such that it checks for the violation of condition if the team names are interchanged.. for eg
if i give the values as
Insert Into Games values('chelsea',1,'arsenal',2,'17-1-2000');
and
Insert Into Games values('arsenal',1,'chelsea',2,'17-1-2000');
the above should violate the constraint ..how to do it
View 2 Replies
View Related
Oct 14, 2015
Any good starting point to understand for a specific db, how many max VLFs are good to have so that it does not cause long startup or backup times?
Also, I need some calculation so that I can identify a best growth parameter I will setup for each database ?
I'm seeing the below msg in errorlog and curious to know the changes (right sizing/growth) to be done? As of now 100 MB of log file growth value is set (refer: [URL] ....)
Database BizTalkMsgBoxDb has more than 1000 virtual log files which is excessive. Too many virtual log files can cause long startup and backup times. Consider shrinking the log and using a different growth increment to reduce the number of virtual log files.
View 3 Replies
View Related
Apr 20, 2006
How does one Determine the number of Active users logged into a SQL Server Database?
I want to use the info to control concurrent licensing for my Application
View 6 Replies
View Related
Apr 24, 2008
Hello,
My company is upgrading one of our products; this involves some data migration and a question about existing indexes with uniqueness constraints has been raised. Here is the issue:
We have a database table with two particular columns that that we index with a uniqueness constraint. My question is: is the uniqueness constraint case sensitive?
For instance, if I have a database that is using a collation of SQL_Latin1_General_CP1_CS_AS. (case sensitive) and I insert data in these two columns as follows:
test
col2test
Test
col2test
would this uniqueness constraint be violated even though I'm using a case sensitive collation? I've done tests on this issue and I can't seem to insert this 2nd column; I'm just wanting to be certain that this is the case 100% of the time.
Thanks for your assistance,
Aaron
View 1 Replies
View Related
Jul 5, 2000
Hi,
Can anyone tell me the order in which uniqueness constraints on indexes are enforced vs. when triggers are executed ? I have a unique constraint on an index and a trigger on the column on which the same index has been created. When a row is inserted, the trigger checks if the value for that column already exists in the table - if not, it inserts the row as is, else it gets the max() val of the column (based on another key column) and increments it by one, then does the insert. Creating an index across the two works fine, but if I set the Unique Values property for the index, subsequent inserts bomb out - yet there aren't any duplicates in the final table, as the trigger ensures this. Anyone got any ideas on this? My deduction is that the uniqueness constraint gets enforced before the trigger gets executed, but at the same time this *seems* illogical, as the row has not been inserted into the table at the point where the trigger is executed.
Regards,
Jon Reade.
View 2 Replies
View Related
Jan 22, 2014
OK - maybe my Google-fu is off today but I'm trying to find out if using a sequence table will provide values that are as unique as the GUID is supposed to be.The reason is that I'm building a DW from the ground up (they won't let me expense my booze which I think is grossly unfair ) and rather than using GUID it ~seems~ like a sequence table would give better results. My concern is that the values won't be unique across tables.
View 9 Replies
View Related
Jul 20, 2005
Hi,First of all my apologies if you have seen this mail already but I amre-sending as there were some initial problems.This query is related to defining indexes to be unique or not andconsequences thereof.Some documented facts that I am aware of include1. Defining uniqueness allows optimiser to create optimal plans egselect based on keys in such an index allows the optimiser to determineat most only one row will be returned2. Defining uniqueness ensures that rule (business/Primary key) isenforced, regradless of how the data is entered.We have many cases where non unique indexes are defined. The approach todate has been that even though we are aware of some of the benefitsoffered by defining uniqueness , we have chosen not to add keys to nonunique indexes such that they become unique. The primary reason for thiswas that we did not want to make the keys comprising the indexesunnecessarily large and therefore ensuing consequences when DMLstatements are performed.However, I have concerns that having highly duplicate indexes can haveperformance impacts , including deadlocking. I am also aware Sybase usedto store duplicate values in overflow pages and therefore there wereperformance consequences. Could SQL 2000 have the same behaviour ?Thanking you in advancePuvendran*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 1 Replies
View Related
Jun 17, 2008
So, I have this idea of a database design I was hoping to get some input on.
I usually go through the process of creating a separate column for identity, like an auto-increment integer which serves as a context specific ID that easily can be passed around. However one of the short-comings I've come to realize is that the integer is just that, unique to the context and requires context information to make sense.
I'm pounding the idea of creating a separate table whose sole purpose is to provide global (database wide) unique IDs. As such each row in a table can still have an ID but instead of being tied to a specific context it will always make sense within the application. A foreign key constraint can ensure that and a relation.
Now, with a global ID which I can create FKs to, I don't have to create a separate table for relations between entities and can have relations through these global IDs and I think that's a good thing because if there are many relations between many entities they don't have to be defined more than once. There is also a single "hub" where all relations fit which will allow me to access most information through some relatively simple joins.
My concerns are performance and Linq to SQL implication. I'm worried that Linq to SQL might start pulling an excessive amount of data and I'm worried that the practicality of such a design might hurt the long running of the application development process.
But I'm surprisingly interested in what it could mean for a more ubiquitous view of data and tagging. Basically a way of any data to have relations to any other data through this yet simple design decision.
If you think this is a good idea or see no particular problem with, please let me know! If you think there's problems with my idea, please motivate your critic but do tell me what I should look out for, or if you know of any better approach to my idea of being able to look at the data through some more common mechanism (which applies to all tables and the entire database mostly from a programming perspective).
View 2 Replies
View Related
Aug 16, 2012
I"m trying to use a BULK INSERT command to insert data into a table from a file. There is a UNIQUE Index that is being violated and the BULK INSERT fails.
I do not want to drop or disable the index, however, i also do not want to load 'duplicate' records so i keep the CHECK_CONSTRAINTS parameter.
Is there a way to have the duplicate records outputed to the ERRORFILE ?
View 10 Replies
View Related
May 31, 2008
All- I have what i'm sure is a question with a simple answer: Supposing I want to modify the select command below to force the display of records with only unique combinations of the two fields person_id and act_session_id (bolded). How would I do this. Note that neither is a key field. (Key field headcount_id was added for completeness.)
Thanks!
SELECT hd.headcount_id, hd.person_id, hd.act_session_idFROM headcount as hd
View 2 Replies
View Related
Dec 20, 2007
On one of those common interview question lists, there is the question:
How do you know which index a table is using?
The two answers that I've found are:
SELECT * FROM user_constraints
--and
SELECT TableName,IndexName FROM user_constraints
Both of these return the error:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'user_constraints'.
Is this because I'm using the free version of 2000(MSDE)?
If so, what is the right answer for this version?
-Thanks
View 2 Replies
View Related
Nov 8, 2007
I have several databases in which our indexes have not been rebuilt/reorganized. I have worked primarily on SQL 2005 but with 2000 I am not familiar with Logical vs Extent fragmentation. And on the 2000 server there is high Logical Fragmentation (1000+%). With me rebuilding the indexes on the 2000 server databases, will this reduce performance or halt functionality of the servers while this process is running???
View 6 Replies
View Related
Feb 2, 2007
I am executing
DROP INDEX [IX_Users] ON [Users]
and i get a syntax error
what is the exact syntax to DROP an INDEX for MS SQL 2000
thank you
View 3 Replies
View Related
Oct 20, 2006
please explain the differences btween this logical & phisicall operations that we can see therir graphical icons in execution plan tab in Management Studio
thank you in advance
View 3 Replies
View Related
Sep 14, 2001
Hi ALL,
How to create index in the view on MS SQL 2000?
Thank you very much!
View 4 Replies
View Related
Oct 31, 2001
Is there a system stored procedure that I can execute that will return the actual size of the database you are working with? Any information is appreciated.
View 1 Replies
View Related
May 2, 2000
How do I find out if a temporary table named '##test' exists? I have a stored
procedure that creates this table and if it exists another stored procedure
should do one thing, if it does not exist I want the SP to do something else.
Any help as to how I can determine if this table exists at the current time
would be greatly appreciated.
Thanks in advance for you help,
Jon
View 6 Replies
View Related
Feb 26, 2002
Can anyone tell me what command/utility i can use to determine the database type (non-unicode or unicode) as well as the supported character set?
Any help will be greatly appreciated. Thanks a lot!!
View 1 Replies
View Related
Mar 7, 1999
Hi,
Is it possible to determine when last a DBCC statement was run on a database & what that DBCC was.
TIA
Shaun Tinline
Database Administrator
Alcatel Altech Telecoms
View 1 Replies
View Related
Nov 17, 2005
Hi,
I need to be able to identify if a parent has the same child names as another parent.
Have a look at my data (in pic)
Can you think of a SELECT that will count for each parent, the number of other parents including themselves with all the same children's names?
So you would get something like:
Bob | 2
Bill | 1
Glen | 2
thanks,
david.
View 7 Replies
View Related
May 9, 2008
Forgive the easy question but I'm afraid it might be also a trick question and I'd like to hear the experts' opinion. I am using SQL Server 2005 Express edition and I know the limitation is 4GB per database. So far none of my users is anywhere near the limit but I have to be prepared for when that day finally comes. As it stands, they use a single database through a program so I have full control over it. There are no fancy backup programs on the system so no fancy recovery models and automatic shrinking can be done - data is only inserted in that database.
My question is simply how can I determine programmatically (I use ADO.Net but it can execute SQL commands just fine) the size of the database as it relates to the limitation? That is, I don't know whether it is the amount of data stored - with or without overhead, or it is simply the size of the *.mdf file (maybe together with the *.ldf file), or whether the 4GB is 4 billion bytes or 2^32 bytes - I just want the same method that the SQL Server is using so that, for example, I can bring up a warning at 90% full and lock out the user at 99% full.
I'd appreciate any insights.
Kamen
View 3 Replies
View Related