Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts

Friday, March 23, 2012

Related to Auto Increament

Hello EveryOne,

I have a program which insert the Data into table Fine. But the problem is that whenever expecption is raised the auto increament id is increases..
i want that user enter the record and without error the auto increament id is 1 and when second user enter the record on table and exception raised and next time he entered again then his record auto increament id is 3 why? But record is not entered only the expecption is raised.

How to resolve this problem to make cosistency in record of other tables.? Help me

Because the database had already obtained the identity value before the exception was encountered. Identity fields are not guaranteed to be consecutive, nor are they necessarily guaranteed to be increasing (although I have never seen a situation in which it hasn't increased). If you assume the identity value only guarantees that only one record will have that value, and that is the only thing you assume, you'll be safe. Assuming anything else is assuming too much.

|||

Always getting consecutive numbers for a column in any database is very difficult to achieve, as databases by their very nature are accessed in parallel and not in serial. Once you start to think about the problems you could encounter trying to guarantee consecutive numbers then you'll realise why it is impossible to achieve and also have good performance.

Unless there is a really, really, really good reason why you don't want gaps in your sequence then just be content that your identity column is unique. It's actual value is usually irrelevent, so don't worry about it.

reinstalling the service pack?

Hello:
On either SQL 2000 or SQL 2005, do you have to reinstall a service pack
whenever you create a new database? Or, does the new database "contain" the
service pack already upon the database's creation?
Thanks!
childofthe1980sYou never need to reinstall.
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:4B00F4AF-662A-405F-900C-345B90966995@.microsoft.com...
> Hello:
> On either SQL 2000 or SQL 2005, do you have to reinstall a service pack
> whenever you create a new database? Or, does the new database "contain"
> the
> service pack already upon the database's creation?
> Thanks!
> childofthe1980s|||For additional info: You will need to install SP of SQL Server for new
instances only, not for databases.
--
Ekrem Ã?nsoy
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:4B00F4AF-662A-405F-900C-345B90966995@.microsoft.com...
> Hello:
> On either SQL 2000 or SQL 2005, do you have to reinstall a service pack
> whenever you create a new database? Or, does the new database "contain"
> the
> service pack already upon the database's creation?
> Thanks!
> childofthe1980s

Wednesday, March 21, 2012

Reinstall problem with Report Services

I have been playing with my Standard version of SQL Server with no problems. Now I wanted to start exploring Reporting Services, however whenever I tried to connect to the instance through the Management Studio, it would fail. I did notice that the folder in IIS was not present so I am thinking it was something I failed to do in the initial setup.

I have uninstalled everything, but when it gets to Reporting Services, I get an error message "The setup failed to read IISMiniMap table. Error Code -2147024893." I did a search on various newsgroups and forums and found a message about installing and running some Microsoft Cleanup utility. I did this, but I am still getting the error message and then the uninstall rolls everything back.

What do I need to do here, short of doing a total reformat of the harddrive and just reinstall everything?

Thanks for the information.

To add to this problem, I uninstalled all that I could with my original instance of SQL Server (minus Reporting Services). Now I have reinstalled a new instance that also created a new instance of Reporting Services. However when I go to IIS, it says that the Report Server is stopped and I cannot restart it. I get the error "The request is not supported".

What is up with this?

Tuesday, March 20, 2012

Reinitializing transactional subscribers

In SQL2000, SP3, We want to periodically refresh our read-only
subscribers with the latest schema and data (including FK's, indexes,
etc) whenever we role out a new software release. The database is
relatively small and we can currently disable publishing\remove
subscribers, and add them back in about 15 minutes. As the database
grows, I'm not sure if this would be the best method of synchronizing
the subscribers, but management likes the idea of a complete snapshot.
Is there a typical approach to updating subscribers with all
differences that makes more sense? The subscribers are primarily for
Disaster Recovery, but are also used to reduce the need for our
European customers to come to the US for reads. When I tried the
"start synchronizing" option in the EM gui, it has difficulty
dropping/replacing tables because it can't drop tables w FK's.
Also, can anyone explain the difference between reinitializing and
synchronizing?
thx much!
Gary,
if you have a need to drop FKs then it is possible to apply a prescript
before the snapshot is applied (botom of snapshot tab on publication
properties).
Some schema changes can be carried out using the 'plumbing' of replication,
eg sp_repladdcolumn and sp_repldropcolumn. Some other changes eg addition of
an index, can be done using sp_addscriptexec.
As for the difference between initialization and synchronization, right at
the start when the snapshot is sent to the subscriber there isn't really
one. Once the snapshot has been applied, sending down transactions in the
case of transactional replication is referred to as synchronization, and
reinitialization would refer to a new snapshot being created and propagated.
HTH,
Paul Ibison
|||Thanks Paul... But rather than running a pre-script, and individual
system sp's, do you know if this methodology - dropping/re-establishing
replication as new releases are rolled out is a common approach to
keeping things in-sync?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||I have seen it used, but sp_droparticle and sp_addarticle, along with
sp_repladdcolumn and sp_repldropcolumn are more common for small changes.
Regards,
Paul