Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Friday, March 30, 2012

How can i connect a sql server database to visual basic 2005 express

Hi, i am new to sql server and visual basic, i need to connect my sql server database to a new application i've developed in visual basic 2005 express. Can any one tell me the steps to do this. Many Thanks.

Which SQL Server do you have? Is it on the same machine or a different machine?

Heres an MSDN article which uses SQL Server Express edition:http://msdn2.microsoft.com/en-us/library/ms345151.aspx

and heres a whole set of data-access tutorial videos:http://www.asp.net/learn/data-access/

|||

Hi, i am using sql server 2005 management studio. I have the sql server management studio installed in my computer, but i access the database from the server. How can i do the connection from the Visual Basic 2005 Express from my pc?

Thanks.

Monday, March 26, 2012

How can I cancel a backup?

I'm running SBS 2003 Premium. I've got several databases set up to be backed
up nightly, but I have deleted one of them since I set up the backup jobs.
Unfortunately, even though the database is deleted, it still tries to back it
iup each night and I get an error in the "Monitoring and Reporting" page in
Server Management.
I set up the backups through SQL server. I can't seem to find where the
backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
in Enterprise Manager under Maintenance Plans and under Management -> Backup.
The backups were not set with Maintenance Plans, they were set by right
clicking on the individual databases and selecting "Backup Database."
How do I cancel the backup?
Thank you in advance.
Jon
EM, Management, SQL Server Agent, Jobs.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
> I'm running SBS 2003 Premium. I've got several databases set up to be backed
> up nightly, but I have deleted one of them since I set up the backup jobs.
> Unfortunately, even though the database is deleted, it still tries to back it
> iup each night and I get an error in the "Monitoring and Reporting" page in
> Server Management.
> I set up the backups through SQL server. I can't seem to find where the
> backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
> in Enterprise Manager under Maintenance Plans and under Management -> Backup.
> The backups were not set with Maintenance Plans, they were set by right
> clicking on the individual databases and selecting "Backup Database."
> How do I cancel the backup?
> Thank you in advance.
> Jon
>
|||That worked! Thank you very much!
Jon
"Tibor Karaszi" wrote:

> EM, Management, SQL Server Agent, Jobs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
> news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
>
>

Monday, March 19, 2012

How can a spid block himself.

SQL2K sp3.
Ive got some DB blocking going on and a couple of times now I see that a
spid is blocked by himself. How can this happen?
TIA, ChrisR
See if this helps.
The blocked column in the sysprocesses table is populated for latch waits
after you install SQL Server 2000 SP4
http://support.microsoft.com/?id=906344
AMB
"ChrisR" wrote:

> SQL2K sp3.
> Ive got some DB blocking going on and a couple of times now I see that a
> spid is blocked by himself. How can this happen?
> TIA, ChrisR
|||Thanks, but as indicated, I have sp3.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> See if this helps.
> The blocked column in the sysprocesses table is populated for latch waits
> after you install SQL Server 2000 SP4
> http://support.microsoft.com/?id=906344
>
> AMB
> "ChrisR" wrote:

How can a spid block himself.

SQL2K sp3.
Ive got some DB blocking going on and a couple of times now I see that a
spid is blocked by himself. How can this happen?
TIA, ChrisRSee if this helps.
The blocked column in the sysprocesses table is populated for latch waits
after you install SQL Server 2000 SP4
http://support.microsoft.com/?id=906344
AMB
"ChrisR" wrote:

> SQL2K sp3.
> Ive got some DB blocking going on and a couple of times now I see that a
> spid is blocked by himself. How can this happen?
> TIA, ChrisR|||Thanks, but as indicated, I have sp3.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> See if this helps.
> The blocked column in the sysprocesses table is populated for latch waits
> after you install SQL Server 2000 SP4
> http://support.microsoft.com/?id=906344
>
> AMB
> "ChrisR" wrote:
>

How can a spid block himself.

SQL2K sp3.
Ive got some DB blocking going on and a couple of times now I see that a
spid is blocked by himself. How can this happen?
TIA, ChrisRSee if this helps.
The blocked column in the sysprocesses table is populated for latch waits
after you install SQL Server 2000 SP4
http://support.microsoft.com/?id=906344
AMB
"ChrisR" wrote:
> SQL2K sp3.
> Ive got some DB blocking going on and a couple of times now I see that a
> spid is blocked by himself. How can this happen?
> TIA, ChrisR|||Thanks, but as indicated, I have sp3.
"Alejandro Mesa" wrote:
> See if this helps.
> The blocked column in the sysprocesses table is populated for latch waits
> after you install SQL Server 2000 SP4
> http://support.microsoft.com/?id=906344
>
> AMB
> "ChrisR" wrote:
> > SQL2K sp3.
> >
> > Ive got some DB blocking going on and a couple of times now I see that a
> > spid is blocked by himself. How can this happen?
> >
> > TIA, ChrisR

Friday, March 9, 2012

How are you documenting your ETL processes

I'm currently using SSIS on a fairly large project. I wanted to know how
other developers are documenting their ETL processes. I've started using
Visio for flow charting some of my ETL processes. But I am finding it
difficult to use.
So, What tools/products are you using and are they working for you.
Thanks,
GHC.
(Feel free to post samples!)
Get Bi Documenter
http://www.bidocumenter.com/Public/Download.aspx

How Alter text column length?

How can I change the length of a Data Type text column? All I've found in BOL
is that you can't do it!
Thanks -
Can you be more specific? Text can hold up to 2GB data, and you do not specify that length, as you
do with varchar.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Bil Click" <BilClick@.discussions.microsoft.com> wrote in message
news:691FEB50-310C-4DB5-91B2-D28822BA252B@.microsoft.com...
> How can I change the length of a Data Type text column? All I've found in BOL
> is that you can't do it!
> Thanks -
|||Tibor, Looks like Bil needs to see the entire contents of text column while
querying (SELECT).
Bil,
See the command SET TEXTSIZE in books online.
Thanks
Hari
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Oq2JDiSmFHA.2860@.TK2MSFTNGP15.phx.gbl...
> Can you be more specific? Text can hold up to 2GB data, and you do not
> specify that length, as you do with varchar.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bil Click" <BilClick@.discussions.microsoft.com> wrote in message
> news:691FEB50-310C-4DB5-91B2-D28822BA252B@.microsoft.com...
>
|||The column was created with Length = 16. I am trying to store a text stream
which is being truncated at aprox 88 characters. Sample:
<BR>*** TOP OF REPORT ***<BR> NORTH CAROLINA DIVISION OF MOTOR VEHICLES<BR>  
I don't get the correlation between 16 and 88, if I am counting those chars
correctly.
OBJECTPROPERTY TableTextInRowLimit = 0 indicates text in row option is not
set.
- Bil Click
"Tibor Karaszi" wrote:

> Can you be more specific? Text can hold up to 2GB data, and you do not specify that length, as you
> do with varchar.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bil Click" <BilClick@.discussions.microsoft.com> wrote in message
> news:691FEB50-310C-4DB5-91B2-D28822BA252B@.microsoft.com...
>
|||The length16 is just Enterprise Manager's rather stupid way to tell you that the pointer used in the
internal handling of the text datatype is 16 bytes. It has nothing to do with what you can actually
store (which is 2GB, nothing that you configure in any way). The truncation either happens at input
or output of the data. Try checking the length using the DATALENGTH function.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Bil Click" <BilClick@.discussions.microsoft.com> wrote in message
news:57F1B4D3-9B8B-43F4-BDB9-F5D2057AEFD2@.microsoft.com...[vbcol=seagreen]
> The column was created with Length = 16. I am trying to store a text stream
> which is being truncated at aprox 88 characters. Sample:
> <BR>*** TOP OF REPORT ***<BR> NORTH CAROLINA DIVISION OF MOTOR VEHICLES<BR>
>  
> I don't get the correlation between 16 and 88, if I am counting those chars
> correctly.
> OBJECTPROPERTY TableTextInRowLimit = 0 indicates text in row option is not
> set.
> - Bil Click
>
> "Tibor Karaszi" wrote:
|||Turns out to be a Query Analyzer "gotcha", truncated the displayed field.
When I used the Datalength function I could see there really was more data
than being displayed in QA. EM only says <Long Text>. I finally opeded up
osql and see that the full text is being stored.
Thanks for the tips! Cheers!
- Bil
"Tibor Karaszi" wrote:

> The length16 is just Enterprise Manager's rather stupid way to tell you that the pointer used in the
> internal handling of the text datatype is 16 bytes. It has nothing to do with what you can actually
> store (which is 2GB, nothing that you configure in any way). The truncation either happens at input
> or output of the data. Try checking the length using the DATALENGTH function.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bil Click" <BilClick@.discussions.microsoft.com> wrote in message
> news:57F1B4D3-9B8B-43F4-BDB9-F5D2057AEFD2@.microsoft.com...
>

Monday, February 27, 2012

hotfixes, mssqlsystemresource.ldf

I've just discovered that applying a hotfix to SQL2005 can fail if you
have moved the 'mssqlsystemresource.ldf' logfile to a different
subirectory from the MDF.
It is well documented that the mssqlsystemresource.mdf must be in the
same location as master.mdf, but I haven't seen anything about keeping
the ldf with the mdf (our practice is to run with LDF files on a
different set of spindles from the MDF files).
If you have this setup and haven't done a service pack, you can readily
fix it by moving the LDF from the MDF folder and putting it where it
'belongs' according to the master catalog.
However, you're better off leaving both the LDF and MDF together with
master.mdf.
> However, you're better off leaving both the LDF and MDF together with
> master.mdf.
Yes, this is the Best Practice. Unfortunately, it's easy to forget about
those mssqlsystemresource files.
Hope this helps.
Dan Guzman
SQL Server MVP
"horseradish" <millardjk@.gmail.com> wrote in message
news:OWUWEgDuHHA.4412@.TK2MSFTNGP02.phx.gbl...
> I've just discovered that applying a hotfix to SQL2005 can fail if you
> have moved the 'mssqlsystemresource.ldf' logfile to a different
> subirectory from the MDF.
> It is well documented that the mssqlsystemresource.mdf must be in the same
> location as master.mdf, but I haven't seen anything about keeping the ldf
> with the mdf (our practice is to run with LDF files on a different set of
> spindles from the MDF files).
> If you have this setup and haven't done a service pack, you can readily
> fix it by moving the LDF from the MDF folder and putting it where it
> 'belongs' according to the master catalog.
> However, you're better off leaving both the LDF and MDF together with
> master.mdf.

Friday, February 24, 2012

Hotfix fixed my SQL Server

I've applied "Hotfix 8.00.0859", which I downloaded from the Microsoft site,
and now I get the "Invalid cursor state" error described here
http://support.microsoft.com/?kbid=831997
The article says there is another hotfix that fixes what the previous hotfix
screwed up, and one should contact "Microsoft Product Support Services" to
get the new hotfix, and give a hyperlink to support where you can pay to
call MS, etc, which I don't really intend to do.
Anyone knows of a better way to get this new hotfix, have a link to it
maybe? I've downloaded the previous one, don't understand why this one is so
special.
Thanks.
> give a hyperlink to support where you can pay to
> call MS, etc, which I don't really intend to do.
I suppose you've never done this before. If it's a bug in the product, and
they provide you with a fix, you are not charged for the call. In any
case...

> maybe? I've downloaded the previous one, don't understand why this one is
> so special.
Most hotfixes are not freely available because, as the article always
states, it is only intended to fix the specific problem for those sites that
are having the problem (e.g., not everyone and their brother). The reason
the hotfixes aren't handed out to everyone is because they are not fully
regression tested, and could possibly introduce other problems (e.g.
"Invalid Cursor State").
In your case, there is a newer hotfix that is publicly available. See the
end of http://www.aspfaq.com/2515
I would *STRONGLY* recommend, in the future, that you do not apply hotfixes
just because they are available to download from the Microsoft web site.
http://www.aspfaq.com/
(Reverse address to reply.)
|||Aaron, thanks for the link, I am going to give the hotfix a shot.
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
Actually I've been programming with SQL Server for 10 years now and this was
my first hotfix ever, applied last Sunday after fighting a Report Server
install for about six hours, and someone that had the problem gave the
advice. In the end it was something else, but after six hours you don't ask
questions any more, I was ready for a total SQL Server re-install.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and[vbcol=seagreen]
> they provide you with a fix, you are not charged for the call. In any
> case...
is
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
|||Hi Aaron,
The link you gave me to the hotfix fixed the problem, thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and[vbcol=seagreen]
> they provide you with a fix, you are not charged for the call. In any
> case...
is
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>

hot spots

I've read a little about drives having "hot spots" as a performance issue.
Hot would one go about detecting this? I can't think of a direct way to
monitor accesses to a certain physical area of the disk, are there
performance counters from which this condition might logically be inferred?
tia,
Mark McGinty
Hi,
See the performance monitor counters
http://www.sql-server-performance.co...ounters_io.asp
Thanks
Hari
SQL Server MVP
"Mark J. McGinty" <mmcginty@.spamfromyou.com> wrote in message
news:O73iDtxWFHA.1384@.TK2MSFTNGP09.phx.gbl...
> I've read a little about drives having "hot spots" as a performance issue.
> Hot would one go about detecting this? I can't think of a direct way to
> monitor accesses to a certain physical area of the disk, are there
> performance counters from which this condition might logically be
> inferred?
> tia,
> Mark McGinty
>
|||Not sure if this will help but take a look at this:
http://www.passmark.com/products/diskcheckup.htm
Message posted via http://www.droptable.com
|||"Sameer Premji via droptable.com" <forum@.droptable.com> wrote in message
news:8dcfe4c84c2a420c92d85c5923b07a61@.droptable.co m...
> Not sure if this will help but take a look at this:
> http://www.passmark.com/products/diskcheckup.htm
> --
> Message posted via http://www.droptable.com
Interesting tool, thanks! Sadly, its lack of ability to query drives
connected via SCSI or RAID cuts it's usefulness to the bone, as nearly all
of the storage on production machines I see uses either or both of those
interface technologies.
-Mark
|||"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:eLX3TvxWFHA.616@.TK2MSFTNGP12.phx.gbl...
> Hi,
> See the performance monitor counters
> http://www.sql-server-performance.co...ounters_io.asp
Wow that was fast! :-) Very interesting article, thanks!
-Mark

> Thanks
> Hari
> SQL Server MVP
> "Mark J. McGinty" <mmcginty@.spamfromyou.com> wrote in message
> news:O73iDtxWFHA.1384@.TK2MSFTNGP09.phx.gbl...
>

Sunday, February 19, 2012

hosted sql 2005 databases

We are hosting multiple sql server 2005 databases on a windows 2003 server.
I've setup restricted growth on the databases to 50 mb. What would be a good
setting for the log files? I have all of the databases setup in Simple
recovery mode. Is Auto Shrink = True a good idea?
Please advise.
Thanks!
Hi
The best way to get these values is to monitor it during you normal working
period (e.g. a week and take the values from that). If the files are often
growing then you may want to increase the size they grow by, or put in a
system when the files are increased at a time when it will not impact users.
For log file sizes hopefully you can set a maximum ceiling that will rarely
be expanded.
Growing the files frequently may lead to disc fragmentation and decreases in
performance, therefore auto shrink is not a good idea.
You should monitor the space available on your disc so that you can prevent
the sort of situation where there is not enough room to expand the database.
MOM is a very useful to monitor your SQL Server in this respect.
John
"mp3nomad" wrote:

> We are hosting multiple sql server 2005 databases on a windows 2003 server.
> I've setup restricted growth on the databases to 50 mb. What would be a good
> setting for the log files? I have all of the databases setup in Simple
> recovery mode. Is Auto Shrink = True a good idea?
> Please advise.
> Thanks!