Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Thursday, March 29, 2012

create and drop table via vb

Hi,
How can i create and drop table in MS SQL Server 2000 via VB6? I think I should use ADOX object, but I don't know exactly how...
The following code uses ADO connection object and returns with runtime error "incorrect syntax near AS":

Dim db as ADODB.Connection
'... open connection to database

Dim strCmd As String

strCmd = "CREATE TABLE tmp_tbl AS SELECT * FROM tbl"

db.Execute strCmd

Thank you in advanceThe code you are using works on an Oracle database. The syntax for SQL Server is "SELECT...INTO...FROM".

SELECT * INTO newTable FROM oldTablesql

Saturday, February 25, 2012

CPU 100%

Hi guys
My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
and it does not drop off.
All the CPU is used by the SQLServer service.
Any ideas?
Thanks
Regards
Jonas
It seem to be our virus protection that triggered the SQLServer service to
use 100%CPU. Once virus protection was disabled CPU usage dropped to normal
level.
Regards
Jonas
"Jonas Larsen" <Jonas.Larsen@.Alcan.com> wrote in message
news:uF71v%238jEHA.704@.TK2MSFTNGP09.phx.gbl...
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>
|||check sysprocesses(nolock) order by cpu where status !='sleeping'
then dbcc inputbuffer(spid) find out what SQL is running.
"Jonas Larsen" wrote:

> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>
|||Could you let me know what virus protection are you using? Also, operating
system and SQLServer details.
I ask because we're looking at installing virus protection and don't want
the same symptoms as you...
Thanks
|||Hi Griff
We use Trend Micro Office Scan. However this is the first time in more than
a year.
Regards
Jonas
"Griff" <Howling@.The.Moon> wrote in message
news:ue$ZfCAkEHA.2696@.TK2MSFTNGP10.phx.gbl...
> Could you let me know what virus protection are you using? Also,
operating
> system and SQLServer details.
> I ask because we're looking at installing virus protection and don't want
> the same symptoms as you...
> Thanks
>

CPU 100%

Hi guys
My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
and it does not drop off.
All the CPU is used by the SQLServer service.
Any ideas?
Thanks
Regards
JonasIt seem to be our virus protection that triggered the SQLServer service to
use 100%CPU. Once virus protection was disabled CPU usage dropped to normal
level.
Regards
Jonas
"Jonas Larsen" <Jonas.Larsen@.Alcan.com> wrote in message
news:uF71v%238jEHA.704@.TK2MSFTNGP09.phx.gbl...
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||check sysprocesses(nolock) order by cpu where status !='sleeping'
then dbcc inputbuffer(spid) find out what SQL is running.
"Jonas Larsen" wrote:

> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||Could you let me know what virus protection are you using? Also, operating
system and SQLServer details.
I ask because we're looking at installing virus protection and don't want
the same symptoms as you...
Thanks|||Hi Griff
We use Trend Micro Office Scan. However this is the first time in more than
a year.
Regards
Jonas
"Griff" <Howling@.The.Moon> wrote in message
news:ue$ZfCAkEHA.2696@.TK2MSFTNGP10.phx.gbl...
> Could you let me know what virus protection are you using? Also,
operating
> system and SQLServer details.
> I ask because we're looking at installing virus protection and don't want
> the same symptoms as you...
> Thanks
>

CPU 100%

Hi guys
My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
and it does not drop off.
All the CPU is used by the SQLServer service.
Any ideas?
Thanks
Regards
JonasIt seem to be our virus protection that triggered the SQLServer service to
use 100%CPU. Once virus protection was disabled CPU usage dropped to normal
level.
Regards
Jonas
"Jonas Larsen" <Jonas.Larsen@.Alcan.com> wrote in message
news:uF71v%238jEHA.704@.TK2MSFTNGP09.phx.gbl...
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||check sysprocesses(nolock) order by cpu where status !='sleeping'
then dbcc inputbuffer(spid) find out what SQL is running.
"Jonas Larsen" wrote:
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||Could you let me know what virus protection are you using? Also, operating
system and SQLServer details.
I ask because we're looking at installing virus protection and don't want
the same symptoms as you...
Thanks|||Hi Griff
We use Trend Micro Office Scan. However this is the first time in more than
a year.
Regards
Jonas
"Griff" <Howling@.The.Moon> wrote in message
news:ue$ZfCAkEHA.2696@.TK2MSFTNGP10.phx.gbl...
> Could you let me know what virus protection are you using? Also,
operating
> system and SQLServer details.
> I ask because we're looking at installing virus protection and don't want
> the same symptoms as you...
> Thanks
>