Showing posts with label online. Show all posts
Showing posts with label online. Show all posts

Wednesday, March 28, 2012

Openings in an online game company for sql coders

Those who is interested in computers, games can check out a free
massive online strategy scifi game at http://www.spacefederation.net

This game is also looking for staff, especially those in the computer
line like programming, development, it and Internet security. to apply,
goto the game and click on jobs, or click on contact to send them an
email to apply. they are always on the lookout for talented and
passionate people, if there is no such post available they will make
one for you.

Cowly the Game player
Visit some of the games I play

http://www.gamestotal.com
http://mmorpg.gamestotal.com
http://www.gamestotal.com/news/
http://free_mmorpg.gamestotal.com
http://strategy_games.gamestotal.com
http://www.gamestotal.com/strategygames/
http://free_strategy_games.gamestotal.comOn 13 Apr 2005 00:29:31 -0700, step_y@.yahoo.com wrote:

> Those who is interested in computers, games can check out a free
> massive online strategy scifi game at http://www.spacefederation.net
> This game is also looking for staff, especially those in the computer
> line like programming, development, it and Internet security. to apply,
> goto the game and click on jobs, or click on contact to send them an
> email to apply. they are always on the lookout for talented and
> passionate people, if there is no such post available they will make
> one for you.

All the job descriptions require working in Malaysia?

Monday, February 20, 2012

Online/Offline Application that must synchronize with SQL 2005

Hi !

I must developp a WPF Application with online and offline capabilities! First I think to use XML file on the local application and transfer these XML files to a webservice that will synchronize them with the SQL 2005 Server

BUT

I read about "Replication"... and I think it will be much simpler to implement!!!

Do you think it is a good idea to have a "local" SQL Express database and replicate it (when connection available is) with the principal database that will run a standard SQL 2005 version!

Do you have another suggestion to make such an application?

Thanks for help!!!

PlaTyPuS

PS: when the sql express solution a good idea is, does it give a simple solution to programm an automatic synchronization every hour?

Yes, you can use replication to sync data from the "remote" server to "local" server. You can schedule the job run in certain interval or even continuously.

You might want to take a look Microsoft Synchronization Services for ADO.NET. It might be exactly what you want. The CTP release can be downloaded from here (http://www.microsoft.com/downloads/details.aspx?FamilyID=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en). Rather than simply replicating database data, it provides a set of API to sync between data services and a data store. There are also more discussion in another MSDN forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1225&SiteID=1

|||

Peng Song wrote:

Yes, you can use replication to sync data from the "remote" server to "local" server. You can schedule the job run in certain interval or even continuously.

You might want to take a look Microsoft Synchronization Services for ADO.NET. It might be exactly what you want. The CTP release can be downloaded from here (http://www.microsoft.com/downloads/details.aspx?FamilyID=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en). Rather than simply replicating database data, it provides a set of API to sync between data services and a data store. There are also more discussion in another MSDN forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1225&SiteID=1

thx for answer! very interesting links (the blog of Rafik is very very interesting!!! : http://blogs.msdn.com/synchronizer/archive/2007/03/01/sync-demos-write-up.aspx)

++

online store database - replicate to shoppes

We have an online shopping cart and I need to replicate the new orders out
to the shoppes that will be shipping the order. I'll have about 300
subscribers that will be receiving the orders. I only need to sync each
subscriber 2 or 3 times a day but I am concerned about deadlocks or
conflicts if all try to sync at the same time. Each subscriber will
replicate via VPN so merge replication is probably my only option. I'm
looking for ideas on how I might be able to balance the load to handle so
many subscribers.
TIA
Tina
You should look at the limit the number of concurrent merge agents. Note
that you will have to bump up the value of StartQueueTimeout as well.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Tina Smith" <tb.smith@.earthlink.net> wrote in message
news:OEo0AuKVFHA.3244@.TK2MSFTNGP15.phx.gbl...
> We have an online shopping cart and I need to replicate the new orders out
> to the shoppes that will be shipping the order. I'll have about 300
> subscribers that will be receiving the orders. I only need to sync each
> subscriber 2 or 3 times a day but I am concerned about deadlocks or
> conflicts if all try to sync at the same time. Each subscriber will
> replicate via VPN so merge replication is probably my only option. I'm
> looking for ideas on how I might be able to balance the load to handle so
> many subscribers.
> TIA
> Tina
>
|||It's gonna be difficult to do since the subscribers will be determining when
they want to sync during the day. Are there any other options I can look
at? Multiple publishers or multiple distributors?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OIKwAgLVFHA.2172@.tk2msftngp13.phx.gbl...
> You should look at the limit the number of concurrent merge agents. Note
> that you will have to bump up the value of StartQueueTimeout as well.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Tina Smith" <tb.smith@.earthlink.net> wrote in message
> news:OEo0AuKVFHA.3244@.TK2MSFTNGP15.phx.gbl...
>

Online SQL Server resources?

I'm working on some research on online resources for SQL Server programming
and design. If you'd be willing to help, please follow the link below and
take the survey -- it's only 4 questions!
http://www.surveymonkey.com/s.asp?u=98075334236
Many thanks,
John"John Moody" <john@.wishtracker.com> wrote in message
news:e2qx0lpvDHA.2248@.TK2MSFTNGP09.phx.gbl...
> I'm working on some research on online resources for SQL Server
programming
> and design. If you'd be willing to help, please follow the link below and
> take the survey -- it's only 4 questions!
> http://www.surveymonkey.com/s.asp?u=98075334236
>
which asks
"How much would you be willing to pay for an online service that helped with
SQL Server database problems (design, programming, query construction) if
the service came with a 100% money-back guarantee?"
I believe microsoft.public.sqlserver.server already comes with a money-back
guarantee.
User ^
Expertise |
|
|
|
|
Problem Difficulty
David|||"John Moody" <john@.wishtracker.com> wrote in message
news:e2qx0lpvDHA.2248@.TK2MSFTNGP09.phx.gbl...
> I'm working on some research on online resources for SQL Server
programming
> and design. If you'd be willing to help, please follow the link below and
> take the survey -- it's only 4 questions!
> http://www.surveymonkey.com/s.asp?u=98075334236
> Many thanks,
> John
>
oops.
Meant to say that I once a problem is hard enough to merit a per-incident
fee, it may already be too hard so solve online.
David

Online SQL reference

Does anyone know of a quick online SQL reference or a dictionary of terms and sample strings?A co-worker just introduced me to a good, lightweight SQL site that sounds like what you want. Check out http://sqlzoo.net/howto/source/s.pl.htm and please let me know what you think.

-PatP|||you didn't know about sqlzoo before?

it's got a really nice interactive feature -- you can test your sql in multiple different database systems

great for learning the different sql dialects

there are links to all the different SQL Reference manuals on the home page -- http://sqlzoo.net/|||for additional SQL references, see my SQL Links (http://r937.com/sqllinks.cfm) page

(note to self: man, i gotta check those links and update that page, it's been almost a year, and i have a whole bunch of new ones to add!!)|||you didn't know about sqlzoo before?http://sqlzoo.net/I'm a hard core geek, and I lead a rather sheltered life... What can i say?

-PatP|||Thanks, Pat. That's basically what I was looking for.

I can't seem to find any info. on the query I'm trying...

This is in Access and what I want to do is go through my tables and only keep five records.

DELETE * FROM Table1 WHERE ... NOT IN
(SELECT TOP 5 * FROM Table1)

I realize that's wrong and the only way I can get it to work is to specify key fields from the table:

DELETE * FROM Table1 WHERE key_field NOT IN
(SELECT TOP 5 key_field FROM Table1
ORDER BY key_field)

The problem with that is the key_field is different for every table and I have about 500 tables I need to do this for. I need a more generic way to delete the records so I can reuse the query.

Online SQL Files?

Good morning,
I'm trying to make files I've placed on a SQL server publicly accessible from the WWW. I put them in a folder where other documents are located but the files are not online. I know I must publish them, but I'm not exactly sure on how to go about it.As you have posted a question in the articles section it is being moved to SQL Forum.

MODERATOR.

online sites

What are the good online sites for T-SQL Queries, Joins and stored
procedures?Hi
For the syntax of your statements and some examples see Books Online or the
online equivalent at
http://msdn.microsoft.com/library/d... />
n_6lyk.asp
for learning T-SQL you may want to look at subscribing to SQL Server
Magazine http://www.windowsitpro.com/SQLServer/ and SQL Server professional
http://www.pinpub.com/ME2/Audiences/Default.asp Many other sites are listed
on http://www.aspfaq.com/show.asp?id=2423
John
"intermediate" <enlight.v@.gmail.com> wrote in message
news:1136150275.405829.321770@.z14g2000cwz.googlegroups.com...
> What are the good online sites for T-SQL Queries, Joins and stored
> procedures?
>

Online Restore.

Hi,
Can i take backup(not full db, only one filegroup) of a database in
Server1 and restore it on a same database in another server2 using
Online Restore commands. Note:both database has same schema and data.
Addtional data in few tables in server1 needs to be copied to server2
and those tables are in separate filegroup.
Could you please send me the sequence of steps to do the online
restore?
Thanks in Advance
Regards
MaheshOnline restore as you said was introduced in sql server 2005 (enterprise
edition ) if i remember well
Why do you need an online restore? Some users are using the database on
server2?
Are you using sql server 2005?
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160544431.729794.226080@.m7g2000cwm.googlegroups.com...
> Hi,
> Can i take backup(not full db, only one filegroup) of a database in
> Server1 and restore it on a same database in another server2 using
> Online Restore commands. Note:both database has same schema and data.
> Addtional data in few tables in server1 needs to be copied to server2
> and those tables are in separate filegroup.
> Could you please send me the sequence of steps to do the online
> restore?
> Thanks in Advance
> Regards
> Mahesh
>|||Yes. we are using sql2005(enterprise Edition). we tried online restore
but the status of the database changed to Restoring... so please send
me the steps to do online restore.
Thanks
Regards
Mahesh
Uri Dimant wrote:
> Online restore as you said was introduced in sql server 2005 (enterprise
> edition ) if i remember well
> Why do you need an online restore? Some users are using the database on
> server2?
> Are you using sql server 2005?
>|||Hi
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894148e7d8c.htm
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160564344.563238.11560@.i42g2000cwa.googlegroups.com...
> Yes. we are using sql2005(enterprise Edition). we tried online restore
> but the status of the database changed to Restoring... so please send
> me the steps to do online restore.
> Thanks
> Regards
> Mahesh
> Uri Dimant wrote:
>> Online restore as you said was introduced in sql server 2005 (enterprise
>> edition ) if i remember well
>> Why do you need an online restore? Some users are using the database on
>> server2?
>> Are you using sql server 2005?
>>
>|||Hi,
i am not able to access the below page. i am getting 'the page cannot
be displayed' error. could you please send me the URL or Please send me
content as doc to my id.
My ID: nrkmahesh@.gmail.com
Thanks a lot
Regards
Mahesh
Uri Dimant wrote:
> Hi
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894148e7d8c.htm
>|||The URL Uri posted is a SQL Sever 2005 Books Online reference. Open the SQL
Sever 2005 Books Online (a.k.a. help), view a topic and paste the URL into
the URL address bar.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160566954.263572.187590@.e3g2000cwe.googlegroups.com...
> Hi,
> i am not able to access the below page. i am getting 'the page cannot
> be displayed' error. could you please send me the URL or Please send me
> content as doc to my id.
> My ID: nrkmahesh@.gmail.com
> Thanks a lot
> Regards
> Mahesh
> Uri Dimant wrote:
>> Hi
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894148e7d8c.htm
>>
>

Online Restore.

Hi,
Can i take backup(not full db, only one filegroup) of a database in
Server1 and restore it on a same database in another server2 using
Online Restore commands. Note:both database has same schema and data.
Addtional data in few tables in server1 needs to be copied to server2
and those tables are in separate filegroup.
Could you please send me the sequence of steps to do the online
restore?
Thanks in Advance
Regards
Mahesh
Online restore as you said was introduced in sql server 2005 (enterprise
edition ) if i remember well
Why do you need an online restore? Some users are using the database on
server2?
Are you using sql server 2005?
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160544431.729794.226080@.m7g2000cwm.googlegro ups.com...
> Hi,
> Can i take backup(not full db, only one filegroup) of a database in
> Server1 and restore it on a same database in another server2 using
> Online Restore commands. Note:both database has same schema and data.
> Addtional data in few tables in server1 needs to be copied to server2
> and those tables are in separate filegroup.
> Could you please send me the sequence of steps to do the online
> restore?
> Thanks in Advance
> Regards
> Mahesh
>
|||Yes. we are using sql2005(enterprise Edition). we tried online restore
but the status of the database changed to Restoring... so please send
me the steps to do online restore.
Thanks
Regards
Mahesh
Uri Dimant wrote:
> Online restore as you said was introduced in sql server 2005 (enterprise
> edition ) if i remember well
> Why do you need an online restore? Some users are using the database on
> server2?
> Are you using sql server 2005?
>
|||Hi
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894148e7d8c.htm
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160564344.563238.11560@.i42g2000cwa.googlegro ups.com...
> Yes. we are using sql2005(enterprise Edition). we tried online restore
> but the status of the database changed to Restoring... so please send
> me the steps to do online restore.
> Thanks
> Regards
> Mahesh
> Uri Dimant wrote:
>
|||Hi,
i am not able to access the below page. i am getting 'the page cannot
be displayed' error. could you please send me the URL or Please send me
content as doc to my id.
My ID: nrkmahesh@.gmail.com
Thanks a lot
Regards
Mahesh
Uri Dimant wrote:
> Hi
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894148e7d8c.htm
>
|||The URL Uri posted is a SQL Sever 2005 Books Online reference. Open the SQL
Sever 2005 Books Online (a.k.a. help), view a topic and paste the URL into
the URL address bar.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160566954.263572.187590@.e3g2000cwe.googlegro ups.com...
> Hi,
> i am not able to access the below page. i am getting 'the page cannot
> be displayed' error. could you please send me the URL or Please send me
> content as doc to my id.
> My ID: nrkmahesh@.gmail.com
> Thanks a lot
> Regards
> Mahesh
> Uri Dimant wrote:
>

Online Restore.

Hi,
Can i take backup(not full db, only one filegroup) of a database in
Server1 and restore it on a same database in another server2 using
Online Restore commands. Note:both database has same schema and data.
Addtional data in few tables in server1 needs to be copied to server2
and those tables are in separate filegroup.
Could you please send me the sequence of steps to do the online
restore?
Thanks in Advance
Regards
MaheshOnline restore as you said was introduced in sql server 2005 (enterprise
edition ) if i remember well
Why do you need an online restore? Some users are using the database on
server2?
Are you using sql server 2005?
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160544431.729794.226080@.m7g2000cwm.googlegroups.com...
> Hi,
> Can i take backup(not full db, only one filegroup) of a database in
> Server1 and restore it on a same database in another server2 using
> Online Restore commands. Note:both database has same schema and data.
> Addtional data in few tables in server1 needs to be copied to server2
> and those tables are in separate filegroup.
> Could you please send me the sequence of steps to do the online
> restore?
> Thanks in Advance
> Regards
> Mahesh
>|||Yes. we are using sql2005(enterprise Edition). we tried online restore
but the status of the database changed to Restoring... so please send
me the steps to do online restore.
Thanks
Regards
Mahesh
Uri Dimant wrote:
> Online restore as you said was introduced in sql server 2005 (enterprise
> edition ) if i remember well
> Why do you need an online restore? Some users are using the database on
> server2?
> Are you using sql server 2005?
>|||Hi
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-6894
148e7d8c.htm
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160564344.563238.11560@.i42g2000cwa.googlegroups.com...
> Yes. we are using sql2005(enterprise Edition). we tried online restore
> but the status of the database changed to Restoring... so please send
> me the steps to do online restore.
> Thanks
> Regards
> Mahesh
> Uri Dimant wrote:
>|||Hi,
i am not able to access the below page. i am getting 'the page cannot
be displayed' error. could you please send me the URL or Please send me
content as doc to my id.
My ID: nrkmahesh@.gmail.com
Thanks a lot
Regards
Mahesh
Uri Dimant wrote:
> Hi
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/7982a687-980a-4eb8-8e9f-68
94148e7d8c.htm
>|||The URL Uri posted is a SQL Sever 2005 Books Online reference. Open the SQL
Sever 2005 Books Online (a.k.a. help), view a topic and paste the URL into
the URL address bar.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mahesh" <nrkmahesh@.gmail.com> wrote in message
news:1160566954.263572.187590@.e3g2000cwe.googlegroups.com...
> Hi,
> i am not able to access the below page. i am getting 'the page cannot
> be displayed' error. could you please send me the URL or Please send me
> content as doc to my id.
> My ID: nrkmahesh@.gmail.com
> Thanks a lot
> Regards
> Mahesh
> Uri Dimant wrote:
>

Online Re-indexing vs Offline Re-indexing

Hi,

The other day we tried online re-indexing feature of SQL 2005 and it’s performing faster than offline re-indexing. Could you please validate if it’s supposed to do be this way? I always thought offline should be faster than online.

Thanks,

Ritesh

Generally offline should be faster than online. Offline doesn't have to handle any changes that might be occurring on the table while the re-indexing is taking place, etc., so there's less work that needs to be done. If it seems the online form is faster than the offline, then perhaps it's a matter of caching or disk speed or some concurrent workload that is making it seem faster. Here's a few things that might make your timings invalid:

First, is the table whose index is being rebuilt of good size so that the difference isn't just a couple of seconds so that we're really just talking about 'noise' in the timing?

Has SQL Server's cache been cleared so that you're not including disk reads in one case and not including them in another?

Are they both going to the same disk(s), or is one benefiting from faster drives?

Are you sure one isn't benefiting from a data file that's already been grown to a sufficient size while the other had to wait for the files to be automatically grown? Or perhaps it's the log file that had to grow during the slower test but not during the faster one?

Was some other query running during the slow test that wasn't running during the faster one? Or some other process that was running on the same machine so that less memory or CPU was available?

Don

|||

Both were ran on same system utilizing the same drives. The index on each tables takes more than an hour hence we can really see the difference. The difference on one of the table is huge from 14 hours in offline to 5 hours in online.

Is there a possibility that if indexes are not fragmented it will take lesser time. We are just running rebuild index on tables currently there's no logic to eliminate certain indexes with less fragmentation.

The online re-indexing was ran after offline re-indexing does the sequence can make the difference?

Thanks,

Ritesh

|||

I'd bet the offline (first) test had to do a lot more work than the online (second) test. It's likely that you are continually having to auto-grow your datafile or log by a small amount at a time so that in the first test it's continually stopping to grow the file. Then the second test just uses that already-grown file and never has to wait like the first test did. Growing a data or log file can have a significant impact. Try growing the file to an appropriate size before you do either re-index operation and don't rely on auto-grow to size your files correctly.

When comparing operations like this you should start from exactly the same starting position. I'd recommend you restore from a backup before each re-index test .. it's very important to compare apples to apples when trying to analyze something like this.


Don

|||

We tried online re-indexing by restoring the same database and still we got the better results as compared to offline indexing. Timings have almost double, is there anything that data engine does internally so that online re-indexing is not a bottleneck on the application.

Thanks,

Ritesh

|||

It seems that to get to the bottom of this we'd have to know a lot more about the table(s), indexes, fragmentation, initial file sizes, concurrent workload, etc., which unfortunately I would likely not be able to dig into as deeply as might be needed.

Offline should generally be faster .. it has exclusive access to the table and indexes so there's less overhead.

I still think there must be something else that's adding extra work for the offline form, like having to grow data or log files where the online rebuild doesn't have to do this work. Can you confirm that you've increased the datafile and logfile sizes before you start the test so that it doesn't have to wait for autogrow?


Don

Online Re-indexing vs Offline Re-indexing

Hi,

The other day we tried online re-indexing feature of SQL 2005 and it’s performing faster than offline re-indexing. Could you please validate if it’s supposed to do be this way? I always thought offline should be faster than online.

Thanks,

Ritesh

Generally offline should be faster than online. Offline doesn't have to handle any changes that might be occurring on the table while the re-indexing is taking place, etc., so there's less work that needs to be done. If it seems the online form is faster than the offline, then perhaps it's a matter of caching or disk speed or some concurrent workload that is making it seem faster. Here's a few things that might make your timings invalid:

First, is the table whose index is being rebuilt of good size so that the difference isn't just a couple of seconds so that we're really just talking about 'noise' in the timing?

Has SQL Server's cache been cleared so that you're not including disk reads in one case and not including them in another?

Are they both going to the same disk(s), or is one benefiting from faster drives?

Are you sure one isn't benefiting from a data file that's already been grown to a sufficient size while the other had to wait for the files to be automatically grown? Or perhaps it's the log file that had to grow during the slower test but not during the faster one?

Was some other query running during the slow test that wasn't running during the faster one? Or some other process that was running on the same machine so that less memory or CPU was available?

Don

|||

Both were ran on same system utilizing the same drives. The index on each tables takes more than an hour hence we can really see the difference. The difference on one of the table is huge from 14 hours in offline to 5 hours in online.

Is there a possibility that if indexes are not fragmented it will take lesser time. We are just running rebuild index on tables currently there's no logic to eliminate certain indexes with less fragmentation.

The online re-indexing was ran after offline re-indexing does the sequence can make the difference?

Thanks,

Ritesh

|||

I'd bet the offline (first) test had to do a lot more work than the online (second) test. It's likely that you are continually having to auto-grow your datafile or log by a small amount at a time so that in the first test it's continually stopping to grow the file. Then the second test just uses that already-grown file and never has to wait like the first test did. Growing a data or log file can have a significant impact. Try growing the file to an appropriate size before you do either re-index operation and don't rely on auto-grow to size your files correctly.

When comparing operations like this you should start from exactly the same starting position. I'd recommend you restore from a backup before each re-index test .. it's very important to compare apples to apples when trying to analyze something like this.


Don

|||

We tried online re-indexing by restoring the same database and still we got the better results as compared to offline indexing. Timings have almost double, is there anything that data engine does internally so that online re-indexing is not a bottleneck on the application.

Thanks,

Ritesh

|||

It seems that to get to the bottom of this we'd have to know a lot more about the table(s), indexes, fragmentation, initial file sizes, concurrent workload, etc., which unfortunately I would likely not be able to dig into as deeply as might be needed.

Offline should generally be faster .. it has exclusive access to the table and indexes so there's less overhead.

I still think there must be something else that's adding extra work for the offline form, like having to grow data or log files where the online rebuild doesn't have to do this work. Can you confirm that you've increased the datafile and logfile sizes before you start the test so that it doesn't have to wait for autogrow?


Don

Online Re-indexing vs Offline Re-indexing

Hi,

The other day we tried online re-indexing feature of SQL 2005 and it’s performing faster than offline re-indexing. Could you please validate if it’s supposed to do be this way? I always thought offline should be faster than online.

Thanks,

Ritesh

Generally offline should be faster than online. Offline doesn't have to handle any changes that might be occurring on the table while the re-indexing is taking place, etc., so there's less work that needs to be done. If it seems the online form is faster than the offline, then perhaps it's a matter of caching or disk speed or some concurrent workload that is making it seem faster. Here's a few things that might make your timings invalid:

First, is the table whose index is being rebuilt of good size so that the difference isn't just a couple of seconds so that we're really just talking about 'noise' in the timing?

Has SQL Server's cache been cleared so that you're not including disk reads in one case and not including them in another?

Are they both going to the same disk(s), or is one benefiting from faster drives?

Are you sure one isn't benefiting from a data file that's already been grown to a sufficient size while the other had to wait for the files to be automatically grown? Or perhaps it's the log file that had to grow during the slower test but not during the faster one?

Was some other query running during the slow test that wasn't running during the faster one? Or some other process that was running on the same machine so that less memory or CPU was available?

Don

|||

Both were ran on same system utilizing the same drives. The index on each tables takes more than an hour hence we can really see the difference. The difference on one of the table is huge from 14 hours in offline to 5 hours in online.

Is there a possibility that if indexes are not fragmented it will take lesser time. We are just running rebuild index on tables currently there's no logic to eliminate certain indexes with less fragmentation.

The online re-indexing was ran after offline re-indexing does the sequence can make the difference?

Thanks,

Ritesh

|||

I'd bet the offline (first) test had to do a lot more work than the online (second) test. It's likely that you are continually having to auto-grow your datafile or log by a small amount at a time so that in the first test it's continually stopping to grow the file. Then the second test just uses that already-grown file and never has to wait like the first test did. Growing a data or log file can have a significant impact. Try growing the file to an appropriate size before you do either re-index operation and don't rely on auto-grow to size your files correctly.

When comparing operations like this you should start from exactly the same starting position. I'd recommend you restore from a backup before each re-index test .. it's very important to compare apples to apples when trying to analyze something like this.


Don

|||

We tried online re-indexing by restoring the same database and still we got the better results as compared to offline indexing. Timings have almost double, is there anything that data engine does internally so that online re-indexing is not a bottleneck on the application.

Thanks,

Ritesh

|||

It seems that to get to the bottom of this we'd have to know a lot more about the table(s), indexes, fragmentation, initial file sizes, concurrent workload, etc., which unfortunately I would likely not be able to dig into as deeply as might be needed.

Offline should generally be faster .. it has exclusive access to the table and indexes so there's less overhead.

I still think there must be something else that's adding extra work for the offline form, like having to grow data or log files where the online rebuild doesn't have to do this work. Can you confirm that you've increased the datafile and logfile sizes before you start the test so that it doesn't have to wait for autogrow?


Don

Online Reindex Build Perfomance Issues

We are in the process of testing online reindex rebuilds on a 260 Gig
database on a table with 40 gig of data and an index size of 42 gigs.
We are finding that this process is taking up a substantial amount of
resources (processor and Disk IO) so much so that at time even simple
queries are locking. Does any one know of any means to improve the
performance of the reindexing or perhaps lower it priority to reduce it
impact?
Thanks in advance,
-Bob"Bob Sills" <bobsills@.gmail.com> wrote in message
news:1163779525.169860.225690@.b28g2000cwb.googlegroups.com...
> We are in the process of testing online reindex rebuilds on a 260 Gig
> database on a table with 40 gig of data and an index size of 42 gigs.
> We are finding that this process is taking up a substantial amount of
> resources (processor and Disk IO) so much so that at time even simple
> queries are locking. Does any one know of any means to improve the
> performance of the reindexing or perhaps lower it priority to reduce it
> impact?
>
That's a gotcha with online rebuilds. They don't use locks, but they may
run in parallel and chew up a lot of resources. Try setting the MAXDOP in
the ALTER INDEX statement to reserve processors for your other workloads.
David|||David Browne wrote:
> "Bob Sills" <bobsills@.gmail.com> wrote in message
> news:1163779525.169860.225690@.b28g2000cwb.googlegroups.com...
> > We are in the process of testing online reindex rebuilds on a 260 Gig
> > database on a table with 40 gig of data and an index size of 42 gigs.
> > We are finding that this process is taking up a substantial amount of
> > resources (processor and Disk IO) so much so that at time even simple
> > queries are locking. Does any one know of any means to improve the
> > performance of the reindexing or perhaps lower it priority to reduce it
> > impact?
> >
> That's a gotcha with online rebuilds. They don't use locks, but they may
> run in parallel and chew up a lot of resources. Try setting the MAXDOP in
> the ALTER INDEX statement to reserve processors for your other workloads.
>
> David
Thanks! This is helping greatly.
-Bob

Online Reindex Build Perfomance Issues

We are in the process of testing online reindex rebuilds on a 260 Gig
database on a table with 40 gig of data and an index size of 42 gigs.
We are finding that this process is taking up a substantial amount of
resources (processor and Disk IO) so much so that at time even simple
queries are locking. Does any one know of any means to improve the
performance of the reindexing or perhaps lower it priority to reduce it
impact?
Thanks in advance,
-Bob
"Bob Sills" <bobsills@.gmail.com> wrote in message
news:1163779525.169860.225690@.b28g2000cwb.googlegr oups.com...
> We are in the process of testing online reindex rebuilds on a 260 Gig
> database on a table with 40 gig of data and an index size of 42 gigs.
> We are finding that this process is taking up a substantial amount of
> resources (processor and Disk IO) so much so that at time even simple
> queries are locking. Does any one know of any means to improve the
> performance of the reindexing or perhaps lower it priority to reduce it
> impact?
>
That's a gotcha with online rebuilds. They don't use locks, but they may
run in parallel and chew up a lot of resources. Try setting the MAXDOP in
the ALTER INDEX statement to reserve processors for your other workloads.
David
|||David Browne wrote:
> "Bob Sills" <bobsills@.gmail.com> wrote in message
> news:1163779525.169860.225690@.b28g2000cwb.googlegr oups.com...
> That's a gotcha with online rebuilds. They don't use locks, but they may
> run in parallel and chew up a lot of resources. Try setting the MAXDOP in
> the ALTER INDEX statement to reserve processors for your other workloads.
>
> David
Thanks! This is helping greatly.
-Bob

Online Reindex Build Perfomance Issues

We are in the process of testing online reindex rebuilds on a 260 Gig
database on a table with 40 gig of data and an index size of 42 gigs.
We are finding that this process is taking up a substantial amount of
resources (processor and Disk IO) so much so that at time even simple
queries are locking. Does any one know of any means to improve the
performance of the reindexing or perhaps lower it priority to reduce it
impact?
Thanks in advance,
-Bob"Bob Sills" <bobsills@.gmail.com> wrote in message
news:1163779525.169860.225690@.b28g2000cwb.googlegroups.com...
> We are in the process of testing online reindex rebuilds on a 260 Gig
> database on a table with 40 gig of data and an index size of 42 gigs.
> We are finding that this process is taking up a substantial amount of
> resources (processor and Disk IO) so much so that at time even simple
> queries are locking. Does any one know of any means to improve the
> performance of the reindexing or perhaps lower it priority to reduce it
> impact?
>
That's a gotcha with online rebuilds. They don't use locks, but they may
run in parallel and chew up a lot of resources. Try setting the MAXDOP in
the ALTER INDEX statement to reserve processors for your other workloads.
David|||David Browne wrote:
> "Bob Sills" <bobsills@.gmail.com> wrote in message
> news:1163779525.169860.225690@.b28g2000cwb.googlegroups.com...
> That's a gotcha with online rebuilds. They don't use locks, but they may
> run in parallel and chew up a lot of resources. Try setting the MAXDOP in
> the ALTER INDEX statement to reserve processors for your other workloads.
>
> David
Thanks! This is helping greatly.
-Bob

online questionnaire w connection to database

I'm currently developing an online questionnaire system for my
dissertation and I have now come across a few problems. I'm developing
an online approach recommendation system. The basic feature is that a
client will answer a number of questions online and based on the
results an approach will be recommended.

There will be four pages with 5 questions on each site, this will all
be sent to a database and based on this an approach will be generated.

I'm using mysql, php and html w/javascript for developing this but the
problem I have is that I'm not sure how the calculation and
suggestions will be coded. I've though of putting an average result in
to the database and then retrieve a matching' approach based on this
with querying using php.

Any other recommendation is MUCH appreciated.

many many thanks![posted and mailed]

hp (helle_sp@.yahoo.com) writes:
> I'm currently developing an online questionnaire system for my
> dissertation and I have now come across a few problems. I'm developing
> an online approach recommendation system. The basic feature is that a
> client will answer a number of questions online and based on the
> results an approach will be recommended.
> There will be four pages with 5 questions on each site, this will all
> be sent to a database and based on this an approach will be generated.
> I'm using mysql, php and html w/javascript for developing this but the
> problem I have is that I'm not sure how the calculation and
> suggestions will be coded. I've though of putting an average result in
> to the database and then retrieve a ?matching' approach based on this
> with querying using php.
> Any other recommendation is MUCH appreciated.

I'm not sure that I understand that much of what is going on. But
there are some keywords that tells me that all I can do on my part
anyway, is to look for a forum that is better suited for your question.
Really what forum that would be, I don't really know, since I am not
sure what you are asking. But since this is a newsgroup about MS SQL Server,
which you do not appear to be using, I am quite confident that this is
not the right place for you.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi

To add to Erlands reply.

Your solution will depend to a high degree on what the questions are and how
they will be answered. Although it may be produce a formula for the "correct
answer" when the questions are simple multiple choice answers it is unlikely
that you can do this if the answers are verbose.

John

"hp" <helle_sp@.yahoo.com> wrote in message
news:bc89aec7.0502050845.3a389cb9@.posting.google.c om...
> I'm currently developing an online questionnaire system for my
> dissertation and I have now come across a few problems. I'm developing
> an online approach recommendation system. The basic feature is that a
> client will answer a number of questions online and based on the
> results an approach will be recommended.
> There will be four pages with 5 questions on each site, this will all
> be sent to a database and based on this an approach will be generated.
> I'm using mysql, php and html w/javascript for developing this but the
> problem I have is that I'm not sure how the calculation and
> suggestions will be coded. I've though of putting an average result in
> to the database and then retrieve a 'matching' approach based on this
> with querying using php.
> Any other recommendation is MUCH appreciated.
>
> many many thanks!

Online query to my database

Hi. I have a database established by MS SQL, and I want to make online
queries to my database over the net by a GUI developed in Visual Studio .NET.
Could someone explain the procedure I must follow to accomplish such an aim.
I mean that database is in the desktop computer in my house and I want to
make query from my friend's desktop computer which is somewhere else. Hence,
I need something that should be performed over the net.
Thanls in advance
Hi ,
Please go through the following piece of information which will be useful
in your case.
ADO can use any OLE DB provider to establish a connection. The provider is
specified through the Provider property of the Connection object.
Microsoft SQL Server 2000 applications use SQLOLEDB to connect to an
instance of SQL Server, although existing applications can also use MSDASQL
to maintain backward compatibility.
Using the Execute method of the Connection object is one way to execute an
SQL statement against a SQL Server data source.
The Connection object allows you to:
Configure a connection.
Establish and terminate sessions with data sources.
Identify an OLE DB provider.
Execute a query.
Manage transactions on the open connection.
Choose a cursor library available to the data provider.
There are some differences in connection properties between SQLOLEDB and
MSDASQL. For information about connection properties for MSDASQL, see the
MSDN Library at Microsoft Web site.
If you are writing a connection string for use with SQLOLEDB:
Use the Initial Catalog property to specify the database.
Use the Data Source property to specify the server name.
Use the Integrated Security keyword, set to a value of SSPI, to specify
Windows Authentication (recommended),
or
use the User ID and Password connection properties to specify SQL Server
Authentication.
Security Note When possible, use Windows Authentication. If Windows
Authentication is not available, prompt users to enter their credentials at
run time. Avoid storing credentials in a file. If you must persist
credentials, you should encrypt them with the Win32 crypto API. For more
information, see "The Crypto API Function" in the MSDN Library at this
Microsoft Web site.
If you are writing a connection string for use with MSDASQL:
Use the Database keyword or Initial Catalog property to specify the
database.
Use the Server keyword or Data Source property to specify the server name.
Use the Trusted_Connection keyword, set to a value of yes, to specify
Windows Authentication (recommended),
or
Use the UID keyword or User ID property, and the Pwd keyword or Password
property to specify SQL Server Authentication.
Security Note When possible, use Windows Authentication. If Windows
Authentication is not available, prompt users to enter their credentials at
run time. Avoid storing credentials in a file. If you must persist
credentials, you should encrypt them with the Win32 crypto API. For more
information, see "The Crypto API Function" in the MSDN Library at this
Microsoft Web site.
For more information about a complete list of keywords available for use
with a SQLOLEDB connection string, see Connection Object.
Restrictions on Multiple Connections
SQLOLEDB does not allow multiple connections. Unlike MSDASQL, SQLOLEDB does
not attempt to reconnect when the connection is blocked.
Examples
A. Using SQLOLEDB to connect to an instance of SQL Server: setting
individual properties
The following Microsoft Visual Basic code fragments from the ADO
Introductory Visual Basic Sample show how to use SQLOLEDB to connect to an
instance of SQL Server.
' Initialize variables.
Dim cn As New ADODB.Connection
. . .
Dim ServerName As String, DatabaseName As String
' Put text box values into connection variables.
ServerName = txtServerName.Text
DatabaseName = txtDatabaseName.Text
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Set SQLOLEDB connection properties.
cn.Properties("Data Source").Value = ServerName
cn.Properties("Initial Catalog").Value = DatabaseName
' Windows NT authentication.
cn.Properties("Integrated Security").Value = "SSPI"
' Open the database.
cn.Open
B. Using SQLOLEDB to connect to an instance of SQL Server: connection
string method
The following Visual Basic code fragment shows how to use SQLOLEDB to
connect to an instance or SQL Server:
' Initialize variables.
Dim cn As New ADODB.Connection
Dim provStr As String
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Specify connection string on Open method.
ProvStr = "Server=MyServer;Database=northwind;Trusted_Connec tion=yes"
cn.Open provStr
C. Using MSDASQL to connect to an instance of SQL Server
To use MSDASQL to connect to an instance of SQL Server, use the following
types of connections.
The first type of connection is based on the ODBC API SQLConnect function.
This type of connection is useful in situations where you do not want to
code specific information about the data source. This may be the case if
the data source could change or if you do not know its particulars.
In the code fragment shown, the ConnectionTimeout method sets the
connection time-out value to 100 seconds. Next, the data source name, and
authentication type are passed as parameters to the Open method of the
Connection object, using an ODBC data source named MyDataSource that points
to the northwind database on an instance of SQL Server.
Dim cn As New ADODB.Connection
cn.ConnectionTimeout = 100
' DSN connection
' cn.Open "DSN=MyDataSource;Trusted_Connection=yes;"
cn.Close
The second type of connection is based on the ODBC API SQLDriverConnect
function. This type of connection is useful in situations where you want a
driver-specific connection string. To make a connection, use the Open
method of the Connection object and specify the driver, server name,
authentication type, and database. You can also specify any other valid
keywords to include in the connection string. For more information about
the keyword list, see SQLDriverConnect.
Dim cn As New ADODB.Connection
' Connection to SQL Server without using ODBC data source.
cn.Open "Driver={SQL
Server};Server=Server1;Database=northwind;Trusted_ Connection=yes"
cn.Close
Using the Connection Object
In addition to the Command object, an application can use the Connection
object to issue commands, stored procedures, and user-defined functions to
a database as if they were native methods on the Connection object. To
execute a query without using a Command object, an application can pass a
query string to the Execute method of a Connection object.
However, a Command object is required if you want to save and re-execute
the command text, or use query parameters.
To execute a command on the Connection object
Assign a name to the command using the Name property of the Command object.
Set the ActiveConnection property of the Command object to the connection.
Issue a statement where the command name is used as if it were a method on
the Connection object, followed by any parameters.
Create a Recordset object if any rows are returned.
Set the Recordset properties to customize the resulting Recordset.
Using the Connection Object to Execute Commands
This example shows how to use the Execute method of the Connection object
to execute commands.
Dim cn As New ADODB.Connection
. . .
Dim rs As New ADODB.Recordset
cmd1 = txtQuery.Text
Set rs = cn.Execute(cmd1)
After the Connection and Recordset objects are created, the variable cmd1
is assigned the value of a user-supplied query string (txtQuery.Text) from
a Microsoft Visual Basic form. The recordset is assigned the results of a
query, by calling the Execute method of the Connection object, with the
variable cmd1 used as the query string parameter.
Using the Recordset Object
The Recordset object provides methods for manipulating result sets. It
allows you to add, update, delete, and scroll through rows in the recordset.
A Recordset object can be created using the Execute method of the
Connection or Command object.
Each row in a recordset can also be retrieved and updated using the Fields
collection and the Field object. Updates on the Recordset object can be in
an immediate or batch mode. When a Recordset object is created, a cursor is
opened automatically.
The Recordset object allows you to specify the cursor type and location for
fetching the result set. With the CursorType property, you can specify
whether the cursor is read-only, forward-only, static, keyset-driven, or
dynamic. Cursor type determines if a Recordset object can be scrolled or
updated and affects the visibility of changed rows. By default, the cursor
type is read-only and forward-only.
An application can specify the location of the cursor with the
CursorLocation property. This property allows you to specify whether to use
a client or server cursor. The CursorLocation property setting is important
when you use disconnected recordsets.
The first part of the cmdExecute_Click method in the ADO Introductory
Visual Basic Sample shows an example of creating, opening, passing a
command string variable to, and positioning the cursor in a recordset.
Dim cn As New ADODB.Connection
Dim rs As ADODB.Recordset
. . .
cmd1 = txtQuery.Text
Set rs = New ADODB.Recordset
rs.Open cmd1, cn
rs.MoveFirst
. . .
' Code to loop through result set(s)
Thanks and regards,
Girish Sundaram
This posting is provided "AS IS" with no warranties, and confers no rights.
|||thank you for now
I will try
Probably I will turn back to you with some questions
"Girish Sundaram" wrote:

> Hi ,
> Please go through the following piece of information which will be useful
> in your case.
> ADO can use any OLE DB provider to establish a connection. The provider is
> specified through the Provider property of the Connection object.
> Microsoft? SQL Server? 2000 applications use SQLOLEDB to connect to an
> instance of SQL Server, although existing applications can also use MSDASQL
> to maintain backward compatibility.
> Using the Execute method of the Connection object is one way to execute an
> SQL statement against a SQL Server data source.
> The Connection object allows you to:
> Configure a connection.
>
> Establish and terminate sessions with data sources.
>
> Identify an OLE DB provider.
>
> Execute a query.
>
> Manage transactions on the open connection.
>
> Choose a cursor library available to the data provider.
> There are some differences in connection properties between SQLOLEDB and
> MSDASQL. For information about connection properties for MSDASQL, see the
> MSDN Library at Microsoft Web site.
> If you are writing a connection string for use with SQLOLEDB:
> Use the Initial Catalog property to specify the database.
>
> Use the Data Source property to specify the server name.
>
> Use the Integrated Security keyword, set to a value of SSPI, to specify
> Windows Authentication (recommended),
> or
> use the User ID and Password connection properties to specify SQL Server
> Authentication.
>
> Security Note When possible, use Windows Authentication. If Windows
> Authentication is not available, prompt users to enter their credentials at
> run time. Avoid storing credentials in a file. If you must persist
> credentials, you should encrypt them with the Win32? crypto API. For more
> information, see "The Crypto API Function" in the MSDN? Library at this
> Microsoft Web site.
> If you are writing a connection string for use with MSDASQL:
> Use the Database keyword or Initial Catalog property to specify the
> database.
>
> Use the Server keyword or Data Source property to specify the server name.
>
> Use the Trusted_Connection keyword, set to a value of yes, to specify
> Windows Authentication (recommended),
> or
> Use the UID keyword or User ID property, and the Pwd keyword or Password
> property to specify SQL Server Authentication.
>
> Security Note When possible, use Windows Authentication. If Windows
> Authentication is not available, prompt users to enter their credentials at
> run time. Avoid storing credentials in a file. If you must persist
> credentials, you should encrypt them with the Win32 crypto API. For more
> information, see "The Crypto API Function" in the MSDN Library at this
> Microsoft Web site.
> For more information about a complete list of keywords available for use
> with a SQLOLEDB connection string, see Connection Object.
> Restrictions on Multiple Connections
> SQLOLEDB does not allow multiple connections. Unlike MSDASQL, SQLOLEDB does
> not attempt to reconnect when the connection is blocked.
> Examples
> A. Using SQLOLEDB to connect to an instance of SQL Server: setting
> individual properties
> The following Microsoft Visual Basic? code fragments from the ADO
> Introductory Visual Basic Sample show how to use SQLOLEDB to connect to an
> instance of SQL Server.
> ' Initialize variables.
> Dim cn As New ADODB.Connection
> . . .
> Dim ServerName As String, DatabaseName As String
> ' Put text box values into connection variables.
> ServerName = txtServerName.Text
> DatabaseName = txtDatabaseName.Text
> ' Specify the OLE DB provider.
> cn.Provider = "sqloledb"
> ' Set SQLOLEDB connection properties.
> cn.Properties("Data Source").Value = ServerName
> cn.Properties("Initial Catalog").Value = DatabaseName
> ' Windows NT authentication.
> cn.Properties("Integrated Security").Value = "SSPI"
> ' Open the database.
> cn.Open
> B. Using SQLOLEDB to connect to an instance of SQL Server: connection
> string method
> The following Visual Basic code fragment shows how to use SQLOLEDB to
> connect to an instance or SQL Server:
> ' Initialize variables.
> Dim cn As New ADODB.Connection
> Dim provStr As String
> ' Specify the OLE DB provider.
> cn.Provider = "sqloledb"
> ' Specify connection string on Open method.
> ProvStr = "Server=MyServer;Database=northwind;Trusted_Connec tion=yes"
> cn.Open provStr
> C. Using MSDASQL to connect to an instance of SQL Server
> To use MSDASQL to connect to an instance of SQL Server, use the following
> types of connections.
> The first type of connection is based on the ODBC API SQLConnect function.
> This type of connection is useful in situations where you do not want to
> code specific information about the data source. This may be the case if
> the data source could change or if you do not know its particulars.
> In the code fragment shown, the ConnectionTimeout method sets the
> connection time-out value to 100 seconds. Next, the data source name, and
> authentication type are passed as parameters to the Open method of the
> Connection object, using an ODBC data source named MyDataSource that points
> to the northwind database on an instance of SQL Server.
> Dim cn As New ADODB.Connection
> cn.ConnectionTimeout = 100
> ' DSN connection
> ' cn.Open "DSN=MyDataSource;Trusted_Connection=yes;"
> cn.Close
> The second type of connection is based on the ODBC API SQLDriverConnect
> function. This type of connection is useful in situations where you want a
> driver-specific connection string. To make a connection, use the Open
> method of the Connection object and specify the driver, server name,
> authentication type, and database. You can also specify any other valid
> keywords to include in the connection string. For more information about
> the keyword list, see SQLDriverConnect.
> Dim cn As New ADODB.Connection
> ' Connection to SQL Server without using ODBC data source.
> cn.Open "Driver={SQL
> Server};Server=Server1;Database=northwind;Trusted_ Connection=yes"
> cn.Close
> Using the Connection Object
> In addition to the Command object, an application can use the Connection
> object to issue commands, stored procedures, and user-defined functions to
> a database as if they were native methods on the Connection object. To
> execute a query without using a Command object, an application can pass a
> query string to the Execute method of a Connection object.
> However, a Command object is required if you want to save and re-execute
> the command text, or use query parameters.
> To execute a command on the Connection object
> Assign a name to the command using the Name property of the Command object.
>
> Set the ActiveConnection property of the Command object to the connection.
>
> Issue a statement where the command name is used as if it were a method on
> the Connection object, followed by any parameters.
>
> Create a Recordset object if any rows are returned.
>
> Set the Recordset properties to customize the resulting Recordset.
> Using the Connection Object to Execute Commands
> This example shows how to use the Execute method of the Connection object
> to execute commands.
> Dim cn As New ADODB.Connection
> . . .
> Dim rs As New ADODB.Recordset
> cmd1 = txtQuery.Text
> Set rs = cn.Execute(cmd1)
> After the Connection and Recordset objects are created, the variable cmd1
> is assigned the value of a user-supplied query string (txtQuery.Text) from
> a Microsoft Visual Basic? form. The recordset is assigned the results of a
> query, by calling the Execute method of the Connection object, with the
> variable cmd1 used as the query string parameter.
> Using the Recordset Object
> The Recordset object provides methods for manipulating result sets. It
> allows you to add, update, delete, and scroll through rows in the recordset.
> A Recordset object can be created using the Execute method of the
> Connection or Command object.
> Each row in a recordset can also be retrieved and updated using the Fields
> collection and the Field object. Updates on the Recordset object can be in
> an immediate or batch mode. When a Recordset object is created, a cursor is
> opened automatically.
> The Recordset object allows you to specify the cursor type and location for
> fetching the result set. With the CursorType property, you can specify
> whether the cursor is read-only, forward-only, static, keyset-driven, or
> dynamic. Cursor type determines if a Recordset object can be scrolled or
> updated and affects the visibility of changed rows. By default, the cursor
> type is read-only and forward-only.
> An application can specify the location of the cursor with the
> CursorLocation property. This property allows you to specify whether to use
> a client or server cursor. The CursorLocation property setting is important
> when you use disconnected recordsets.
> The first part of the cmdExecute_Click method in the ADO Introductory
> Visual Basic Sample shows an example of creating, opening, passing a
> command string variable to, and positioning the cursor in a recordset.
> Dim cn As New ADODB.Connection
> Dim rs As ADODB.Recordset
> . . .
> cmd1 = txtQuery.Text
> Set rs = New ADODB.Recordset
> rs.Open cmd1, cn
> rs.MoveFirst
> . . .
> ' Code to loop through result set(s)
> Thanks and regards,
> Girish Sundaram
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
|||Ahmet, you could also look at www.asp.net. They have plenty of examples for
you on that site. You should be able to cut, paste, and modify.
"Ahmet Karaca" <AhmetKaraca@.discussions.microsoft.com> wrote in message
news:D99CE06D-E875-4084-919F-333C7840B6DC@.microsoft.com...[vbcol=seagreen]
> thank you for now
> I will try
> Probably I will turn back to you with some questions
> "Girish Sundaram" wrote:
useful[vbcol=seagreen]
is[vbcol=seagreen]
MSDASQL[vbcol=seagreen]
an[vbcol=seagreen]
the[vbcol=seagreen]
at[vbcol=seagreen]
more[vbcol=seagreen]
name.[vbcol=seagreen]
at[vbcol=seagreen]
does[vbcol=seagreen]
an[vbcol=seagreen]
following[vbcol=seagreen]
function.[vbcol=seagreen]
and[vbcol=seagreen]
points[vbcol=seagreen]
a[vbcol=seagreen]
to[vbcol=seagreen]
a[vbcol=seagreen]
object.[vbcol=seagreen]
connection.[vbcol=seagreen]
on[vbcol=seagreen]
object[vbcol=seagreen]
cmd1[vbcol=seagreen]
from[vbcol=seagreen]
a[vbcol=seagreen]
recordset.[vbcol=seagreen]
Fields[vbcol=seagreen]
in[vbcol=seagreen]
is[vbcol=seagreen]
for[vbcol=seagreen]
cursor[vbcol=seagreen]
use[vbcol=seagreen]
important[vbcol=seagreen]
rights.[vbcol=seagreen]

Online query to my database

Hi. I have a database established by MS SQL, and I want to make online
queries to my database over the net by a GUI developed in Visual Studio .NET
.
Could someone explain the procedure I must follow to accomplish such an aim.
I mean that database is in the desktop computer in my house and I want to
make query from my friend's desktop computer which is somewhere else. Hence,
I need something that should be performed over the net.
Thanls in advanceHi ,
Please go through the following piece of information which will be useful
in your case.
ADO can use any OLE DB provider to establish a connection. The provider is
specified through the Provider property of the Connection object.
Microsoft SQL Server 2000 applications use SQLOLEDB to connect to an
instance of SQL Server, although existing applications can also use MSDASQL
to maintain backward compatibility.
Using the Execute method of the Connection object is one way to execute an
SQL statement against a SQL Server data source.
The Connection object allows you to:
Configure a connection.
Establish and terminate sessions with data sources.
Identify an OLE DB provider.
Execute a query.
Manage transactions on the open connection.
Choose a cursor library available to the data provider.
There are some differences in connection properties between SQLOLEDB and
MSDASQL. For information about connection properties for MSDASQL, see the
MSDN Library at Microsoft Web site.
If you are writing a connection string for use with SQLOLEDB:
Use the Initial Catalog property to specify the database.
Use the Data Source property to specify the server name.
Use the Integrated Security keyword, set to a value of SSPI, to specify
Windows Authentication (recommended),
or
use the User ID and Password connection properties to specify SQL Server
Authentication.
Security Note When possible, use Windows Authentication. If Windows
Authentication is not available, prompt users to enter their credentials at
run time. Avoid storing credentials in a file. If you must persist
credentials, you should encrypt them with the Win32 crypto API. For more
information, see "The Crypto API Function" in the MSDN Library at this
Microsoft Web site.
If you are writing a connection string for use with MSDASQL:
Use the Database keyword or Initial Catalog property to specify the
database.
Use the Server keyword or Data Source property to specify the server name.
Use the Trusted_Connection keyword, set to a value of yes, to specify
Windows Authentication (recommended),
or
Use the UID keyword or User ID property, and the Pwd keyword or Password
property to specify SQL Server Authentication.
Security Note When possible, use Windows Authentication. If Windows
Authentication is not available, prompt users to enter their credentials at
run time. Avoid storing credentials in a file. If you must persist
credentials, you should encrypt them with the Win32 crypto API. For more
information, see "The Crypto API Function" in the MSDN Library at this
Microsoft Web site.
For more information about a complete list of keywords available for use
with a SQLOLEDB connection string, see Connection Object.
Restrictions on Multiple Connections
SQLOLEDB does not allow multiple connections. Unlike MSDASQL, SQLOLEDB does
not attempt to reconnect when the connection is blocked.
Examples
A. Using SQLOLEDB to connect to an instance of SQL Server: setting
individual properties
The following Microsoft Visual Basic code fragments from the ADO
Introductory Visual Basic Sample show how to use SQLOLEDB to connect to an
instance of SQL Server.
' Initialize variables.
Dim cn As New ADODB.Connection
. . .
Dim ServerName As String, DatabaseName As String
' Put text box values into connection variables.
ServerName = txtServerName.Text
DatabaseName = txtDatabaseName.Text
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Set SQLOLEDB connection properties.
cn.Properties("Data Source").Value = ServerName
cn.Properties("Initial Catalog").Value = DatabaseName
' Windows NT authentication.
cn.Properties("Integrated Security").Value = "SSPI"
' Open the database.
cn.Open
B. Using SQLOLEDB to connect to an instance of SQL Server: connection
string method
The following Visual Basic code fragment shows how to use SQLOLEDB to
connect to an instance or SQL Server:
' Initialize variables.
Dim cn As New ADODB.Connection
Dim provStr As String
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Specify connection string on Open method.
ProvStr = " Server=MyServer;Database=northwind;Trust
ed_Connection=yes"
cn.Open provStr
C. Using MSDASQL to connect to an instance of SQL Server
To use MSDASQL to connect to an instance of SQL Server, use the following
types of connections.
The first type of connection is based on the ODBC API SQLConnect function.
This type of connection is useful in situations where you do not want to
code specific information about the data source. This may be the case if
the data source could change or if you do not know its particulars.
In the code fragment shown, the ConnectionTimeout method sets the
connection time-out value to 100 seconds. Next, the data source name, and
authentication type are passed as parameters to the Open method of the
Connection object, using an ODBC data source named MyDataSource that points
to the northwind database on an instance of SQL Server.
Dim cn As New ADODB.Connection
cn.ConnectionTimeout = 100
' DSN connection
' cn.Open " DSN=MyDataSource;Trusted_Connection=yes;
"
cn.Close
The second type of connection is based on the ODBC API SQLDriverConnect
function. This type of connection is useful in situations where you want a
driver-specific connection string. To make a connection, use the Open
method of the Connection object and specify the driver, server name,
authentication type, and database. You can also specify any other valid
keywords to include in the connection string. For more information about
the keyword list, see SQLDriverConnect.
Dim cn As New ADODB.Connection
' Connection to SQL Server without using ODBC data source.
cn.Open "Driver={SQL
Server};Server=Server1;Database=northwin
d;Trusted_Connection=yes"
cn.Close
Using the Connection Object
In addition to the Command object, an application can use the Connection
object to issue commands, stored procedures, and user-defined functions to
a database as if they were native methods on the Connection object. To
execute a query without using a Command object, an application can pass a
query string to the Execute method of a Connection object.
However, a Command object is required if you want to save and re-execute
the command text, or use query parameters.
To execute a command on the Connection object
Assign a name to the command using the Name property of the Command object.
Set the ActiveConnection property of the Command object to the connection.
Issue a statement where the command name is used as if it were a method on
the Connection object, followed by any parameters.
Create a Recordset object if any rows are returned.
Set the Recordset properties to customize the resulting Recordset.
Using the Connection Object to Execute Commands
This example shows how to use the Execute method of the Connection object
to execute commands.
Dim cn As New ADODB.Connection
. . .
Dim rs As New ADODB.Recordset
cmd1 = txtQuery.Text
Set rs = cn.Execute(cmd1)
After the Connection and Recordset objects are created, the variable cmd1
is assigned the value of a user-supplied query string (txtQuery.Text) from
a Microsoft Visual Basic form. The recordset is assigned the results of a
query, by calling the Execute method of the Connection object, with the
variable cmd1 used as the query string parameter.
Using the Recordset Object
The Recordset object provides methods for manipulating result sets. It
allows you to add, update, delete, and scroll through rows in the recordset.
A Recordset object can be created using the Execute method of the
Connection or Command object.
Each row in a recordset can also be retrieved and updated using the Fields
collection and the Field object. Updates on the Recordset object can be in
an immediate or batch mode. When a Recordset object is created, a cursor is
opened automatically.
The Recordset object allows you to specify the cursor type and location for
fetching the result set. With the CursorType property, you can specify
whether the cursor is read-only, forward-only, static, keyset-driven, or
dynamic. Cursor type determines if a Recordset object can be scrolled or
updated and affects the visibility of changed rows. By default, the cursor
type is read-only and forward-only.
An application can specify the location of the cursor with the
CursorLocation property. This property allows you to specify whether to use
a client or server cursor. The CursorLocation property setting is important
when you use disconnected recordsets.
The first part of the cmdExecute_Click method in the ADO Introductory
Visual Basic Sample shows an example of creating, opening, passing a
command string variable to, and positioning the cursor in a recordset.
Dim cn As New ADODB.Connection
Dim rs As ADODB.Recordset
. . .
cmd1 = txtQuery.Text
Set rs = New ADODB.Recordset
rs.Open cmd1, cn
rs.MoveFirst
. . .
' Code to loop through result set(s)
Thanks and regards,
Girish Sundaram
This posting is provided "AS IS" with no warranties, and confers no rights.|||thank you for now
I will try
Probably I will turn back to you with some questions
"Girish Sundaram" wrote:

> Hi ,
> Please go through the following piece of information which will be useful
> in your case.
> ADO can use any OLE DB provider to establish a connection. The provider is
> specified through the Provider property of the Connection object.
> Microsoft? SQL Server? 2000 applications use SQLOLEDB to connect to an
> instance of SQL Server, although existing applications can also use MSDASQ
L
> to maintain backward compatibility.
> Using the Execute method of the Connection object is one way to execute an
> SQL statement against a SQL Server data source.
> The Connection object allows you to:
> Configure a connection.
>
> Establish and terminate sessions with data sources.
>
> Identify an OLE DB provider.
>
> Execute a query.
>
> Manage transactions on the open connection.
>
> Choose a cursor library available to the data provider.
> There are some differences in connection properties between SQLOLEDB and
> MSDASQL. For information about connection properties for MSDASQL, see the
> MSDN Library at Microsoft Web site.
> If you are writing a connection string for use with SQLOLEDB:
> Use the Initial Catalog property to specify the database.
>
> Use the Data Source property to specify the server name.
>
> Use the Integrated Security keyword, set to a value of SSPI, to specify
> Windows Authentication (recommended),
> or
> use the User ID and Password connection properties to specify SQL Server
> Authentication.
>
> Security Note When possible, use Windows Authentication. If Windows
> Authentication is not available, prompt users to enter their credentials a
t
> run time. Avoid storing credentials in a file. If you must persist
> credentials, you should encrypt them with the Win32? crypto API. For more
> information, see "The Crypto API Function" in the MSDN? Library at this
> Microsoft Web site.
> If you are writing a connection string for use with MSDASQL:
> Use the Database keyword or Initial Catalog property to specify the
> database.
>
> Use the Server keyword or Data Source property to specify the server name.
>
> Use the Trusted_Connection keyword, set to a value of yes, to specify
> Windows Authentication (recommended),
> or
> Use the UID keyword or User ID property, and the Pwd keyword or Password
> property to specify SQL Server Authentication.
>
> Security Note When possible, use Windows Authentication. If Windows
> Authentication is not available, prompt users to enter their credentials a
t
> run time. Avoid storing credentials in a file. If you must persist
> credentials, you should encrypt them with the Win32 crypto API. For more
> information, see "The Crypto API Function" in the MSDN Library at this
> Microsoft Web site.
> For more information about a complete list of keywords available for use
> with a SQLOLEDB connection string, see Connection Object.
> Restrictions on Multiple Connections
> SQLOLEDB does not allow multiple connections. Unlike MSDASQL, SQLOLEDB doe
s
> not attempt to reconnect when the connection is blocked.
> Examples
> A. Using SQLOLEDB to connect to an instance of SQL Server: setting
> individual properties
> The following Microsoft Visual Basic? code fragments from the ADO
> Introductory Visual Basic Sample show how to use SQLOLEDB to connect to an
> instance of SQL Server.
> ' Initialize variables.
> Dim cn As New ADODB.Connection
> . . .
> Dim ServerName As String, DatabaseName As String
> ' Put text box values into connection variables.
> ServerName = txtServerName.Text
> DatabaseName = txtDatabaseName.Text
> ' Specify the OLE DB provider.
> cn.Provider = "sqloledb"
> ' Set SQLOLEDB connection properties.
> cn.Properties("Data Source").Value = ServerName
> cn.Properties("Initial Catalog").Value = DatabaseName
> ' Windows NT authentication.
> cn.Properties("Integrated Security").Value = "SSPI"
> ' Open the database.
> cn.Open
> B. Using SQLOLEDB to connect to an instance of SQL Server: connection
> string method
> The following Visual Basic code fragment shows how to use SQLOLEDB to
> connect to an instance or SQL Server:
> ' Initialize variables.
> Dim cn As New ADODB.Connection
> Dim provStr As String
> ' Specify the OLE DB provider.
> cn.Provider = "sqloledb"
> ' Specify connection string on Open method.
> ProvStr = " Server=MyServer;Database=northwind;Trust
ed_Connection=yes"
> cn.Open provStr
> C. Using MSDASQL to connect to an instance of SQL Server
> To use MSDASQL to connect to an instance of SQL Server, use the following
> types of connections.
> The first type of connection is based on the ODBC API SQLConnect function.
> This type of connection is useful in situations where you do not want to
> code specific information about the data source. This may be the case if
> the data source could change or if you do not know its particulars.
> In the code fragment shown, the ConnectionTimeout method sets the
> connection time-out value to 100 seconds. Next, the data source name, and
> authentication type are passed as parameters to the Open method of the
> Connection object, using an ODBC data source named MyDataSource that point
s
> to the northwind database on an instance of SQL Server.
> Dim cn As New ADODB.Connection
> cn.ConnectionTimeout = 100
> ' DSN connection
> ' cn.Open " DSN=MyDataSource;Trusted_Connection=yes;
"
> cn.Close
> The second type of connection is based on the ODBC API SQLDriverConnect
> function. This type of connection is useful in situations where you want a
> driver-specific connection string. To make a connection, use the Open
> method of the Connection object and specify the driver, server name,
> authentication type, and database. You can also specify any other valid
> keywords to include in the connection string. For more information about
> the keyword list, see SQLDriverConnect.
> Dim cn As New ADODB.Connection
> ' Connection to SQL Server without using ODBC data source.
> cn.Open "Driver={SQL
> Server};Server=Server1;Database=northwin
d;Trusted_Connection=yes"
> cn.Close
> Using the Connection Object
> In addition to the Command object, an application can use the Connection
> object to issue commands, stored procedures, and user-defined functions to
> a database as if they were native methods on the Connection object. To
> execute a query without using a Command object, an application can pass a
> query string to the Execute method of a Connection object.
> However, a Command object is required if you want to save and re-execute
> the command text, or use query parameters.
> To execute a command on the Connection object
> Assign a name to the command using the Name property of the Command object
.
>
> Set the ActiveConnection property of the Command object to the connection.
>
> Issue a statement where the command name is used as if it were a method on
> the Connection object, followed by any parameters.
>
> Create a Recordset object if any rows are returned.
>
> Set the Recordset properties to customize the resulting Recordset.
> Using the Connection Object to Execute Commands
> This example shows how to use the Execute method of the Connection object
> to execute commands.
> Dim cn As New ADODB.Connection
> . . .
> Dim rs As New ADODB.Recordset
> cmd1 = txtQuery.Text
> Set rs = cn.Execute(cmd1)
> After the Connection and Recordset objects are created, the variable cmd1
> is assigned the value of a user-supplied query string (txtQuery.Text) from
> a Microsoft Visual Basic? form. The recordset is assigned the results of
a
> query, by calling the Execute method of the Connection object, with the
> variable cmd1 used as the query string parameter.
> Using the Recordset Object
> The Recordset object provides methods for manipulating result sets. It
> allows you to add, update, delete, and scroll through rows in the recordse
t.
> A Recordset object can be created using the Execute method of the
> Connection or Command object.
> Each row in a recordset can also be retrieved and updated using the Fields
> collection and the Field object. Updates on the Recordset object can be in
> an immediate or batch mode. When a Recordset object is created, a cursor i
s
> opened automatically.
> The Recordset object allows you to specify the cursor type and location fo
r
> fetching the result set. With the CursorType property, you can specify
> whether the cursor is read-only, forward-only, static, keyset-driven, or
> dynamic. Cursor type determines if a Recordset object can be scrolled or
> updated and affects the visibility of changed rows. By default, the cursor
> type is read-only and forward-only.
> An application can specify the location of the cursor with the
> CursorLocation property. This property allows you to specify whether to us
e
> a client or server cursor. The CursorLocation property setting is importan
t
> when you use disconnected recordsets.
> The first part of the cmdExecute_Click method in the ADO Introductory
> Visual Basic Sample shows an example of creating, opening, passing a
> command string variable to, and positioning the cursor in a recordset.
> Dim cn As New ADODB.Connection
> Dim rs As ADODB.Recordset
> . . .
> cmd1 = txtQuery.Text
> Set rs = New ADODB.Recordset
> rs.Open cmd1, cn
> rs.MoveFirst
> . . .
> ' Code to loop through result set(s)
> Thanks and regards,
> Girish Sundaram
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>|||Ahmet, you could also look at www.asp.net. They have plenty of examples for
you on that site. You should be able to cut, paste, and modify.
"Ahmet Karaca" <AhmetKaraca@.discussions.microsoft.com> wrote in message
news:D99CE06D-E875-4084-919F-333C7840B6DC@.microsoft.com...[vbcol=seagreen]
> thank you for now
> I will try
> Probably I will turn back to you with some questions
> "Girish Sundaram" wrote:
>
useful[vbcol=seagreen]
is[vbcol=seagreen]
MSDASQL[vbcol=seagreen]
an[vbcol=seagreen]
the[vbcol=seagreen]
at[vbcol=seagreen]
more[vbcol=seagreen]
name.[vbcol=seagreen]
at[vbcol=seagreen]
does[vbcol=seagreen]
an[vbcol=seagreen]
following[vbcol=seagreen]
function.[vbcol=seagreen]
and[vbcol=seagreen]
points[vbcol=seagreen]
a[vbcol=seagreen]
to[vbcol=seagreen]
a[vbcol=seagreen]
object.[vbcol=seagreen]
connection.[vbcol=seagreen]
on[vbcol=seagreen]
object[vbcol=seagreen]
cmd1[vbcol=seagreen]
from[vbcol=seagreen]
a[vbcol=seagreen]
recordset.[vbcol=seagreen]
Fields[vbcol=seagreen]
in[vbcol=seagreen]
is[vbcol=seagreen]
for[vbcol=seagreen]
cursor[vbcol=seagreen]
use[vbcol=seagreen]
important[vbcol=seagreen]
rights.[vbcol=seagreen]

'Online Pending' status in cluster

Hello,
I have SQL Server 2k Enterprise Edition, sp3 installed on a cluster.
When SQL Server first installs, everything looks fine in the cluster
administrator. However after about 30 minutes or so the status of
MSSQLServer, SQL Server Agent and SQL Server Full Text services goes
from 'Online' to 'Online Pending'. The service looks to be stopped when
I am in Enterprise Manager but I can still get in and look around the
databases - but only for a short time. After another 30 minutes or so,
the status of the services in the cluster administrator goes from
'Online Pending' to 'Failed' and there's no error messages to give me
any clues. Any help would be wonderful!
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Is there anything in any of the event logs, specifically the application and
the system logs?
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rachael" <rachael_faber@.hotmail.com> wrote in message
news:OZ25H9ZFEHA.3548@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I have SQL Server 2k Enterprise Edition, sp3 installed on a cluster.
> When SQL Server first installs, everything looks fine in the cluster
> administrator. However after about 30 minutes or so the status of
> MSSQLServer, SQL Server Agent and SQL Server Full Text services goes
> from 'Online' to 'Online Pending'. The service looks to be stopped when
> I am in Enterprise Manager but I can still get in and look around the
> databases - but only for a short time. After another 30 minutes or so,
> the status of the services in the cluster administrator goes from
> 'Online Pending' to 'Failed' and there's no error messages to give me
> any clues. Any help would be wonderful!
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!