Showing posts with label tobe. Show all posts
Showing posts with label tobe. Show all posts

Sunday, March 25, 2012

Creating a unique index on a table

Hi,
I'm trying to create an index on a newly created table. I want the index to
be on the field ref. I tried running:
CREATE INDEX ref ON U_segment (ref)
but it's just sitting there! The ref is unique anyway, and there are about
700,000 records.
Any help, or advice would be appreaciated.
Regards
Rob
Does it run and stop, or what?
I wonder if having the index name and the column name the same is the
issue...try
CREATE INDEX IX_ref ON U_segment (ref)
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:9AF46DBF-1693-4DD3-A324-BB378FCEBB79@.microsoft.com...
> Hi,
> I'm trying to create an index on a newly created table. I want the index
> to
> be on the field ref. I tried running:
>
> CREATE INDEX ref ON U_segment (ref)
> but it's just sitting there! The ref is unique anyway, and there are about
> 700,000 records.
> Any help, or advice would be appreaciated.
> Regards
> Rob
|||Did you look to see if you are being blocked?
Andrew J. Kelly SQL MVP
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:9AF46DBF-1693-4DD3-A324-BB378FCEBB79@.microsoft.com...
> Hi,
> I'm trying to create an index on a newly created table. I want the index
> to
> be on the field ref. I tried running:
>
> CREATE INDEX ref ON U_segment (ref)
> but it's just sitting there! The ref is unique anyway, and there are about
> 700,000 records.
> Any help, or advice would be appreaciated.
> Regards
> Rob
sql

Wednesday, March 21, 2012

Creating a server wide read only account

I need to start training someone on SQL Server 2000, but do not want them to
be able to modify any data or structures. Is there a better way of creating
a server wide read only account besides assigning them to the db_datareader
role in every database?
Thanks.Hi,
There is no server side role for this, Alternate approach is given below,
1. Create a Login named 'reader'
2. Create the user named 'reader' in Model database
3. Assign db_datareader role to 'reader' user
THis will create a reader user for all the new databases.
Note:
You will have to manually create this user in all existing databases.
Thanks
Hari
MCDBA
"Mike" <Mike.Holzwarth@.Comcast.net> wrote in message
news:uHt3$NrAEHA.2212@.TK2MSFTNGP10.phx.gbl...
> I need to start training someone on SQL Server 2000, but do not want them
to
> be able to modify any data or structures. Is there a better way of
creating
> a server wide read only account besides assigning them to the
db_datareader
> role in every database?
>
> Thanks.
>
>|||better still, why dont you install a msde training instance on a new box
(preferably) and give them sysadmin to it, you could then make a copy of
live data from one to the other and not worry that they are going to destroy
something valuable, and still provide them with the full access that they
are going to eventually have (one day) on the "live" instance.
Br,
Mark Broadbent
mcdba,mcse+i
=======================
"Mike" <Mike.Holzwarth@.Comcast.net> wrote in message
news:uHt3$NrAEHA.2212@.TK2MSFTNGP10.phx.gbl...
> I need to start training someone on SQL Server 2000, but do not want them
to
> be able to modify any data or structures. Is there a better way of
creating
> a server wide read only account besides assigning them to the
db_datareader
> role in every database?
>
> Thanks.
>
>