Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Tuesday, March 27, 2012

count occurrence of character in a field using SQL

Is there a function that will enable me to count the number of instances a
particular character is in a feild? For instance...if I have a field named
number with a record with characters such as 00000111100000 and I what to do
a function that tells me the number of times the number 1 shows up in the
number field of that record. The result would be 4. Is this possible?SELECT LEN(column) - LEN(REPLACE(column, '1', '')) FROM table;
"Scott" <Scott@.discussions.microsoft.com> wrote in message
news:819C28E2-76E5-4392-BA01-A7BDDF2BA57A@.microsoft.com...
> Is there a function that will enable me to count the number of instances a
> particular character is in a feild? For instance...if I have a field
> named
> number with a record with characters such as 00000111100000 and I what to
> do
> a function that tells me the number of times the number 1 shows up in the
> number field of that record. The result would be 4. Is this possible?|||Perfect! Thank you!
"Aaron Bertrand [SQL Server MVP]" wrote:

> SELECT LEN(column) - LEN(REPLACE(column, '1', '')) FROM table;
>
>
> "Scott" <Scott@.discussions.microsoft.com> wrote in message
> news:819C28E2-76E5-4392-BA01-A7BDDF2BA57A@.microsoft.com...
>
>

Sunday, March 25, 2012

Count by matching first two letters

Say I have a table of names
How\Can I provide a count for names that have matching first two letters
For instance if my table was this
Name
DA234
DA333
ebEEE
EBddd
EEddd
I would want my output to be
DA 2
EB 2
EE 1
I hope I am communicating my question correctly and thanks for your
consideration.
ScottTry:
select
LEFT (MyCol, 2)
, count (*)
from
MyTable
group by
LEFT (MyCol, 2)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"scott" <scott@.discussions.microsoft.com> wrote in message
news:3ED42509-B63D-4376-8C81-981ED42C9D2D@.microsoft.com...
Say I have a table of names
How\Can I provide a count for names that have matching first two letters
For instance if my table was this
Name
DA234
DA333
ebEEE
EBddd
EEddd
I would want my output to be
DA 2
EB 2
EE 1
I hope I am communicating my question correctly and thanks for your
consideration.
Scott|||Try,
select left(name, 2) as l2_name, count(*) as cnt
from t1
group by left(name, 2)
AMB
"scott" wrote:

> Say I have a table of names
> How\Can I provide a count for names that have matching first two letters
> For instance if my table was this
> Name
> DA234
> DA333
> ebEEE
> EBddd
> EEddd
> I would want my output to be
> DA 2
> EB 2
> EE 1
> I hope I am communicating my question correctly and thanks for your
> consideration.
> Scott|||scott wrote:
> Say I have a table of names
> How\Can I provide a count for names that have matching first two
> letters
> For instance if my table was this
> Name
> DA234
> DA333
> ebEEE
> EBddd
> EEddd
> I would want my output to be
> DA 2
> EB 2
> EE 1
> I hope I am communicating my question correctly and thanks for your
> consideration.
> Scott
SELECT UPPER(LEFT(COL_NAME, 2)), COUNT(*)
FROM TABLE_NAME
GROUP BY UPPER(LEFT(COL_NAME, 2))
David Gugick
Imceda Software
www.imceda.com

Tuesday, March 20, 2012

Could Stored Procedure or Trigger choose another database on difference engine?

Could Stored Procedure or Trigger
choose another database that is on difference engine? For example, I
have database A on engine or instance name Server1 that has a stored
procedure Stored_Proc_1 and in this stored procedure I want to access
some table on database B on engine Server2. I have username and
password on Server2.
I know that we can access different database on the same engine or
instance name, using to methods:
1. Using 3-part names ex: on the sp we say Select * from
myDb.dbo.myTable
2. Creating a string variable and build up the syntax that needed, ex:
Declare @.myQuery nvarchar(2000)
set @.myQuery = ' USE ' + @.dbname + CHAR(13) + 'SELECT * from
myTable'
Exec sp_executesql @.myQueryHi Lemune,
You can configure a linked server and then use 4 part name to access objects
on a different server.
Server_Name.DB_Name.Schema.Object
Note that there is a lot more overhead involved in this type of query
(distributed query) than accessing objects in DBs on the same server
instance.
Look in Books On Line for "Configuring linked servers"
HTH
Ami
"Lemune" <alfredosilitonga@.gmail.com> wrote in message
news:1148281973.632093.46050@.i39g2000cwa.googlegroups.com...
> Could Stored Procedure or Trigger
> choose another database that is on difference engine? For example, I
> have database A on engine or instance name Server1 that has a stored
> procedure Stored_Proc_1 and in this stored procedure I want to access
> some table on database B on engine Server2. I have username and
> password on Server2.
> I know that we can access different database on the same engine or
> instance name, using to methods:
> 1. Using 3-part names ex: on the sp we say Select * from
> myDb.dbo.myTable
> 2. Creating a string variable and build up the syntax that needed, ex:
> Declare @.myQuery nvarchar(2000)
> set @.myQuery = ' USE ' + @.dbname + CHAR(13) + 'SELECT * from
> myTable'
> Exec sp_executesql @.myQuery
>|||This problem occur because I develop a program for sms services. My
program use database to store incoming massage and out massage, If the
massage is having the right keyword it will do some task. And the task
is involved with another database. If according to myself I would
rather make my database on my client database (just adding my table to
my client database) or maybe adding my database to my client database
engine. But for some reason, my client refuses that method. So, I have
so make stored procedure on my program database engine that will
connect to my client database. I use this method so that I don't have
to change my program code each time my client use that rule :-).

Could replication be the answer?

We have a US online business that is growing
internationally. We have a data model that allows us
to easily split countries to their own instance or own
physical server. A high volume of reads are expected
from our web servers so we feel that by spliting reads
and writes to separate servers, we could ease the
pressure on one server (i.e. have 1 SQL write server
where everything is written to; 1 or more SQL read
servers with a denormalized copy of the SQL write
data, populated via transactional replication). Our
database is quite large and could not afford the time
it takes to re-initialize the subscriber. Is there a
way to just replay specific transactions to the read
server? Also, we are thinking of maintaining a global
copy of the data (write data from all countries SQL
write servers). These servers would use
bi-directional queued updating transactional
replication. Not all data (vertically filtered) from
the individual country write servers will be
replicated to the global copy. If the copies get out
of sync, what is the best way to re-sync them? Again,
our databases are large enough that it would take
hours to reinitialize the data. Is there anyway to
just replay specific transactions to the subscribers?
Also, do you have any figures on the speed of
transactional replication in a high volume
environment, i.e. millions of transactions a day?
Is there a way to just replay specific transactions to the read server?
Once the publication has been created and subscribed to there's no official
way to filter them retrospectively. An unofficial way I have used is if I
already have a filter. The filter is implemented as a stored procedure and I
have edited the text of the stored procedure. This is not ideal as it isn't
reflected in the publication details, but as a temp fix it works ok.
If the copies get out of sync, what is the best way to re-sync them?
Firstly, I'm not sure I'd use bidirectional queued transactional
replication - I'd prefer to use merge in this situation. If there is
non-convergence the standard method is to reinitialize. Sometimes you can
manually converge the data then do a noinit initialization.
As for high-volume data, I can vouch for the use of TR to maintain a standby
server when there was 1000 transactions/minute (>1million per day) - we had
the latency down to 6 seconds. The only data I've seen on this is
http://www.microsoft.com/technet/pro.../tranrepl.mspx
HTH,
Paul Ibison
|||Define replay specific transactions to the read server.
There is a way to do this, but it depends on what you are trying to do. A
media company contacted me about something like this. Basically by adjusting
the a value in one of the replication metadata tabels using pure
transactional replication you can get all the transactions stored in the
distributor replays.
You can use sp_browsereplcmds to display a range or a transaction ID and
then replay this proc displayed by this commands on the subscriber.
When your data gets out of sync, you can run a validation to determine
exactly which tables are out of sync, and then decide whether to bcp/dts the
tables from the publisher to the subcriber to sync them up.
Or if your tables are too large you can do some comparison using a checksum
to determine exactly which rows are not in sync and then make a decision on
how to proceed.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Ozzie" <Ozzie@.discussions.microsoft.com> wrote in message
news:BDC6BBB1-74DD-4010-9F25-F36C612C343A@.microsoft.com...
> We have a US online business that is growing
> internationally. We have a data model that allows us
> to easily split countries to their own instance or own
> physical server. A high volume of reads are expected
> from our web servers so we feel that by spliting reads
> and writes to separate servers, we could ease the
> pressure on one server (i.e. have 1 SQL write server
> where everything is written to; 1 or more SQL read
> servers with a denormalized copy of the SQL write
> data, populated via transactional replication). Our
> database is quite large and could not afford the time
> it takes to re-initialize the subscriber. Is there a
> way to just replay specific transactions to the read
> server? Also, we are thinking of maintaining a global
> copy of the data (write data from all countries SQL
> write servers). These servers would use
> bi-directional queued updating transactional
> replication. Not all data (vertically filtered) from
> the individual country write servers will be
> replicated to the global copy. If the copies get out
> of sync, what is the best way to re-sync them? Again,
> our databases are large enough that it would take
> hours to reinitialize the data. Is there anyway to
> just replay specific transactions to the subscribers?
> Also, do you have any figures on the speed of
> transactional replication in a high volume
> environment, i.e. millions of transactions a day?

Sunday, March 11, 2012

Could not get into server instance

Hi,
I ran Enterprise manager, but I could not get into my
server. It said that it was not running or to check '
the config, which is fine and is Windows Only Authentication.
Here is the weird and scary part. ZoneAlarm had an alert
at the same time. The alert was asking for Management Console
to use USERINIT.EXE to access 192.5.6.30DNS.
This resolves to a.gtld-servers.net which is part of Verisign.
I refused this outbound access and kept retrying to get into
my server in Enterprise. No luck. I then decided to go ahead
and give outbound access. Next time I tried to get into
my server I was able to.
Does anyone know what's up?
I figured that maybe I should change all my logins?
But, does this show that there is a breach of my system?
There has been another odd thing where WSCRIPT.EXE has
been asking for access to DNS servers. That I keep blocked.
I am pretty sure that is a trojan, but do you think this is this related ?
Thanks for any advice.
FoxAs a very first step -- scan your computer for virus or Trojans, I think you
may have a serious exploit on your hands.
Steve
"Fox" <fox @. connexions .net> wrote in message
news:e9HspB2wDHA.2408@.tk2msftngp13.phx.gbl...
quote:

> Hi,
> I ran Enterprise manager, but I could not get into my
> server. It said that it was not running or to check '
> the config, which is fine and is Windows Only Authentication.
> Here is the weird and scary part. ZoneAlarm had an alert
> at the same time. The alert was asking for Management Console
> to use USERINIT.EXE to access 192.5.6.30DNS.
> This resolves to a.gtld-servers.net which is part of Verisign.
> I refused this outbound access and kept retrying to get into
> my server in Enterprise. No luck. I then decided to go ahead
> and give outbound access. Next time I tried to get into
> my server I was able to.
> Does anyone know what's up?
> I figured that maybe I should change all my logins?
> But, does this show that there is a breach of my system?
> There has been another odd thing where WSCRIPT.EXE has
> been asking for access to DNS servers. That I keep blocked.
> I am pretty sure that is a trojan, but do you think this is this related ?
> Thanks for any advice.
> Fox
>
|||I have already scanned several times and have come up with nothing.
I changed all logins related to admin.
A few weeks ago I found entries in my firewall to allow 3 IPs
access. I saw them in there once before and deleted them.
This time I block them entirely from access. It seems I've been
playing a cat and mouse game for a while. But I cannot find
the source and a re-install is out of the question. There were
a few other things that happend earlier this year. I don't
know what to do next to try to find the source of this.
Regards,
Fox
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:eZcXtC$wDHA.3116@.TK2MSFTNGP11.phx.gbl...
quote:

> As a very first step -- scan your computer for virus or Trojans, I think

you
quote:

> may have a serious exploit on your hands.
> Steve
>
> "Fox" <fox @. connexions .net> wrote in message
> news:e9HspB2wDHA.2408@.tk2msftngp13.phx.gbl...
?[QUOTE]
>
|||What are you using as a firewall?
Is this a "live" SQL Server on the internet?
What type of applications are connecting to this Server?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Saturday, February 25, 2012

Could not create an instance of OLE DB provider 'MSDASQL'

When trying to run an application we use called Taxware
I get the following error:
[Microsoft][ODBC SQL Server Driver]Could not create an
instance of DB provider 'MSDASQL'.
Taxware uses the free Microsoft SQL server 7. If I
uninstall the application MSSQL7 stays on the computer
(it's still running in the system tray) The error occurs
whrn I tell Taxware where our timesheet file is (generated
by casware time and shared by both applications)
Could anybody help?
You might want to contact the vendor of the application to find out what is
going on at this point in the application. He might be able to give you
better inforamtion about what is happening.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Could not create an instance of OLE DB provider 'MSDASQL'

When trying to run an application we use called Taxware
I get the following error:
[Microsoft][ODBC SQL Server Driver]Could not create an
instance of DB provider 'MSDASQL'.
Taxware uses the free Microsoft SQL server 7. If I
uninstall the application MSSQL7 stays on the computer
(it's still running in the system tray) The error occurs
whrn I tell Taxware where our timesheet file is (generated
by casware time and shared by both applications)
Could anybody help?You might want to contact the vendor of the application to find out what is
going on at this point in the application. He might be able to give you
better inforamtion about what is happening.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Could not create an instance of OLE DB provider 'MSDASQL'

When trying to run an application we use called Taxware
I get the following error:
[Microsoft][ODBC SQL Server Driver]Could not create an
instance of DB provider 'MSDASQL'.
Taxware uses the free Microsoft SQL server 7. If I
uninstall the application MSSQL7 stays on the computer
(it's still running in the system tray) The error occurs
whrn I tell Taxware where our timesheet file is (generated
by casware time and shared by both applications)
Could anybody help?You might want to contact the vendor of the application to find out what is
going on at this point in the application. He might be able to give you
better inforamtion about what is happening.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Could not create an instance of OLE DB provider 'Microsoft.Jet.OLE

hi,
I am running the following query and getting this error.
Could not create an instance of OLE DB provider 'Microsoft.Jet.OLEDB.4.0'.
OLE DB error trace [Non-interface error: CoCreate of DSO for
Microsoft.Jet.OLEDB.4.0 returned 0x80040e73].
I am using Windows XP SP2 and Access 2003 and running this query on a SQL
server 200 which is on a network.
SELECT *
FROM OPENdatasource(
'Microsoft.Jet.OLEDB.4.0',
'Data Source="\\machineNameOnNetwork\c:\Test.mdb;"
User ID=admin;Password=somePassword;"'
).Test.dbo.Employees
Thanks
Regards,
tech@.77A shot in the dark: the UNC path you're specifying doesn't look quite normal
.
Did you mean
\\machineNameOnNetwork\c$\Test.mdb
?
"tech77" wrote:

> hi,
> I am running the following query and getting this error.
> Could not create an instance of OLE DB provider 'Microsoft.Jet.OLEDB.4.0'.
> OLE DB error trace [Non-interface error: CoCreate of DSO for
> Microsoft.Jet.OLEDB.4.0 returned 0x80040e73].
> I am using Windows XP SP2 and Access 2003 and running this query on a SQL
> server 200 which is on a network.
> SELECT *
> FROM OPENdatasource(
> 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source="\\machineNameOnNetwork\c:\Test.mdb;"
> User ID=admin;Password=somePassword;"'
> ).Test.dbo.Employees
> Thanks
> Regards,
> tech@.77|||A few pointers. Don't know whcih one is applicable for you though
1. If you are accessing a network share ,then the account in which SQL
Server is running should have access to that share.
2. Do not use C:, use C$ like this..
\\machineNameOnNetwork\c$\Test.mdb;"
Hope this helps.

Friday, February 24, 2012

Could not create an instance of OLE DB provider 'Microsoft.Jet

Thanks for the replies.I changed C: to C$ but I still get the same error.
The machineNameOnNetwork is my local computer name which is on the corporate
network.Where am i going wrong?
Thanks for your help.
"Omnibuzz" wrote:

> A few pointers. Don't know whcih one is applicable for you though
> 1. If you are accessing a network share ,then the account in which SQL
> Server is running should have access to that share.
> 2. Do not use C:, use C$ like this..
> \\machineNameOnNetwork\c$\Test.mdb;"
> Hope this helps.Is your machine shared on the network?
i.e.
Can you access c:\test.mdb from another PC?
Is the database also running on your PC?
"tech77" <tech77@.discussions.microsoft.com> wrote in message
news:993B9891-0894-4046-AB32-A098D36C0FAD@.microsoft.com...
> Thanks for the replies.I changed C: to C$ but I still get the same error.
> The machineNameOnNetwork is my local computer name which is on the
corporate
> network.Where am i going wrong?
> Thanks for your help.
>
> "Omnibuzz" wrote:
>|||Not the account in which you have connected to SQL Server.
The account in which the SQL Server Service is running should have access to
your machine and your folder.
Or the best way is to copy this file to a folder in your SQL Server and use
that path in the ODS.|||thanks Omnibuzz,Jim and Mark for your responses.
.The machine on which SQL Server is running might not have access to my
machine and my folder.Its on a remote server.
And I cannot configure that machine so it has access to my machine.
So I have to install SQL Server locally else I cant accomplish what I am
trying to do or is there some workaround?
thanks
"Omnibuzz" wrote:

> Not the account in which you have connected to SQL Server.
> The account in which the SQL Server Service is running should have access
to
> your machine and your folder.
> Or the best way is to copy this file to a folder in your SQL Server and us
e
> that path in the ODS.|||Create a share on your system, and put the mdb file in it. Enable the guest
account for your system, and give the guest user write permissions to the
file (both through-share, and NTFS if necessary).
You'll have to enable the guest account for it to work, because the SQL
server is more than likely running under the Local System context on the
system it resides on. Local System has no authority over the network, so whe
n
the SQL system tries to connect to you, it appears as guest.
Another method involves trusting the SQL server for delagation, but since
you said you can't modify it, it's not worth going into detail.
HTH
"tech77" wrote:
> thanks Omnibuzz,Jim and Mark for your responses.
> .The machine on which SQL Server is running might not have access to my
> machine and my folder.Its on a remote server.
> And I cannot configure that machine so it has access to my machine.
> So I have to install SQL Server locally else I cant accomplish what I am
> trying to do or is there some workaround?
> thanks
>
> "Omnibuzz" wrote:
>|||You can put the MDB on the database server, instead of your PC. Make it a
share if others need access to it.
You can put the MDB on a network server that the SQL Server account would
have access to.
You can grant the SQL Server account access to the MDB on your machine.
(the above two require proper network security, but should not be difficult)
You can drop the MDB database entirely and move the tables to SQL Server,
which is probably the best bet. If you absolutely need to access these
tables via MS Access, you can create linked tables pointing to SQL Server.
This will put all the tables local in SQL Server, but still let you use your
access front end.
Is there really a need to have SQL server access your local MDB, rather than
migrating the tables and data to SQL Server?
"tech77" <tech77@.discussions.microsoft.com> wrote in message
news:7B9F4484-F46C-493F-8830-A5602EC96B55@.microsoft.com...
> thanks Omnibuzz,Jim and Mark for your responses.
> .The machine on which SQL Server is running might not have access to my
> machine and my folder.Its on a remote server.
> And I cannot configure that machine so it has access to my machine.
> So I have to install SQL Server locally else I cant accomplish what I am
> trying to do or is there some workaround?
> thanks
>
> "Omnibuzz" wrote:
>
access to
use|||Finally it was decided to download SQL Server express edition 2005 and copy
the Access tables to SQL Server and use for our requirement .
Thanks all for your help.I learnt quite a few things from you all.
Regards,
tech@.77
"Jim Underwood" wrote:

> You can put the MDB on the database server, instead of your PC. Make it a
> share if others need access to it.
> You can put the MDB on a network server that the SQL Server account would
> have access to.
> You can grant the SQL Server account access to the MDB on your machine.
> (the above two require proper network security, but should not be difficul
t)
> You can drop the MDB database entirely and move the tables to SQL Server,
> which is probably the best bet. If you absolutely need to access these
> tables via MS Access, you can create linked tables pointing to SQL Server.
> This will put all the tables local in SQL Server, but still let you use yo
ur
> access front end.
> Is there really a need to have SQL server access your local MDB, rather th
an
> migrating the tables and data to SQL Server?
>
> "tech77" <tech77@.discussions.microsoft.com> wrote in message
> news:7B9F4484-F46C-493F-8830-A5602EC96B55@.microsoft.com...
> access to
> use
>
>

Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'?

Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
now BULK INSERT doesn't seem to work.
Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
11:38:51
create table ##Holding_Tank (full_record varchar(500))
BULK INSERT ##Holding_Tank
FROM 'g:\narf.txt'
WITH
(
ROWTERMINATOR = '0x0a',
TABLOCK
)
Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
OLE DB error trace [Non-interface error: CoCreate of DSO for
BULKIMPORTSTREAM returned 0x8007045a].
Any suggestions?
On Mar 2, 11:17 am, bour...@.gmail.com wrote:
> Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
> now BULK INSERT doesn't seem to work.
> Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
> 11:38:51
> create table ##Holding_Tank (full_record varchar(500))
> BULK INSERT ##Holding_Tank
> FROM 'g:\narf.txt'
> WITH
> (
> ROWTERMINATOR = '0x0a',
> TABLOCK
> )
> Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
> OLE DB error trace [Non-interface error: CoCreate of DSO for
> BULKIMPORTSTREAM returned 0x8007045a].
> Any suggestions?
The fix appears to be to re-register the impprov dll, followed by
restarting the service.

Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'?

Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
now BULK INSERT doesn't seem to work.
Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
11:38:51
create table ##Holding_Tank (full_record varchar(500))
BULK INSERT ##Holding_Tank
FROM 'g:\narf.txt'
WITH
(
ROWTERMINATOR = '0x0a',
TABLOCK
)
Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
OLE DB error trace [Non-interface error: CoCreate of DSO for
BULKIMPORTSTREAM returned 0x8007045a].
Any suggestions?On Mar 2, 11:17 am, bour...@.gmail.com wrote:
> Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
> now BULK INSERT doesn't seem to work.
> Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
> 11:38:51
> create table ##Holding_Tank (full_record varchar(500))
> BULK INSERT ##Holding_Tank
> FROM 'g:\narf.txt'
> WITH
> (
> ROWTERMINATOR = '0x0a',
> TABLOCK
> )
> Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
> OLE DB error trace [Non-interface error: CoCreate of DSO for
> BULKIMPORTSTREAM returned 0x8007045a].
> Any suggestions?
The fix appears to be to re-register the impprov dll, followed by
restarting the service.

Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'?

Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
now BULK INSERT doesn't seem to work.
Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
11:38:51
create table ##Holding_Tank (full_record varchar(500))
BULK INSERT ##Holding_Tank
FROM 'g:\narf.txt'
WITH
(
ROWTERMINATOR = '0x0a',
TABLOCK
)
Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
OLE DB error trace [Non-interface error: CoCreate of DSO for
BULKIMPORTSTREAM returned 0x8007045a].
Any suggestions?On Mar 2, 11:17 am, bour...@.gmail.com wrote:
> Just upgraded SQL Server to SP4 (plus hotfixes) this past weekend, and
> now BULK INSERT doesn't seem to work.
> Microsoft SQL Server 2000 - 8.00.2187 (Intel X86) Mar 9 2006
> 11:38:51
> create table ##Holding_Tank (full_record varchar(500))
> BULK INSERT ##Holding_Tank
> FROM 'g:\narf.txt'
> WITH
> (
> ROWTERMINATOR = '0x0a',
> TABLOCK
> )
> Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
> OLE DB error trace [Non-interface error: CoCreate of DSO for
> BULKIMPORTSTREAM returned 0x8007045a].
> Any suggestions?
The fix appears to be to re-register the impprov dll, followed by
restarting the service.

Could not create an instance of OLE DB provider BULKIMPORTSTREAM.

Run this script:

bulk insert viewdisp
from 'd:\downloads\assessment05_preload\viewdisp.txt'
with (
check_constraints,
datafiletype = 'widechar',
firstrow = 1,
maxerrors = 0
)
go

Get this error:

Could not create an instance of OLE DB provider 'BULKIMPORTSTREAM'.
OLE DB error trace [Non-interface error: CoCreate of DSO for BULKIMPORTSTREAM returned 0x80040154].

SQL Server 2000 - SP3a
Logged in as sa with system admin, bulk insert admin, dbo, ddl admin, local admin, king of the world... you name it.

Is this a OLE DB Driver or MDAC issue?

Anyone else ever had this issue. You would think that Microsoft would have all of their error messages on their own WebSite, but that must be too much trouble for them.Based on the HRESULT you posted (80040154), you've got at least one DLL class that isn't registered properly. The simple answer is to remove the SQL client tools using the Control Panel, then reinstall the SQL Client tools.

If you know (or at least strongly suspect) which DLL has gone AWOL, you can certainly try to register it manually.

-PatP|||Do you know which DLLs I should look at? Is the the ODBC or the SQL Server?

Thanks.|||Operative word being "should", the problem should be in the SQL Server.

-PatP

Sunday, February 19, 2012

Could install two Instance in a SQL Server

I have install Sql2005 in my Server, and it use the default instance.
Could we install another Instance in the some Sqlserver.
For instance, I add Instance2 to the SqlServer?Sure. See:
http://msdn2.microsoft.com/en-us/library/ms143531.aspx
HTH
Jerry
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:eTsboMseGHA.4948@.TK2MSFTNGP04.phx.gbl...
>I have install Sql2005 in my Server, and it use the default instance.
> Could we install another Instance in the some Sqlserver.
> For instance, I add Instance2 to the SqlServer?
>

Could install two Instance in a SQL Server

I have install Sql2005 in my Server, and it use the default instance.
Could we install another Instance in the some Sqlserver.
For instance, I add Instance2 to the SqlServer?Sure. See:
http://msdn2.microsoft.com/en-us/library/ms143531.aspx
HTH
Jerry
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:eTsboMseGHA.4948@.TK2MSFTNGP04.phx.gbl...
>I have install Sql2005 in my Server, and it use the default instance.
> Could we install another Instance in the some Sqlserver.
> For instance, I add Instance2 to the SqlServer?
>

Tuesday, February 14, 2012

Corrupted database: Server does not start

Hello,
Our SQL Server instance does not start.
Error log shows that server cannot start some our database
(not system one like master or msdb)
that is probably corrupted.
We have the backup of yesterday.
But how can we restore it if server does not start at all?
We tried to remove corrupted database files but in such a case server also
does not start and reports that "database files is missing".
Does anyone know how to solve this?
Thank you,
OlegWe need to see the errorlog file in order to say something...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Oleg" <oleg@.nospam.com> wrote in message
news:uqsDhLtAEHA.3456@.TK2MSFTNGP09.phx.gbl...
> Hello,
> Our SQL Server instance does not start.
> Error log shows that server cannot start some our database
> (not system one like master or msdb)
> that is probably corrupted.
> We have the backup of yesterday.
> But how can we restore it if server does not start at all?
> We tried to remove corrupted database files but in such a case server also
> does not start and reports that "database files is missing".
> Does anyone know how to solve this?
> Thank you,
> Oleg
>|||Oleg,
OK, a stack dump. These things can point to a bug in SQL Server or something
else unexpected. Assuming that you have searched KB already, I suggest you
open a case with MS PSS.
Sorry to say that... :-(
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Oleg" <oleg@.nospam.com> wrote in message
news:%23CD61VtAEHA.2112@.tk2msftngp13.phx.gbl...
> Hello Tibor,
> Errorlog is attached to this message.
> Thank you for the help,
> Oleg
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:%233Gh5PtAEHA.3712@.tk2msftngp13.phx.gbl...
> > We need to see the errorlog file in order to say something...
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> >
> >
> > "Oleg" <oleg@.nospam.com> wrote in message
> > news:uqsDhLtAEHA.3456@.TK2MSFTNGP09.phx.gbl...
> > > Hello,
> > >
> > > Our SQL Server instance does not start.
> > > Error log shows that server cannot start some our database
> > > (not system one like master or msdb)
> > > that is probably corrupted.
> > > We have the backup of yesterday.
> > > But how can we restore it if server does not start at all?
> > > We tried to remove corrupted database files but in such a case server
> also
> > > does not start and reports that "database files is missing".
> > > Does anyone know how to solve this?
> > >
> > > Thank you,
> > >
> > > Oleg
> > >
> > >
> >
> >
>
>

Corrupted database: Server does not start

Hello,
Our SQL Server instance does not start.
Error log shows that server cannot start some our database
(not system one like master or msdb)
that is probably corrupted.
We have the backup of yesterday.
But how can we restore it if server does not start at all?
We tried to remove corrupted database files but in such a case server also
does not start and reports that "database files is missing".
Does anyone know how to solve this?
Thank you,
OlegWe need to see the errorlog file in order to say something...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Oleg" <oleg@.nospam.com> wrote in message
news:uqsDhLtAEHA.3456@.TK2MSFTNGP09.phx.gbl...
> Hello,
> Our SQL Server instance does not start.
> Error log shows that server cannot start some our database
> (not system one like master or msdb)
> that is probably corrupted.
> We have the backup of yesterday.
> But how can we restore it if server does not start at all?
> We tried to remove corrupted database files but in such a case server also
> does not start and reports that "database files is missing".
> Does anyone know how to solve this?
> Thank you,
> Oleg
>|||Oleg,
OK, a stack dump. These things can point to a bug in SQL Server or something
else unexpected. Assuming that you have searched KB already, I suggest you
open a case with MS PSS.
Sorry to say that... :-(
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Oleg" <oleg@.nospam.com> wrote in message
news:%23CD61VtAEHA.2112@.tk2msftngp13.phx.gbl...
> Hello Tibor,
> Errorlog is attached to this message.
> Thank you for the help,
> Oleg
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:%233Gh5PtAEHA.3712@.tk2msftngp13.phx.gbl...
> also
>
>