Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Thursday, March 29, 2012

Does SQL2000/MSDE run on XP Tablet?

Hello there,

i have a great doubt: does MSDE run on XP Tablet Edition? I bought a beautiful notebook but didn't notice that it runs XP tablet...

Thanks in advance

Yes it does

Does SQL Server move records between partitions when updating the partition key column?

If I run an UPDATE query on a table which is partitioned by the column I am updating - will the records be moved to another partition?

ie. I have a table where Historical bit column marks whether a particular record should go to Partition1 (=0) or Partition2 (=1). Now, I update a record in that table and change the Historical column value from 0 to 1. What happens with that record?

It will move to the other partition.

Thanks,|||Thank you. That's the kind of behavior I was looking for.

Does sql server have something like dual

In oracle you can run queries against some built in virtual table called dual. Like below:

SELECT SEQ.NEXTVAL FROM DUAL

does sql server have anything similar?Do you tried 'Select SEQ.NEXTVAL' That should work!|||SQL Server does not have such virtual table for that exact purpose like oracle has, for example in Oracle you can run:


select sysdate from dual

Same would be in SQL Server:


select getdate()

e.g any virtual table is not needed, statement just consists of SELECT plus then a function or T-SQL specific stuff. With identities (same as sequences in Oracle) there are SCOPE_IDENTITY(), @.@.IDENTITY AND IDENT_CURRENT, for example to query current identity value:


SELECT IDENT_CURRENT('TABLE_NAME')

Exact difference with all three:

IDENT_CURRENT returns the last identity value generated for a specific table in any session and any scope.

@.@.IDENTITY returns the last identity value generated for any table in the current session, across all scopes.

SCOPE_IDENTITY returns the last identity value generated for any table in the current session and the current scope.

So to reply completely to your question, there are functions etc which do not need any virtual table when they are general (table-independant, querying the date is good example) and then there are stuff which need the table to be specified in the query like previous identity query.sql

Tuesday, March 27, 2012

Does SQL Server 2005 run on Red Hat Linux?

Hello Everyone -

This may be a silly question, but does SQL Server 2005 run on any other platforms besides Windows? Will SQL Server 2005 run on Red Hat Linux? Or any other flavor of UNIX? Thank you for your time and assistance. I appreciate the help.

No, SQL Server requires a Windows operating system.

The requirements are listed here:

SQL Server 2005 Installation Requirements (Hardware/Software)
http://msdn2.microsoft.com/en-us/library/ms143506.aspx

Does SQL Reporting 2005 work with Visual Studio 2003?

My company is looking into using SQL Reporting 2005. My question is if you have SQL Reporting 2005 do you need to also run Visual Studio 2005 or can you still design reports in Visual Studio 2003?

Thanks!!

When you insall SQL 2005 you get the VS2005 tools as well as part of the package. As far as I know you cannot create RS 2005 reports with VS 2003 and you dont need to because SQL 2005 comes with the tols you need.|||Great. Thank youaus_nexxus for answering my question.sql

Sunday, March 25, 2012

Does SQL 7 server run well in Win Server 2k3 or do I have to upgra

I currently have one machine running windows 2000 server that I promoted to a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 20003,
and I want to migrate the win2k pdc to win server 2k3, that I will promote to
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in IIS
6.0. Do you have any advice here?
Please help, and thank you.
Db
Db
SQL Server 7 is not supported on Windows 2003. So while it might work its
not a good idea to try it. If you do gey any issues you will have trouble
getting help. If you want to use the server you should upgrade to SQL Server
2000.
Regards
John
"kwizyu" wrote:

> I currently have one machine running windows 2000 server that I promoted to a
> PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 20003,
> and I want to migrate the win2k pdc to win server 2k3, that I will promote to
> a high-end domain controller. I wonder if someone with expertise in this
> matter could tell me the steps I should follow to accomplish this with the
> least headache. Also, does SQL 7 still run well on win2k3 server or am I
> required to upgrade SQL? Prior experience showed me that sometimes web sites
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
>
|||kwizyu wrote:
> I currently have one machine running windows 2000 server that I
> promoted to a PDC. It also runs SQL 7 server and IIS 5.0. I acquired
> windows server 20003, and I want to migrate the win2k pdc to win
> server 2k3, that I will promote to a high-end domain controller. I
> wonder if someone with expertise in this matter could tell me the
> steps I should follow to accomplish this with the least headache.
> Also, does SQL 7 still run well on win2k3 server or am I required to
> upgrade SQL? Prior experience showed me that sometimes web sites
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking"
> them in IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
SQL 7 is not certified to run on Windows Server 2003. Personally, I use
SQL 7 on a Virtual PC running Windows Server 2003. But this is just for
development when a real SQL 7 server is unavailable.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Ugh, not to mention that you don't want to be running SQL Server of any
version or edition on a Domain Controller. You like cheap thrills, huh?
I know; I know. It's not your fault; however, the whole point of
distributed computing is to segment and isolate functionality on seperate
and distributed platforms. If you're going to lump everyting into a single
installation, you might as well be running on a mainframe or mini-computer.
Can anyone say stone age?
Sincerely,
Anthony Thomas

"kwizyu" <kwizyu@.discussions.microsoft.com> wrote in message
news:9191D846-1696-4CE2-A2EF-5BC2FCE3161E@.microsoft.com...
I currently have one machine running windows 2000 server that I promoted to
a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server
20003,
and I want to migrate the win2k pdc to win server 2k3, that I will promote
to
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in
IIS
6.0. Do you have any advice here?
Please help, and thank you.
Db

Does SQL 7 server run well in Win Server 2k3 or do I have to upgra

I currently have one machine running Windows 2000 server that I promoted to
a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 20003
,
and I want to migrate the win2k pdc to win server 2k3, that I will promote t
o
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in II
S
6.0. Do you have any advice here?
Please help, and thank you.
DbDb
SQL Server 7 is not supported on Windows 2003. So while it might work its
not a good idea to try it. If you do gey any issues you will have trouble
getting help. If you want to use the server you should upgrade to SQL Server
2000.
Regards
John
"kwizyu" wrote:

> I currently have one machine running Windows 2000 server that I promoted t
o a
> PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 200
03,
> and I want to migrate the win2k pdc to win server 2k3, that I will promote
to
> a high-end domain controller. I wonder if someone with expertise in this
> matter could tell me the steps I should follow to accomplish this with the
> least headache. Also, does SQL 7 still run well on win2k3 server or am I
> required to upgrade SQL? Prior experience showed me that sometimes web sit
es
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in
IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
>|||kwizyu wrote:
> I currently have one machine running Windows 2000 server that I
> promoted to a PDC. It also runs SQL 7 server and IIS 5.0. I acquired
> windows server 20003, and I want to migrate the win2k pdc to win
> server 2k3, that I will promote to a high-end domain controller. I
> wonder if someone with expertise in this matter could tell me the
> steps I should follow to accomplish this with the least headache.
> Also, does SQL 7 still run well on win2k3 server or am I required to
> upgrade SQL? Prior experience showed me that sometimes web sites
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking"
> them in IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
SQL 7 is not certified to run on Windows Server 2003. Personally, I use
SQL 7 on a Virtual PC running Windows Server 2003. But this is just for
development when a real SQL 7 server is unavailable.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Ugh, not to mention that you don't want to be running SQL Server of any
version or edition on a Domain Controller. You like cheap thrills, huh?
I know; I know. It's not your fault; however, the whole point of
distributed computing is to segment and isolate functionality on seperate
and distributed platforms. If you're going to lump everyting into a single
installation, you might as well be running on a mainframe or mini-computer.
Can anyone say stone age?
Sincerely,
Anthony Thomas
"kwizyu" <kwizyu@.discussions.microsoft.com> wrote in message
news:9191D846-1696-4CE2-A2EF-5BC2FCE3161E@.microsoft.com...
I currently have one machine running Windows 2000 server that I promoted to
a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server
20003,
and I want to migrate the win2k pdc to win server 2k3, that I will promote
to
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in
IIS
6.0. Do you have any advice here?
Please help, and thank you.
Dbsql

Does SQL 7 server run well in Win Server 2k3 or do I have to upgra

I currently have one machine running windows 2000 server that I promoted to a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 20003,
and I want to migrate the win2k pdc to win server 2k3, that I will promote to
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in IIS
6.0. Do you have any advice here?
Please help, and thank you.
DbDb
SQL Server 7 is not supported on Windows 2003. So while it might work its
not a good idea to try it. If you do gey any issues you will have trouble
getting help. If you want to use the server you should upgrade to SQL Server
2000.
Regards
John
"kwizyu" wrote:
> I currently have one machine running windows 2000 server that I promoted to a
> PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server 20003,
> and I want to migrate the win2k pdc to win server 2k3, that I will promote to
> a high-end domain controller. I wonder if someone with expertise in this
> matter could tell me the steps I should follow to accomplish this with the
> least headache. Also, does SQL 7 still run well on win2k3 server or am I
> required to upgrade SQL? Prior experience showed me that sometimes web sites
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
>|||kwizyu wrote:
> I currently have one machine running windows 2000 server that I
> promoted to a PDC. It also runs SQL 7 server and IIS 5.0. I acquired
> windows server 20003, and I want to migrate the win2k pdc to win
> server 2k3, that I will promote to a high-end domain controller. I
> wonder if someone with expertise in this matter could tell me the
> steps I should follow to accomplish this with the least headache.
> Also, does SQL 7 still run well on win2k3 server or am I required to
> upgrade SQL? Prior experience showed me that sometimes web sites
> running in IIS 5.0 will not run in IIS 6.0 even after "unlocking"
> them in IIS
> 6.0. Do you have any advice here?
> Please help, and thank you.
> Db
SQL 7 is not certified to run on Windows Server 2003. Personally, I use
SQL 7 on a Virtual PC running Windows Server 2003. But this is just for
development when a real SQL 7 server is unavailable.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Ugh, not to mention that you don't want to be running SQL Server of any
version or edition on a Domain Controller. You like cheap thrills, huh?
I know; I know. It's not your fault; however, the whole point of
distributed computing is to segment and isolate functionality on seperate
and distributed platforms. If you're going to lump everyting into a single
installation, you might as well be running on a mainframe or mini-computer.
Can anyone say stone age?
Sincerely,
Anthony Thomas
"kwizyu" <kwizyu@.discussions.microsoft.com> wrote in message
news:9191D846-1696-4CE2-A2EF-5BC2FCE3161E@.microsoft.com...
I currently have one machine running windows 2000 server that I promoted to
a
PDC. It also runs SQL 7 server and IIS 5.0. I acquired windows server
20003,
and I want to migrate the win2k pdc to win server 2k3, that I will promote
to
a high-end domain controller. I wonder if someone with expertise in this
matter could tell me the steps I should follow to accomplish this with the
least headache. Also, does SQL 7 still run well on win2k3 server or am I
required to upgrade SQL? Prior experience showed me that sometimes web sites
running in IIS 5.0 will not run in IIS 6.0 even after "unlocking" them in
IIS
6.0. Do you have any advice here?
Please help, and thank you.
Db

Thursday, March 22, 2012

does showContig Block ?

does DBCC ShowContig Block ?
I want to run this in prod but cant find any documentation that indicates if
this blocks or not
thanks in advance
GAJHi,
Use WITH FAST option along to avoid blocking.
Note:
A fast scan does not read the leaf or data level pages of the index, so will
not create blocks.
Usage:
USE dbname
GO
DBCC SHOWCONTIG ('table_name') with fast
GO
Thanks
Hari
MCDBA
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:e#rtZkUDEHA.2052@.TK2MSFTNGP11.phx.gbl...
> does DBCC ShowContig Block ?
> I want to run this in prod but cant find any documentation that indicates
if
> this blocks or not
>
> thanks in advance
>
> GAJ
>|||If you run it on a heap, WITH FAST has no effect and it will still take a
table S lock. WITH FAST allows it to take a table IS lock when run on
clustered and non-clustered indexes.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:uld4HaWDEHA.3280@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Use WITH FAST option along to avoid blocking.
> Note:
> A fast scan does not read the leaf or data level pages of the index, so
will
> not create blocks.
> Usage:
> USE dbname
> GO
> DBCC SHOWCONTIG ('table_name') with fast
> GO
> Thanks
> Hari
> MCDBA
>
> "Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
> news:e#rtZkUDEHA.2052@.TK2MSFTNGP11.phx.gbl...
indicates
> if
>|||crud.
about 80% of our tables are HEAPS (long Story) so running this in prod puts
us on our lips...
Correct ?
Greg J|||Assuming that 'puts us on our lips' is bad, then yes, you don't want to do
it. What are you trying to acheive - there may be another way to do it...
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:OdsxqBdDEHA.2308@.tk2msftngp13.phx.gbl...
> crud.
> about 80% of our tables are HEAPS (long Story) so running this in prod
puts
> us on our lips...
>
> Correct ?
>
> Greg J
>

Does scope_identity or @@identity always return NULL on Subscriber

I have insert sp's that run on a subscriber. After the insert sql statement
I use scope_identity to get the last inserted identity for child rows for
parent child relationships.
After implementing transactional replication with immediate updates, calling
this sp on the subscriber inserts the row properly but both scope_identity
and @.@.identity returns null.
How do I get the identity value of the last inserted row on a subscriber so
I can use that ID for child rows?Ben,
interesting. These identity values are controlled by the publisher rather
than the subscriber. In fact, you should find that on the subscriber there
isn't an identity property on the tables for this reason. Are you're using
SQL Server 2005? If so, you could capture the assigned value using the
OUTPUT clause.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||No I'm using SQL Server 2000...i may have to move to 2005 sooner than later.
Its hard to believe this can't work because let's say you have an order with
order details tables. You would first create the order on the order table
and get a new Order ID identity, then have to use that identity for the
parent child relationship to the order detail row. This type of scenario
must've been implemented in sql server 2000 with transactional replication
and immediate updates right? How do you retrieve the new ident from the
subscriber without doing maybe a Select max(ident_column) after the insert?
"Paul Ibison" wrote:
> Ben,
> interesting. These identity values are controlled by the publisher rather
> than the subscriber. In fact, you should find that on the subscriber there
> isn't an identity property on the tables for this reason. Are you're using
> SQL Server 2005? If so, you could capture the assigned value using the
> OUTPUT clause.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Ben,
I've just retested this and it depends on your replication setup. If you
have the identity column set to 'Yes (Not for Replication)' then there are
problems, but if it is set to just 'Yes' (the recommended way) then
@.@.identity should return the correct value and scope_identity() will not
return anything. Perhaps this is the source of your issue? Alternatively I
was wondering if you have any user triggers in action?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I have no triggers on these tables other than the ones created by replication.
Paul, I'm assuming you're asking me if the Publisher has the identity column
set to 'Yes (Not for Replication)'. If so, then no its set to simply "Yes".
In your test environment, was the subscriber on the same server? I tested
this with the subscriber on the same server and the @.@.identity did return the
correct value, but when the subscriber was on another sql server it still
returned null.
so to clarify, my publisher has a identity column with "Yes", and my
subscriber has this column replicated as an int (i.e. no ident column)...the
subscriber column shouldn't have an ident right?
"Paul Ibison" wrote:
> Ben,
> I've just retested this and it depends on your replication setup. If you
> have the identity column set to 'Yes (Not for Replication)' then there are
> problems, but if it is set to just 'Yes' (the recommended way) then
> @.@.identity should return the correct value and scope_identity() will not
> return anything. Perhaps this is the source of your issue? Alternatively I
> was wondering if you have any user triggers in action?
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>|||Hi Ben,
Yes - I agree with everything you're saying :)
I'm currently testing your scenario on my home PC (2 databases on same
instance) which catches the @.@.identity (without the NFR attribute). I will
set it up accross servers when I get to work tomorrow.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||Thank you Paul!!! I've been racking my brain around this for almost 2 days.
My intern worse case scenario is to move to 2005 and use the OUTPUT clause
you mentioned or replacing the "Scope_Identity()" code to a Select
Max(Ident_Column) in the insert sp ...which to me feels more like a hack
thanks again!
"Paul Ibison" wrote:
> Hi Ben,
> Yes - I agree with everything you're saying :)
> I'm currently testing your scenario on my home PC (2 databases on same
> instance) which catches the @.@.identity (without the NFR attribute). I will
> set it up accross servers when I get to work tomorrow.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>
>|||Ben,
Unfortunately we only have 1 instance of SQL Server 2000 on the network and
when I finally got this set up on 2 networked instances of SQL Server 2005
it worked fine - I could pick up both the @.@.identity and the
scope_identity() values. However I noticed that this is implemented
differently and the identity property is on the subscriber in the new
version so this is not really a decent test. I'll try to install SQL Server
2000 on another box later on and test it this way, but I recommend getting a
support engineer (PSS) to test this for you as I won't have the time to set
all this up quickly.
Regards,
Paul Ibison|||thanks for the help Paul. I will do a quick test on 2005 and see if it
works. I'll keep you posted.
"Paul Ibison" wrote:
> Ben,
> Unfortunately we only have 1 instance of SQL Server 2000 on the network and
> when I finally got this set up on 2 networked instances of SQL Server 2005
> it worked fine - I could pick up both the @.@.identity and the
> scope_identity() values. However I noticed that this is implemented
> differently and the identity property is on the subscriber in the new
> version so this is not really a decent test. I'll try to install SQL Server
> 2000 on another box later on and test it this way, but I recommend getting a
> support engineer (PSS) to test this for you as I won't have the time to set
> all this up quickly.
> Regards,
> Paul Ibison
>
>|||Paul, here's my update.
I tried sql server 2005 and Yes Scope_Identity() and @.@.identity worked as
you mentioned but it seems to work differently in 2005.
In 2000 replicated identity columns would be replicated to their base type,
in my case an int. In 2005 it seems to replicate it as an identity column,
which I guess is the reason why the Scope_Identity and @.@.identity work. But
in 2005 it seems like it defaults to Automatic Range Management, but in 2000
I was able to get the identities updating sequentially with no Automatic
Range Management required. Is this feature gone in 2005? I would prefer to
have the immediate updating subscribers get the next identity from the
publisher so that the subscriber and publisher use the same identity
"manager" to get the next identity value (i.e. no identity ranges and no
gaps).
I'm going to do some more testing and keep you up to date.
"Ben Lam" wrote:
> thanks for the help Paul. I will do a quick test on 2005 and see if it
> works. I'll keep you posted.
> "Paul Ibison" wrote:
> > Ben,
> > Unfortunately we only have 1 instance of SQL Server 2000 on the network and
> > when I finally got this set up on 2 networked instances of SQL Server 2005
> > it worked fine - I could pick up both the @.@.identity and the
> > scope_identity() values. However I noticed that this is implemented
> > differently and the identity property is on the subscriber in the new
> > version so this is not really a decent test. I'll try to install SQL Server
> > 2000 on another box later on and test it this way, but I recommend getting a
> > support engineer (PSS) to test this for you as I won't have the time to set
> > all this up quickly.
> > Regards,
> > Paul Ibison
> >
> >
> >

Does scope_identity or @@identity always return NULL on Subscriber

I have insert sp's that run on a subscriber. After the insert sql statement
I use scope_identity to get the last inserted identity for child rows for
parent child relationships.
After implementing transactional replication with immediate updates, calling
this sp on the subscriber inserts the row properly but both scope_identity
and @.@.identity returns null.
How do I get the identity value of the last inserted row on a subscriber so
I can use that ID for child rows?Ben,
interesting. These identity values are controlled by the publisher rather
than the subscriber. In fact, you should find that on the subscriber there
isn't an identity property on the tables for this reason. Are you're using
SQL Server 2005? If so, you could capture the assigned value using the
OUTPUT clause.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Does RS cache AD groups?

Hi,
I've run into a few problems, and I think RS may be to blame. I was hoping
one of the experts out there would be able to offer some input.
I set up role-based security in RS as follows:
Report 1, 2, and 3: all authenticated users assigned browser role
Reports 4, 5: a select group (AD security group named
"ReportingCommissions") assigned browser role
I added a new user to the ReportingCommissions group via Active Directory
Users and Groups and replicated both domain controllers.
After that, the user was not able to see report 4 or 5 in his list of
reports in the folder. If I added his exact Windows username to report 4 as
a browser, he can see it immediately.
Rebooting the server that houses the RS web app did the trick - the user can
now see both folders as a member of the group ReportingCommissions.
This leads me to believe that RS is somehow caching the list of members of
each Windows security group assigned to roles in RS. I can see why this
would be done, as it would slow folder browsing down to enumerate these
groups for every report in the current folder. Whereas matching up a
username should be much quicker, so there is no need to cache that info.
Is my assumption correct, or am I missing something? If the group
memberships are being cached in RS, can you tell me for how long? Is there
any way to clear that cache or add to a group's membership within the db?
Restarting the ReportServer service did not help, but I didn't try
restarting any of the IIS-related services.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]Has anyone run across this before? Any answers from MS? Thanks in
advance...
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Jake Marx wrote:
> Hi,
> I've run into a few problems, and I think RS may be to blame. I was
> hoping one of the experts out there would be able to offer some input.
> I set up role-based security in RS as follows:
> Report 1, 2, and 3: all authenticated users assigned browser role
> Reports 4, 5: a select group (AD security group named
> "ReportingCommissions") assigned browser role
> I added a new user to the ReportingCommissions group via Active
> Directory Users and Groups and replicated both domain controllers.
> After that, the user was not able to see report 4 or 5 in his list of
> reports in the folder. If I added his exact Windows username to
> report 4 as a browser, he can see it immediately.
> Rebooting the server that houses the RS web app did the trick - the
> user can now see both folders as a member of the group
> ReportingCommissions.
> This leads me to believe that RS is somehow caching the list of
> members of each Windows security group assigned to roles in RS. I
> can see why this would be done, as it would slow folder browsing down
> to enumerate these groups for every report in the current folder. Whereas
> matching up a username should be much quicker, so there is no
> need to cache that info.
> Is my assumption correct, or am I missing something? If the group
> memberships are being cached in RS, can you tell me for how long? Is
> there any way to clear that cache or add to a group's membership
> within the db? Restarting the ReportServer service did not help, but
> I didn't try restarting any of the IIS-related services.|||I got a response for you from Tudor Trufinescu, a dev lead. He says he's
answered this often enough that it was time to create a blog entry. It's at
http://blogs.msdn.com/tudortr/archive/2004/10/27/248846.aspx and it mentions
a KB article as well.
--
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jake Marx" <msnews@.longhead.com> wrote in message
news:eBAH5z3uEHA.3976@.TK2MSFTNGP09.phx.gbl...
> Has anyone run across this before? Any answers from MS? Thanks in
> advance...
> --
> Regards,
> Jake Marx
> MS MVP - Excel
> www.longhead.com
> [please keep replies in the newsgroup - email address unmonitored]
>
> Jake Marx wrote:
>> Hi,
>> I've run into a few problems, and I think RS may be to blame. I was
>> hoping one of the experts out there would be able to offer some input.
>> I set up role-based security in RS as follows:
>> Report 1, 2, and 3: all authenticated users assigned browser role
>> Reports 4, 5: a select group (AD security group named
>> "ReportingCommissions") assigned browser role
>> I added a new user to the ReportingCommissions group via Active
>> Directory Users and Groups and replicated both domain controllers.
>> After that, the user was not able to see report 4 or 5 in his list of
>> reports in the folder. If I added his exact Windows username to
>> report 4 as a browser, he can see it immediately.
>> Rebooting the server that houses the RS web app did the trick - the
>> user can now see both folders as a member of the group
>> ReportingCommissions.
>> This leads me to believe that RS is somehow caching the list of
>> members of each Windows security group assigned to roles in RS. I
>> can see why this would be done, as it would slow folder browsing down
>> to enumerate these groups for every report in the current folder. Whereas
>> matching up a username should be much quicker, so there is no
>> need to cache that info.
>> Is my assumption correct, or am I missing something? If the group
>> memberships are being cached in RS, can you tell me for how long? Is
>> there any way to clear that cache or add to a group's membership
>> within the db? Restarting the ReportServer service did not help, but
>> I didn't try restarting any of the IIS-related services.
>|||Stephen Dybing [MSFT] wrote:
> I got a response for you from Tudor Trufinescu, a dev lead. He says
> he's answered this often enough that it was time to create a blog
> entry. It's at
> http://blogs.msdn.com/tudortr/archive/2004/10/27/248846.aspx and it
> mentions a KB article as well.
Thanks, Stephen. I thought I had waited more than 15 minutes, but I was
probably just being impatient. I don't think our security group updates
will be that frequent, so I'll probably have users wait the 15 minutes (or
restart the w3 publishing service if we can't wait).
Thanks again - I appreciate the followup.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]

Does reporting services run on the same machine as SQL Server?

Hi,
We're getting ready to install and start using SQL Server Reporting
Services. Do we install it on the same server as SQL Server? If yes, is that
the only way to do it? Can we install it on a separate server? Does it make
sense to do so?
Thanks,
SamIf you install it on the same server as a current licenced copy of SQl Server
2000 then it's free. If you install it on it's own server then you have to
pay a licence fee for Reporting Services (which I think is equivalent to a
SQL Server licence).
"Sam" wrote:
> Hi,
> We're getting ready to install and start using SQL Server Reporting
> Services. Do we install it on the same server as SQL Server? If yes, is that
> the only way to do it? Can we install it on a separate server? Does it make
> sense to do so?
> Thanks,
> Sam
>
>

Wednesday, March 21, 2012

Does Report Builder support Analysis Services Databases?

The webcast on Report Builder mentioned that you can run reports that were
created in Report Designer in Report Builder. Is it possible?There are two questions in your post.
1. Does Report Builder support Analysis Services Databases?Yes, with
Analysis Services 2005. You can automatically generate the model from an
SSAS 2005 cube in the Management Studio.
2. Is it possible to open reports that were created in the Report Designer
in the Report Builder? Sort of. Some Report Designer features are not
supported in the Report Builder since the Report Designer is more advanced.
I am not aware about a document that lists all of these features. The
reverse should be OK -- you shoudl be able to open Report Builder reports in
the Report Designer.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
> The webcast on Report Builder mentioned that you can run reports that were
> created in Report Designer in Report Builder. Is it possible?|||Hi,
Thanks for the info.
I am not able to open a Report Builder report iN Report Designer. When I go
to the preview screen of the report (.rdl), it throws an error that it cannot
find the Model. I guess we need to change the rdl definition to open it
properly. Do you have any idea how to correct the information and open Report
Builder report in Report Designer.
"Teo Lachev [MVP]" wrote:
> There are two questions in your post.
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
> 2. Is it possible to open reports that were created in the Report Designer
> in the Report Builder? Sort of. Some Report Designer features are not
> supported in the Report Builder since the Report Designer is more advanced.
> I am not aware about a document that lists all of these features. The
> reverse should be OK -- you shoudl be able to open Report Builder reports in
> the Report Designer.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
> > The webcast on Report Builder mentioned that you can run reports that were
> > created in Report Designer in Report Builder. Is it possible?
>
>|||1. Save the ad hoc report as a file.
2. Open it in your RS project.You shoudl be able to see its layout but not
to preview it.
3. Add a data source based on the Report Server Model. extension with a
connection string, such as
server=http://localhost/reportserver;datasource=/<Folder>/<your model name>
4. Link the report dataset to that data source.
Now you should be able to preview the report.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:5D591912-0FD8-4812-A44F-8CB3FE312C84@.microsoft.com...
> Hi,
> Thanks for the info.
> I am not able to open a Report Builder report iN Report Designer. When I
> go
> to the preview screen of the report (.rdl), it throws an error that it
> cannot
> find the Model. I guess we need to change the rdl definition to open it
> properly. Do you have any idea how to correct the information and open
> Report
> Builder report in Report Designer.
>
> "Teo Lachev [MVP]" wrote:
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer
>> in the Report Builder? Sort of. Some Report Designer features are not
>> supported in the Report Builder since the Report Designer is more
>> advanced.
>> I am not aware about a document that lists all of these features. The
>> reverse should be OK -- you shoudl be able to open Report Builder reports
>> in
>> the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> > The webcast on Report Builder mentioned that you can run reports that
>> > were
>> > created in Report Designer in Report Builder. Is it possible?
>>|||You need to create a data source that uses the Report Server Model extension
with a connection string sth like:
server=http://localhost/reportserver;datasource=/<Folder where model is
located>/<model name>
Next, you need to bind the report dataset to that data source.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:5D591912-0FD8-4812-A44F-8CB3FE312C84@.microsoft.com...
> Hi,
> Thanks for the info.
> I am not able to open a Report Builder report iN Report Designer. When I
> go
> to the preview screen of the report (.rdl), it throws an error that it
> cannot
> find the Model. I guess we need to change the rdl definition to open it
> properly. Do you have any idea how to correct the information and open
> Report
> Builder report in Report Designer.
>
> "Teo Lachev [MVP]" wrote:
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer
>> in the Report Builder? Sort of. Some Report Designer features are not
>> supported in the Report Builder since the Report Designer is more
>> advanced.
>> I am not aware about a document that lists all of these features. The
>> reverse should be OK -- you shoudl be able to open Report Builder reports
>> in
>> the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> > The webcast on Report Builder mentioned that you can run reports that
>> > were
>> > created in Report Designer in Report Builder. Is it possible?
>>|||Hi
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
Where is that option located?
Thanks,
Andrés
"Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
news:e3zEGJs5FHA.2776@.TK2MSFTNGP15.phx.gbl...
> There are two questions in your post.
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
> 2. Is it possible to open reports that were created in the Report
> Designer in the Report Builder? Sort of. Some Report Designer features are
> not supported in the Report Builder since the Report Designer is more
> advanced. I am not aware about a document that lists all of these
> features. The reverse should be OK -- you shoudl be able to open Report
> Builder reports in the Report Designer.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> The webcast on Report Builder mentioned that you can run reports that
>> were
>> created in Report Designer in Report Builder. Is it possible?
>|||In the SQL Server Management Studio, connect to your RS instance. Then,
right-click on a data source that points to SSAS 2005 and select Generate
Model.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Andres" <andres.fontan@.alcuadrado.com> wrote in message
news:u1pSfXW8FHA.3504@.TK2MSFTNGP11.phx.gbl...
> Hi
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
> Where is that option located?
> Thanks,
> Andrés
>
>
> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
> news:e3zEGJs5FHA.2776@.TK2MSFTNGP15.phx.gbl...
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer in the Report Builder? Sort of. Some Report Designer features
>> are not supported in the Report Builder since the Report Designer is more
>> advanced. I am not aware about a document that lists all of these
>> features. The reverse should be OK -- you shoudl be able to open Report
>> Builder reports in the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> The webcast on Report Builder mentioned that you can run reports that
>> were
>> created in Report Designer in Report Builder. Is it possible?
>>
>sql

Does Rebuild Index update the statistics?

For SQL 2000,does a dbcc dbreindex update the statistics also? Does an UPDATE
STATISTICS need to be run in addition to dbcc dbreindex to update the
statistics ?Yes, dbcc dbreindex does update statistics (as opposed to dbcc indexdefrag
which does not)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"MANCHO" <MANCHO@.discussions.microsoft.com> wrote in message
news:21E7A1CE-CEE6-4D28-B17F-41979D1CF4F2@.microsoft.com...
> For SQL 2000,does a dbcc dbreindex update the statistics also? Does an
> UPDATE
> STATISTICS need to be run in addition to dbcc dbreindex to update the
> statistics ?

Does Rebuild Index update the statistics?

For SQL 2000,does a dbcc dbreindex update the statistics also? Does an UPDATE
STATISTICS need to be run in addition to dbcc dbreindex to update the
statistics ?
Yes, dbcc dbreindex does update statistics (as opposed to dbcc indexdefrag
which does not)
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"MANCHO" <MANCHO@.discussions.microsoft.com> wrote in message
news:21E7A1CE-CEE6-4D28-B17F-41979D1CF4F2@.microsoft.com...
> For SQL 2000,does a dbcc dbreindex update the statistics also? Does an
> UPDATE
> STATISTICS need to be run in addition to dbcc dbreindex to update the
> statistics ?

Does Rebuild Index update the statistics?

For SQL 2000,does a dbcc dbreindex update the statistics also? Does an UPDAT
E
STATISTICS need to be run in addition to dbcc dbreindex to update the
statistics ?Yes, dbcc dbreindex does update statistics (as opposed to dbcc indexdefrag
which does not)
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"MANCHO" <MANCHO@.discussions.microsoft.com> wrote in message
news:21E7A1CE-CEE6-4D28-B17F-41979D1CF4F2@.microsoft.com...
> For SQL 2000,does a dbcc dbreindex update the statistics also? Does an
> UPDATE
> STATISTICS need to be run in addition to dbcc dbreindex to update the
> statistics ?

Monday, March 19, 2012

Does not have permission to run DBCC CHECKIDENT

I have created a stored procedure in which i have created a temproray table with 2 fields, one is IDENTITY column and i set the seed by using DBCC CHECKIDENT but it gave an error about permission.

Please give suggestion for resolving this issue.

DBCC CHECKIDENT permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database role

Pls check the ONLINE Document for more details..

Does NEWID() affect my insert performance?

I have a SQL script, which is run during installation, as I want a
particular table to be populated initially. For this particular table I
have around 4000 recs that need to be populated. The script first
deletes all the rows in the table by the following statement:
Delete from [dbo].[Table1]
GO
Then there are 4000 following insert statement is as follows:
INSERT INTO [dbo].[Table1]
(Field1, Field2,Field3,Field4,Field5,Field6,Field7)
VALUES
(NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
GO
Since I have started using this script, my installer takes considerably
more time ....I cannot do a bulk insert using CSV because I am using
NEWID().
Is there a workaround?
Thanks.
"Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegrou ps.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
>
The problem with using NEWID() like this is that the values are very
unordered, and so the index inserts get scattered all over. SQL Server 2005
introduces NEWSEQUENTIALID() to address this problem.
http://msdn2.microsoft.com/en-us/library/ms189786.aspx
But 4000 isn't a ton of rows in any case, and should take less than 10
seconds either way.
David
|||Thanks David, But I am using SQL 2000. Does anyone know, a way to do
this without changing the schema of the table?
Thanks
|||I agree with David that there should be no noticeable difference using
NEWID() with only 4000 rows. You mentioned that your installer takes
considerably longer but are you certain that it is this script that is the
cause?
Hope this helps.
Dan Guzman
SQL Server MVP
"Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegrou ps.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
> Thanks.
>
|||You're change is probably because you are doing single inserts instead of
bulk insert. You might see if doing a truncate instead of delete buys you
enough to get your performance back.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegrou ps.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
> Thanks.
>

Does NEWID() affect my insert performance?

I have a SQL script, which is run during installation, as I want a
particular table to be populated initially. For this particular table I
have around 4000 recs that need to be populated. The script first
deletes all the rows in the table by the following statement:
Delete from [dbo].[Table1]
GO
Then there are 4000 following insert statement is as follows:
INSERT INTO [dbo].[Table1]
(Field1, Field2,Field3,Field4,Field5,Field6,Field
7)
VALUES
(NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
GO
Since I have started using this script, my installer takes considerably
more time ....I cannot do a bulk insert using CSV because I am using
NEWID().
Is there a workaround?
Thanks."Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegroups.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field
7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
>
The problem with using NEWID() like this is that the values are very
unordered, and so the index inserts get scattered all over. SQL Server 2005
introduces NEWSEQUENTIALID() to address this problem.
http://msdn2.microsoft.com/en-us/library/ms189786.aspx
But 4000 isn't a ton of rows in any case, and should take less than 10
seconds either way.
David|||Thanks David, But I am using SQL 2000. Does anyone know, a way to do
this without changing the schema of the table?
Thanks|||I agree with David that there should be no noticeable difference using
NEWID() with only 4000 rows. You mentioned that your installer takes
considerably longer but are you certain that it is this script that is the
cause?
Hope this helps.
Dan Guzman
SQL Server MVP
"Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegroups.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field
7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
> Thanks.
>|||You're change is probably because you are doing single inserts instead of
bulk insert. You might see if doing a truncate instead of delete buys you
enough to get your performance back.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Pratham" <pratham17@.gmail.com> wrote in message
news:1144101429.666024.8280@.z34g2000cwc.googlegroups.com...
>I have a SQL script, which is run during installation, as I want a
> particular table to be populated initially. For this particular table I
> have around 4000 recs that need to be populated. The script first
> deletes all the rows in the table by the following statement:
> Delete from [dbo].[Table1]
> GO
> Then there are 4000 following insert statement is as follows:
> INSERT INTO [dbo].[Table1]
> (Field1, Field2,Field3,Field4,Field5,Field6,Field
7)
> VALUES
> (NEWID(),'0', '0', 'Test text','User1',GETDATE(),'Test Text')
> GO
> Since I have started using this script, my installer takes considerably
> more time ....I cannot do a bulk insert using CSV because I am using
> NEWID().
> Is there a workaround?
> Thanks.
>