Sunday, February 26, 2012

Drop a Role in Report Sever

I create a new Role "TestRole"under Security/ Roles in the Report Server.
I i want to drop this Role, i get the Error that the Role does not exist ?
But the Role exist !!
Anyone can help ?

For UI operations, please post to SQL Server Tools General.

Thanks
Laurentiu

DROP a Mirrored DB

I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
a point where I want to delete the mirrored test database. However,
when I try to drop the DB on the mirrored server I receive an error.
It won't let me delete the DB since it is in "In Recovery" mode. What
do I have to do to DROP this database? The copy on the primary server
is already removed?
Msg 3743, Level 16, State 1, Line 1
Database Mirror_Test is enabled for Database Mirroring, Database
Mirroring must be removed before dropping the database.
Found out how.
ALTER DATABASE Mirror_Test SET PARTNER OFF
shaun.steckley@.gmail.com wrote:
> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --
|||Hi Shaun
Check out http://msdn2.microsoft.com/en-us/library/ms180801.aspx for
instructions or look in Books Online.
John
"shaun.steckley@.gmail.com" wrote:

> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --
>

DROP a Mirrored DB

I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
a point where I want to delete the mirrored test database. However,
when I try to drop the DB on the mirrored server I receive an error.
It won't let me delete the DB since it is in "In Recovery" mode. What
do I have to do to DROP this database? The copy on the primary server
is already removed?
Msg 3743, Level 16, State 1, Line 1
Database Mirror_Test is enabled for Database Mirroring, Database
Mirroring must be removed before dropping the database.Found out how.
ALTER DATABASE Mirror_Test SET PARTNER OFF
shaun.steckley@.gmail.com wrote:
> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --|||Hi Shaun
Check out http://msdn2.microsoft.com/en-us/library/ms180801.aspx for
instructions or look in Books Online.
John
"shaun.steckley@.gmail.com" wrote:

> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --
>

DROP a Mirrored DB

I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
a point where I want to delete the mirrored test database. However,
when I try to drop the DB on the mirrored server I receive an error.
It won't let me delete the DB since it is in "In Recovery" mode. What
do I have to do to DROP this database? The copy on the primary server
is already removed?
--
Msg 3743, Level 16, State 1, Line 1
Database Mirror_Test is enabled for Database Mirroring, Database
Mirroring must be removed before dropping the database.
--Found out how.
ALTER DATABASE Mirror_Test SET PARTNER OFF
shaun.steckley@.gmail.com wrote:
> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --|||Hi Shaun
Check out http://msdn2.microsoft.com/en-us/library/ms180801.aspx for
instructions or look in Books Online.
John
"shaun.steckley@.gmail.com" wrote:
> I setup Database Mirroring for the first time on SQL 2005 SP1 and am at
> a point where I want to delete the mirrored test database. However,
> when I try to drop the DB on the mirrored server I receive an error.
> It won't let me delete the DB since it is in "In Recovery" mode. What
> do I have to do to DROP this database? The copy on the primary server
> is already removed?
> --
> Msg 3743, Level 16, State 1, Line 1
> Database Mirror_Test is enabled for Database Mirroring, Database
> Mirroring must be removed before dropping the database.
> --
>

DROP A LIST OF TABLES

Hi all,
How can I delete a list of tables with SQL Script ?
Many thanks,
//HM
drop table tableName1, tableName2, tableName3 ...
regards krystian zieja / mob
Hicham wrote:
> Hi all,
> How can I delete a list of tables with SQL Script ?
> Many thanks,
> //HM
>
|||How can I declare table name as variale and use it in this script.
Drop table Txx
where xx is my variable.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Hi,
Use the below script:-
declare @.tbl_names varchar(300)
set @.tbl_names='t1,t2,t3,t4'
exec('drop table '+@.tbl_names)
Thanks
Hari
MCDBA
"Hicham Mechmachi" <mechmachi@.hotmail.com> wrote in message
news:OyUPKOEREHA.556@.TK2MSFTNGP10.phx.gbl...
> How can I declare table name as variale and use it in this script.
> Drop table Txx
> where xx is my variable.
> Thanks
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Drop a linked server

HI Freinds,
SQ 2000
I had a transaction replication before with a linked server.
I stoped the replication completely and now I am trying to drop linked
server.
But it doesn't le me to do so, Complains about the server still in
replication error 20583
How can I drop te linked server ?
Thanks,
PatAre you using that server as a publisher or subscriber?
Ed
"Patrick" wrote:

> HI Freinds,
> SQ 2000
> I had a transaction replication before with a linked server.
> I stoped the replication completely and now I am trying to drop linked
> server.
> But it doesn't le me to do so, Complains about the server still in
> replication error 20583
> How can I drop te linked server ?
> Thanks,
> Pat
>
>|||look at sp_dropserver in bol
Ed
"Patrick" wrote:

> HI Freinds,
> SQ 2000
> I had a transaction replication before with a linked server.
> I stoped the replication completely and now I am trying to drop linked
> server.
> But it doesn't le me to do so, Complains about the server still in
> replication error 20583
> How can I drop te linked server ?
> Thanks,
> Pat
>
>

Drop a Global Temporary Table using Classic ASP

Good Afternoon,
I am hoping someone can help me out. I want to drop a global temporary
table in classic asp after my recordset has completed printing out
it's rows.
I tried executing the following statement and I get the following
error:
Drop Table tmm_a03_gtt_YYYJCO3_0611154125
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-14452: attempt to
create, alter or drop an index on temporary table already in use
FYI; We are using Oracle 10 g.
Thanks,
Juan
Not sure about Oracle. But in SQL Server you cannot delete a global
temporary table even if one connection references it. So I would check if
there are connections that access it, and kill those. Or wait until those
connections are completed then delete it.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"juan.oceguera@.nav-international.com" wrote:

> Good Afternoon,
> I am hoping someone can help me out. I want to drop a global temporary
> table in classic asp after my recordset has completed printing out
> it's rows.
> I tried executing the following statement and I get the following
> error:
> Drop Table tmm_a03_gtt_YYYJCO3_0611154125
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC driver for Oracle][Oracle]ORA-14452: attempt to
> create, alter or drop an index on temporary table already in use
> FYI; We are using Oracle 10 g.
> Thanks,
> Juan
>

Drop a Database

We are running SQL Server 2000 with SP3.
We would like to remove an old database which is not used
anymore.
I intend to do
1) Delete DB in Enterprise Manager
2) Remove Server Login for that particular database in
Enterprise Manager
Is there any step missed ?
ThanksHi,
You can just delete it . also if u don't want amy roles or logins u can
delete it also
--
Shaju Thomas
"Roger Lee" <anonymous@.discussions.microsoft.com> wrote in message
news:037d01c39c3f$10375400$a601280a@.phx.gbl...
> We are running SQL Server 2000 with SP3.
> We would like to remove an old database which is not used
> anymore.
> I intend to do
> 1) Delete DB in Enterprise Manager
> 2) Remove Server Login for that particular database in
> Enterprise Manager
> Is there any step missed ?
> Thanks
>|||Roles are inside the database, no need to delete any roles. (As you can't create any server
roles...)
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Shaju" <answer@.hotmail.com> wrote in message news:uzHpoSEnDHA.3288@.tk2msftngp13.phx.gbl...
> Hi,
> You can just delete it . also if u don't want amy roles or logins u can
> delete it also
> --
> Shaju Thomas
> "Roger Lee" <anonymous@.discussions.microsoft.com> wrote in message
> news:037d01c39c3f$10375400$a601280a@.phx.gbl...
> > We are running SQL Server 2000 with SP3.
> >
> > We would like to remove an old database which is not used
> > anymore.
> >
> > I intend to do
> > 1) Delete DB in Enterprise Manager
> > 2) Remove Server Login for that particular database in
> > Enterprise Manager
> >
> > Is there any step missed ?
> >
> > Thanks
> >
> >
>|||Roger,
watch out DTS packages and jobs referencing the db. They are outside the
db.
Quentin
"Roger Lee" <anonymous@.discussions.microsoft.com> wrote in message
news:037d01c39c3f$10375400$a601280a@.phx.gbl...
> We are running SQL Server 2000 with SP3.
> We would like to remove an old database which is not used
> anymore.
> I intend to do
> 1) Delete DB in Enterprise Manager
> 2) Remove Server Login for that particular database in
> Enterprise Manager
> Is there any step missed ?
> Thanks
>

Drop a constrain

Hi all,
The table has SP and tables as dependencies
Thanks
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%23N7ZVEjjGHA.1640@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I need to delete a table WITH foreign key constrain. What is the fast way
> to drop the table?
> Thanks
>Hi,
I need to delete a table WITH foreign key constrain. What is the fast way to
drop the table?
Thanks|||Hi all,
The table has SP and tables as dependencies
Thanks
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%23N7ZVEjjGHA.1640@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I need to delete a table WITH foreign key constrain. What is the fast way
> to drop the table?
> Thanks
>|||On Mon, 12 Jun 2006 11:01:26 -0400, mecn wrote:

>Hi,
>I need to delete a table WITH foreign key constrain. What is the fast way t
o
>drop the table?
ALTER TABLE MyTable
DROP CONSTRAINT MyConstraint;
DROP TABLE MyTable;
Hugo Kornelis, SQL Server MVP|||On Mon, 12 Jun 2006 11:01:26 -0400, mecn wrote:

>Hi,
>I need to delete a table WITH foreign key constrain. What is the fast way t
o
>drop the table?
ALTER TABLE MyTable
DROP CONSTRAINT MyConstraint;
DROP TABLE MyTable;
Hugo Kornelis, SQL Server MVP

Drop a constrain

Hi,
I need to delete a table WITH foreign key constrain. What is the fast way to
drop the table?
ThanksHi all,
The table has SP and tables as dependencies
Thanks
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%23N7ZVEjjGHA.1640@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I need to delete a table WITH foreign key constrain. What is the fast way
> to drop the table?
> Thanks
>|||On Mon, 12 Jun 2006 11:01:26 -0400, mecn wrote:
>Hi,
>I need to delete a table WITH foreign key constrain. What is the fast way to
>drop the table?
ALTER TABLE MyTable
DROP CONSTRAINT MyConstraint;
DROP TABLE MyTable;
--
Hugo Kornelis, SQL Server MVP

Drop a column

You just need to drop the default first:
ALTER TABLE dbo.ObjetName
DROP CONSTRAINT DF__ObjetName__ColumnName__41DEAF21
GO
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Thank you very much Paul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:1d5801c4fd6d$739195c0$a301280a@.phx.gbl...
> You just need to drop the default first:
> ALTER TABLE dbo.ObjetName
> DROP CONSTRAINT DF__ObjetName__ColumnName__41DEAF21
> GO
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Now I can drop the constraint and the column in the publicator.
I run the snapshot, but when I try start sincronizing, it's give me this
error
The schema script 'exec sp_repldropcolumn '[dbo].[TableName]', 'ColumnName',
1' could not be propagated to the subscriber. The step failed.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:1d5801c4fd6d$739195c0$a301280a@.phx.gbl...
> You just need to drop the default first:
> ALTER TABLE dbo.ObjetName
> DROP CONSTRAINT DF__ObjetName__ColumnName__41DEAF21
> GO
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||David,
you only need to run the snapshot agent if you're resynchronizing - and not
here. I suspect you have indexes/defaults on the subscriber that are
preventing the alter table working there. Now that the alter table is in the
queue, you'll have to remopve these constraints by hand before
synchronizing, or reinitialize. If you choose the former, it should be
obvious what is blocking the subscriber, but if not, have a look at logging:
http://support.microsoft.com/?id=312292
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

drop a column

Hi,
What's the effect to drop a column from a table has 13 million records? I am
mainly concern the time it takes. Thanks
Hi Jen
"Jen" wrote:

> Hi,
> What's the effect to drop a column from a table has 13 million records? I am
> mainly concern the time it takes. Thanks
If you are using the ALTER TABLE statement to do this there will be a schema
modify (Sch-M) lock on the table whilst this is occuring. A Sch-M lock is
incompatible with all lock modes therefore no-one will have access to the
table.
You may want to check out the topics "Alter Table" and "Lock Compatibilty"
in Books Online.
John
|||It seems it doesn't mention Lock in ALTER TABLE, and can't seach for "Lock
Compatibilty". Is there other way to drop? Thanks
"John Bell" wrote:

> Hi Jen
> "Jen" wrote:
>
> If you are using the ALTER TABLE statement to do this there will be a schema
> modify (Sch-M) lock on the table whilst this is occuring. A Sch-M lock is
> incompatible with all lock modes therefore no-one will have access to the
> table.
> You may want to check out the topics "Alter Table" and "Lock Compatibilty"
> in Books Online.
> John
|||Hi Jen
"Jen" wrote:
[vbcol=seagreen]
> It seems it doesn't mention Lock in ALTER TABLE, and can't seach for "Lock
> Compatibilty". Is there other way to drop? Thanks
> "John Bell" wrote:
For the "Lock Compatibility" subject see
http://msdn2.microsoft.com/en-us/library/aa213041(sql.80).aspx
If you used EM to drop the column it would firstly create a new table, then
suck all the data from the old table, then drop the old table and finally
rename the new table. As you can imaging you would can grow quite a bit older
whilst this is happening! ALTER TABLE is your best option and you will need
to plan for an interuption to service. Your best indicator of how long it
would take may be to try it on a test system first.
Is there an issue leaving this column in place?
John

drop a column

Hi,
What's the effect to drop a column from a table has 13 million records? I am
mainly concern the time it takes. ThanksHi Jen
"Jen" wrote:

> Hi,
> What's the effect to drop a column from a table has 13 million records? I
am
> mainly concern the time it takes. Thanks
If you are using the ALTER TABLE statement to do this there will be a schema
modify (Sch-M) lock on the table whilst this is occuring. A Sch-M lock is
incompatible with all lock modes therefore no-one will have access to the
table.
You may want to check out the topics "Alter Table" and "Lock Compatibilty"
in Books Online.
John|||It seems it doesn't mention Lock in ALTER TABLE, and can't seach for "Lock
Compatibilty". Is there other way to drop? Thanks
"John Bell" wrote:

> Hi Jen
> "Jen" wrote:
>
> If you are using the ALTER TABLE statement to do this there will be a sche
ma
> modify (Sch-M) lock on the table whilst this is occuring. A Sch-M lock is
> incompatible with all lock modes therefore no-one will have access to the
> table.
> You may want to check out the topics "Alter Table" and "Lock Compatibilty"
> in Books Online.
> John|||Hi Jen
"Jen" wrote:
[vbcol=seagreen]
> It seems it doesn't mention Lock in ALTER TABLE, and can't seach for "Lock
> Compatibilty". Is there other way to drop? Thanks
> "John Bell" wrote:
>
For the "Lock Compatibility" subject see
http://msdn2.microsoft.com/en-us/library/aa213041(sql.80).aspx
If you used EM to drop the column it would firstly create a new table, then
suck all the data from the old table, then drop the old table and finally
rename the new table. As you can imaging you would can grow quite a bit olde
r
whilst this is happening! ALTER TABLE is your best option and you will need
to plan for an interuption to service. Your best indicator of how long it
would take may be to try it on a test system first.
Is there an issue leaving this column in place?
John

drop 1 article from publication and add it back, sql server 2000 s

Recently I have experienced problems with subscriptions getting out of sync.
Some of the published tables are very large and are connected to the
subscriber via t1 connection. To avoid re-initializing the entire publication
I ran sp_dropsubscription followed by sp_droparticle, both specifying the
article that is out of sync. Then I opened the publication properties from
the replication monitor, went to the articles tab, and added the article back
to the publication. When I run the snapshot again a new snapshot is generated
for that article and it subsequently is pushed to the subscriber. Sometimes
the artilces will get out of sync again in a day or two and some articles
stay synchronized without any problems.
The script I run to drop the article is:
use db1
go
declare @.p varchar(128)
declare @.a varchar(128)
declare @.db varchar(128)
set @.p = 'db1_Publication'
set @.a = 'tbl1'
set @.db = 'db1'
exec sp_dropsubscription @.publication = @.p ,@.article = @.a
,@.subscriber = 'rptServer' ,@.destination_db = @.db
exec sp_droparticle @.publication = @.p
,@.article= @.a
,@.force_invalidate_snapshot = 0
I believe this is the correct way to drop 1 article from a publication that
contains many articles and adding it back again to reinitialize, but I
haven't been able to find any examples of this anywhere.
The question I pose to the replication gurus is, does this work? I am unsure
at this point due to the inconsistent results I've been getting.
Thanks,
Jason
Jason,
this is much the same way I do it as well (see
http://www.replicationanswers.com/AddColumn.asp). I would like to
investigate the non-synchronization of these tables though. Do you see any
commands in the distribution database for these tables (sp_browsereplcmds)?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

drop / create new database with old name

Hi,
Is it possible to drop and then create a new, fresh
database with the same name as the database just dropped
or would this cause problems? I don't want to recreate
this database from backups as there are concerns.
Thanks,
Diana
That should cause no problems... is there some reason you would expect it
to?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"DianaR" <anonymous@.discussions.microsoft.com> wrote in message
news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
> Hi,
> Is it possible to drop and then create a new, fresh
> database with the same name as the database just dropped
> or would this cause problems? I don't want to recreate
> this database from backups as there are concerns.
> Thanks,
> Diana
|||Hi Adam,
No, no reason... just wanted to make sure.
Thanks for your reply.
Diana

>--Original Message--
>That should cause no problems... is there some reason
you would expect it
>to?
>
>--
>Adam Machanic
>SQL Server MVP
>http://www.sqljunkies.com/weblog/amachanic
>--
>
>"DianaR" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
dropped
>
>.
>

drop / create new database with old name

Hi,
Is it possible to drop and then create a new, fresh
database with the same name as the database just dropped
or would this cause problems? I don't want to recreate
this database from backups as there are concerns.
Thanks,
DianaThat should cause no problems... is there some reason you would expect it
to?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"DianaR" <anonymous@.discussions.microsoft.com> wrote in message
news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
> Hi,
> Is it possible to drop and then create a new, fresh
> database with the same name as the database just dropped
> or would this cause problems? I don't want to recreate
> this database from backups as there are concerns.
> Thanks,
> Diana|||Hi Adam,
No, no reason... just wanted to make sure.
Thanks for your reply.
Diana

>--Original Message--
>That should cause no problems... is there some reason
you would expect it
>to?
>
>--
>Adam Machanic
>SQL Server MVP
>http://www.sqljunkies.com/weblog/amachanic
>--
>
>"DianaR" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
dropped[vbcol=seagreen]
>
>.
>

drop / create new database with old name

Hi,
Is it possible to drop and then create a new, fresh
database with the same name as the database just dropped
or would this cause problems? I don't want to recreate
this database from backups as there are concerns.
Thanks,
DianaThe only problem I can think of is to do with the table
sysdatabases in the master database.
If you refer to the database by its dbid anywhere then
there is a good chance it might change when you re-create
it.
Peter
"The best minds are not in government. If any were,
business would steal them away."
Ronald Reagan
>--Original Message--
>Hi,
>Is it possible to drop and then create a new, fresh
>database with the same name as the database just dropped
>or would this cause problems? I don't want to recreate
>this database from backups as there are concerns.
>Thanks,
>Diana
>.
>|||That should cause no problems... is there some reason you would expect it
to?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"DianaR" <anonymous@.discussions.microsoft.com> wrote in message
news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
> Hi,
> Is it possible to drop and then create a new, fresh
> database with the same name as the database just dropped
> or would this cause problems? I don't want to recreate
> this database from backups as there are concerns.
> Thanks,
> Diana|||Hi Adam,
No, no reason... just wanted to make sure.
Thanks for your reply.
Diana
>--Original Message--
>That should cause no problems... is there some reason
you would expect it
>to?
>
>--
>Adam Machanic
>SQL Server MVP
>http://www.sqljunkies.com/weblog/amachanic
>--
>
>"DianaR" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0b7f01c51837$db2c5230$a401280a@.phx.gbl...
>> Hi,
>> Is it possible to drop and then create a new, fresh
>> database with the same name as the database just
dropped
>> or would this cause problems? I don't want to recreate
>> this database from backups as there are concerns.
>> Thanks,
>> Diana
>
>.
>

Drop & Create sProc

I generated SQL Script to drop and recreate some tables in my database
that I will want to perform monthly. I would like to put the script into a
sproc, however when I try to compile it I receive an error that the tables
and indexes already exist in my database.
Is there any way around this other than dropping all the tables before I
compile
the sproc?
Thanks,
MarcEncapsulate the CREATE / DROP statements within an IF ?
IF OBJECT_ID('[YourObject]','U') IS NOT NULL
BEGIN
DROP ....
CREATE ...
END
"Marc Miller" wrote:

> I generated SQL Script to drop and recreate some tables in my database
> that I will want to perform monthly. I would like to put the script into
a
> sproc, however when I try to compile it I receive an error that the tables
> and indexes already exist in my database.
> Is there any way around this other than dropping all the tables before I
> compile
> the sproc?
> Thanks,
> Marc
>
>|||Marc Miller (mm1284@.hotmail.com) writes:
> I generated SQL Script to drop and recreate some tables in my database
> that I will want to perform monthly. I would like to put the script
> into a sproc, however when I try to compile it I receive an error that
> the tables and indexes already exist in my database.
> Is there any way around this other than dropping all the tables before I
> compile the sproc?
Unless you are running SQL 6.5, you should not get that error.
I suspect that you have something that looks like:
CREATE PROCEDURE yoursp AS
CREATE TABLE abc
CREATE INDEX abc_ix ON abc(def)
go
CREATE TABLE xyz
CREATE INDEX xyz_ix ON xyz(www)
go
This is a script that first creates a procedure, and then creates a table.
This is because the script includes "go" which is an instruction to
the query tool that this is where the batch ends. "go" is not an SQL
command.
Thus, you would have to remove the "go" to include all code in the
stored procedure. However, you may then find that run into other
problems, because you have commands that must be in separate batches.
I would suggest that you store the script as a separate file. This is
would you should with stored procedures as well. The database should
be seen as a binary repository.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Drop #Temporary Table

I created the #Temporary table in MS SQL. Now i want to drop this #Temporary table, but i want to check first before i drop the this table. How to check the Temporary table exist or not in MS SQL?IF Object_ID('tempdb..#mytable') Is NOT NULL
DROP #mytable|||This one will actually work. (grin)

IF OBJECT_ID('tempdb..#mytable') IS NOT NULL
DROP TABLE #mytable|||DOH! (Who says intelligent posts can't be less than 10 characters?)|||I Test on it already, it really work, thankx! Every body

drop ##temp

due to unavoidable reasons i had to use a ## temp table in a SP,

ie i had to dynamically create a table whose (number of)columns i come to know at runtime..

if i do thi ::set @.sql = 'create #table....select some columns _ append varchar(10)'

then insert into #temp....temp is not valid here..so i used ##temp

now i need to explicitly drop it...also in catch block , i need to make a provision for droping it incase of an error in runnin proc...some kind os IF EXISTS drop ##temp.... as i dont know if it'll be created by that time or not..how do i do it..there is ofcource no entry in sysobjects....where is the entry for temp tables...tempdb dosent have system tables..!!

Can you provide SQl of SP...

~Mandip

|||

Nitin:

Since in this case it is a global temp table -- that is, it starts with ##, it will explicitly appear in sysobjects in tempdb:

create table dbo.##temp
( what varchar (5)
)

select uid, id, left (name, 20) as name from tempdb.dbo.sysobjects where name = '##temp'

if exists
( select 0 from tempdb.dbo.sysobjects
where name = '##temp'
and type = 'U'
)
begin
print 'Dropping the table.'
print ' '
drop table ##temp
end

select id, left (name, 20) as name from tempdb.dbo.sysobjects where name = '##temp'


-- -
-- O U T P U T :
-- -

-- uid id name
-- -- --
-- 1 853242293 ##temp
--
-- (1 row(s) affected)

-- Dropping the table.
--
-- id name
-- -- --

-- (0 row(s) affected)

Dave

|||

Thanks Dave.....

actually i was tryin this...

select * from sysobjects where name like '##temp'

hence the question.....now as u told it wors fine while i do this :: select * from tempdb.dbo.sysobjects where name like '##temp'

tell me if 2 ppl r running this sp simultaneously , will 1 of them get an error (##temp already exist..) or he'll have to wait for a tempdb lock.. ?

|||

Nitin:

Yes, because you are using a GLOBAL temp table this is a potential problem. However, since you are in a stored procedure, the procedure will automatically drop the temp table when it goes out of context should you use a non-global temp table -- one that starts with # instead of ##. I don't see why this would not be acceptable. Are you doing something in which you potentially need the temp table to have persistence beyond the scope of the procedure?


Dave

|||

dave :

i am creating my temp table by creating a sql string for it and then executing it..as num of columns is decided on the runtime..below is the query..

declare @.mytable varchar(500)

set @.mytable = 'CREATE TABLE ##temp (UserId int,'

select @.mytable = @.mytable + 'Plan_' + cast(PlanCode AS nvarchar(10)) + ' varchar(5),'

FROM (SELECT distinct PaymentPlanPlanTypeCode FROM #sometable) p

SET @.mytable = LEFT(@.mytable, LEN(@.mytable) - 1)

SET @.mytable = @.mytable + ')'

print @.mytable

exec (@.mytable)

i need this temp table in this 1 SP only but when i replace the ##temp with , #temp , the table is not getting created... i dont know why..probably some scope problem... also i ran out of the option of using table datatype as my proc further refers this table and i cant declare it inside a string..

see this as well :

--1

declare @.sql varchar(100)

set @.sql='create table ##tem (a int)'

exec (@.sql)

select * from #tem

error : invalid object #tem

--2

create table #tem (a int)

select * from #tem

gives the result.

|||

Nitin:

You are right, you do have a scope problem. I have a rather"dirty" idea, but I will have to test it out and unfortunately I won't have any time for at least an hour or so. Hopefully, you can get a better idea from somebody else can get you a better idea than what I have. I will check back in a while and if nobody else has come up with something I will test out my "dirty trick."

Dave

|||

Nitin:

One more question: I am assuming that this is not a "performance critical" procedure and that even though it is possible for multiple users to execute this procedure at the same time it is not likely. Is that assumption correct or is it rather likely that multiple users will execute your procedure concurrently?

Dave

|||

hi ,

this proc is for some mis report...though data will be large, its unlikely that more then a few users will use it... but agn..can be more then 1 at a time...

so i guess ur assumption can hold..

|||

Nitin:

This is my "dirty" suggestion. I tried it out and it seems to work. If you get another idea it will probably be better. Good luck.

Dave

-- --
-- First, I think I might have used the TABLOCK optimizer hint less than a handful
-- of times over my entire carreer. I don't think I've ever used TABLOCKX other
-- than in demo code. So to begin with I am iffy on the code that follows.
--
-- With that said, understand that what this code tries to use the execute string.
-- to build the format of the target table into a global temp table. Once that is
-- done a SELECT INTO is used to grab that format and use it to create the
-- intended local temp table. Once that is done the global temp table can be
-- dropped. This TABLOCKX optimizer hint means that this portion of the code
-- is single-threaded and is definite bottleneck. If this is not an intensely
-- used query this might be sufficient.
--
-- Unfortunately, there are additional bottlenecking problems. As I suspected,
-- The "select into" portion of the query puts exclusive locks on keys (1)
-- SYSOBJECTS, (2) SYSINDEXES and (3) SYSCOLUMNS of the tempdb database. Also,
-- exclusive intent locks are put on all three of these tables plus
-- (1) SYSCOMMENTS, (2) SYSDEPENDS, and (3) SYSPERMISSIONS and (4) SYSPROPERTIES.
--
-- If you wish to test this out, just comment out the COMMIT TRAN command,
-- run the procedure and then run SP_LOCK. To release the locks exeucte the
-- COMMIT TRAN statement.
--
-- Therefore, it is critical that if this kind of code is used in production that
-- the construction of the TEMP table take place OUTSIDE of the actual processing
-- transaction so that the code below executes in as few microseconds as possible
-- and reduces the profile of the bottleneck.
--
-- I also tested this with no transaction enclosures and exeucted the WAITFOR so
-- that I could see how it locked outside of any transaction enclosures. I
-- commented out my BEGIN TRAN and END TRAN satements, ran with the WAITFOR in
-- affect and did an SP_LOCK with an outside connection. No locks were retained.
-- What to understand with all of this is that (1) the TABLOCKX hint will single
-- thread this and that is not particular good; however, (2) SQL Server issues
-- locks that might otherwise single-thread you briefly anyway; so this might not
-- be TOO bad. (3) Always be careful how you use SELECT INTO syntax; it can
-- also bite you.
--
-- I really don't like this code; but if you don't get any other suggestion, it
-- might be worth a try.
--
-- Dave
--
-- --
--begin tran doWhat

exec ( 'create table ##what (what varchar (20) ) ' )

select * into #what from ##what (TABLOCKX) where 1=0

if exists
( select 0 from tempdb.dbo.sysobjects
where type = 'U'
and name = '##what'
)
drop table ##what

select * from #what

--waitfor delay '0:01:00.000'

drop table #what

--commit tran

go

-- -
--
-- -

-- spid dbid ObjId IndId Type Resource Mode Status
-- -- - - --
-- 55 2 6 0 TAB IX GRANT
-- 55 2 1 0 TAB IX GRANT
-- 55 2 2 0 TAB IX GRANT
-- 55 2 12 0 TAB IX GRANT
-- 55 2 9 0 TAB IX GRANT
-- 55 2 11 0 TAB IX GRANT
-- 55 2 1529959413 0 TAB Sch-M GRANT
-- 55 2 3 2 KEY (9401125ee398) X GRANT
-- 55 2 1 3 KEY (f50024d97b7f) X GRANT
-- 55 2 1 2 KEY (fc00a92d9bd9) X GRANT
-- 55 2 2 1 KEY (bc009dbece03) X GRANT
-- 55 2 1 1 KEY (bc004820585b) X GRANT
-- 55 2 3 1 KEY (bd00770e8a50) X GRANT
-- 55 2 1513959356 0 TAB Sch-M GRANT
-- 55 2 2 1 KEY (f500783daf5c) X GRANT
-- 55 2 3 1 KEY (f60025843207) X GRANT
-- 55 2 1 3 KEY (bc003d203e1f) X GRANT
-- 55 2 1 1 KEY (f50051d91d3b) X GRANT
-- 55 2 1 2 KEY (9b16f50455d2) X GRANT
-- 55 2 3 2 KEY (cd019d01c693) X GRANT
-- 55 33 0 0 DB S GRANT
-- 55 2 3 0 TAB IX GRANT

|||

thanks a lot for ur time dave....im tempted to use this..i'll do some testing and go for it... ya i cant run away from select into...infact that was the thing i was trying earlier while generating the query string...so im kinda ready for that...

cheers

nitin

|||

You can do below:

create table #tbl( /* put fixed columns here. those that are not decided dynamically )

-- use ALTER TABLE to add the columns dynamically

exec('alter table "#tbl" add c1 int, c2 int...')

select ...

Note, however that this has performance implications due to the excessive amount of recompilations triggered due to the schema changes. In above case, pretty much every line will trigger recompile of the entire SP (SQL2000) or statement (SQL2005).

Driving me insane with remote connections in SQL 2005

I have developed an application that utilize SQL server 2005. The application is a clickonce application and launched from the IIS. The problem is that when im trying to connect from outside the company i get the Error that the server does not accept remote connections.

I have used the surface manager and setup the protocol to accept remote connections. Nothing happens.

I have changed the IIS to use the configuration screens under the .NET configuration in IIS. Nothing helps there either.

I have open the ports 445 ,1433, 1434

Anyone knows what i could do to get the connections working on the %%%%%%

I'm moving your question to the data access forum where you should get an answer.|||

Can you post the exact error msg here?
Is your SQL instance the default instance? Can you check whether it's listening on NP and/or TCP? and TCP port number? You need to run SQL Browser. I assume you opened port UDP 1434, not TCP 1434.

or at best, collect information according to
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

Thanks,

|||Have a look at:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2464749&SiteID=1

Mortaza Doulaty
http://www.mrt-web.com

Driving Crazy

hi,
There is something i really don't understand.
There is a remote server shows under Security --> Remote Servers
and I just cannot delete it.
I run sp_dropremotelogin -->
it said "There are no remote users mapped to any local user from remote
server 'repl_distributor'
I run sp_dropserver 'repl_distributor' -->
it said "There are still remote logins for the server 'repl_distributor'
? how am I able to remove that remote login?
Thanks so much
EdThe name suggests that it is a remote server created by replication, which
facilitates communication between the Distributor and Publisher. If you need
to remove the replication and the remote server, use the replication menu
under Tools in EM and click on Disable Publishing and Distributing.
Anith

Drives on Server and How to Define Raid for them

We are looking for advise. I know that there is no right or wrong answer. "It
depends."
We currently have a server with the OS as Windows Server 2003 SP2 and SQL
Server 2000 SP3. This Server has 6 physical drives; only 3 of these physical
drives are being used. These 3 physical drives are 1 container with Raid 5.
This 1 container is divided into 3 logical drives.
We would like to fill the other 3 physical drive slots and create another
container. We were thinking of making this Raid 1.
I should put in my disclaimer that Raid 10 is out of the question and so is
SAN. The company just doesn't have the money.
Is Raid 1 the best choice? This is my first question.
Next is how should we split up the files among the containers.
For example, OS, log and swap file on container 1 with Raid 1 and datafiles
on container 2 with Raid 5?
What are most people doing? Is there a standard? Can people provide examples
of what they are doing or provide suggestions?
Is there a microsoft recommendation for a windows server 2003/sql server
2000 with 6 physical drives on how the drives and raid should be set up? Is
there a cook book recipe? My management wants facts. They want certified
microsoft documentation on this subject.
I was thinking what if some type of external drive could be attached. The
first container of 3 physical drives could be Raid5 and the second container
of 3 physical drives could be Raid 1 and then the external drive could be
Raid 0 for tempdb. Maybe this is a bad idea?If you can completely redo the server from the ground up I would do consider
either a) raid1 set for OS/apps/pagefile and a raid10 set for all sql server
data and log files (with perhaps tempdb on the raid 1 or b) raid1 same as
above but make 4 remaining drives a raid5 set if you need the space or if
read performance is key.
if you can redo from scratch then if you want all 3 new drives involved in
raid to prevent single-disk-failure issue then you are pretty much stuck
with raid5 and it's inherent write performance issue. You could go with 2
disk raid1 and use the third drive alone as a backup drive. That sounds
pretty good.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"lcerni" <lcerni@.discussions.microsoft.com> wrote in message
news:410EFCF8-8D93-4722-A689-CAE1BF237A9B@.microsoft.com...
> We are looking for advise. I know that there is no right or wrong answer.
> "It
> depends."
> We currently have a server with the OS as Windows Server 2003 SP2 and SQL
> Server 2000 SP3. This Server has 6 physical drives; only 3 of these
> physical
> drives are being used. These 3 physical drives are 1 container with Raid
> 5.
> This 1 container is divided into 3 logical drives.
> We would like to fill the other 3 physical drive slots and create another
> container. We were thinking of making this Raid 1.
> I should put in my disclaimer that Raid 10 is out of the question and so
> is
> SAN. The company just doesn't have the money.
> Is Raid 1 the best choice? This is my first question.
> Next is how should we split up the files among the containers.
> For example, OS, log and swap file on container 1 with Raid 1 and
> datafiles
> on container 2 with Raid 5?
> What are most people doing? Is there a standard? Can people provide
> examples
> of what they are doing or provide suggestions?
> Is there a microsoft recommendation for a windows server 2003/sql server
> 2000 with 6 physical drives on how the drives and raid should be set up?
> Is
> there a cook book recipe? My management wants facts. They want certified
> microsoft documentation on this subject.
> I was thinking what if some type of external drive could be attached. The
> first container of 3 physical drives could be Raid5 and the second
> container
> of 3 physical drives could be Raid 1 and then the external drive could be
> Raid 0 for tempdb. Maybe this is a bad idea?|||There is no way to document what you should have because there are too many
factors to be considered. Mainly it comes down to how you use your database,
how the server overall is configured and what your transactions rates will
be. If you have a very low volume server then having it all on one Raid 5
may be fine. But as you get into higher transactions rates or more data
manipulation you will eventually need to split the logs onto another
physical array. Adding a Raid 1 for the OS /Swap file / Logs is probably
fine if this is not a large system and if you have enough memory to avoid
lots of direct disk access. But I don't recommend creating multiple logical
drives on either the Raid 5 or the Raid 1. That would do nothing for
performance and leave you with the possibility you may run out of room on
any one of the logical drives. One last comment. You said no Raid 10 but
you will have 1 slot left if you do 3 Disk Raid 5 and 2 disk Raid 1. You can
make a 4 disk Raid 10 and a 2 disk Raid 1. Or you can add the other drive to
the Raid 5 which would give better performance over the 3 disk Raid 5.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"lcerni" <lcerni@.discussions.microsoft.com> wrote in message
news:410EFCF8-8D93-4722-A689-CAE1BF237A9B@.microsoft.com...
> We are looking for advise. I know that there is no right or wrong answer.
> "It
> depends."
> We currently have a server with the OS as Windows Server 2003 SP2 and SQL
> Server 2000 SP3. This Server has 6 physical drives; only 3 of these
> physical
> drives are being used. These 3 physical drives are 1 container with Raid
> 5.
> This 1 container is divided into 3 logical drives.
> We would like to fill the other 3 physical drive slots and create another
> container. We were thinking of making this Raid 1.
> I should put in my disclaimer that Raid 10 is out of the question and so
> is
> SAN. The company just doesn't have the money.
> Is Raid 1 the best choice? This is my first question.
> Next is how should we split up the files among the containers.
> For example, OS, log and swap file on container 1 with Raid 1 and
> datafiles
> on container 2 with Raid 5?
> What are most people doing? Is there a standard? Can people provide
> examples
> of what they are doing or provide suggestions?
> Is there a microsoft recommendation for a windows server 2003/sql server
> 2000 with 6 physical drives on how the drives and raid should be set up?
> Is
> there a cook book recipe? My management wants facts. They want certified
> microsoft documentation on this subject.
> I was thinking what if some type of external drive could be attached. The
> first container of 3 physical drives could be Raid5 and the second
> container
> of 3 physical drives could be Raid 1 and then the external drive could be
> Raid 0 for tempdb. Maybe this is a bad idea?

Drives on Perfomance Monitor

Can someone tell me if it is possible to see the drives on the server using Perfomance Monitor? I so, where are tehy hiding because i struggled the wholed day!Hi the Performance object you are looking for is called PhysicalDisk, but you need to be part of the local admin group on the server you are monitoring.|||I have been on Physical Disk Perfomance object but I DON'T see anything that will show me the Drives from Select counters from list. Please advise with the name of that counter. Thanks in advance!|||The drive letters are in the instances list. What exactly are you trying to monitor?|||I just want to see how much space I still have by using the Perfomance Monitor on every drive of my server|||The you need LogicalDisk object and the % Free Space counter. If you want the actual value then look at WMI and you will have to program for it. I normally set alerts on % Free Space and set the value at 10%.|||Thank you very much will do that!

Drives missing from requester...how come ?

I'm trying to attach to a database that's stored in my D: partition on my disk. The disk has partitions C: D: E: F:

But when I choose "Attach", and open the requester to select the database-file, only drives C: and E: are shown.

All other programs lists the partitions right.

Where have D: and F: gone to ?

YOu will only see fixed drives of the server, so if you are remote administering the server, you won′t see the local drives in the folder dialog.

HTH, Jens K. Sü?meyer.

http://www.sqlserver2005.de|||

All partitions are on the same physical disk. Why isn't E: also hidden then ?

And how can I be able to use drive D: ? The drives are still hidden either if I administer the server by Remote Desktop, or if I work directly on the computer.

|||

My guess is that this is a permissions issue. SQL Express runs in the context of Network Service, which is a limited user account. Check the NTFS permissions on your other drives and determine if the Network Service account has appropriate permissions.

Mike

Drives Information

Can any body tell me that Can I know the number of drives in system as well
as the used and free spaces of that harddrive through xp_cmdshell
Thanks
Noor
Hi,
Execute the below command from query analyzer:-
master..xp_fixeddrives
The above command will give you all the local drives and free space in MB.
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:OEpjKVnWEHA.3492@.TK2MSFTNGP10.phx.gbl...
> Can any body tell me that Can I know the number of drives in system as
well
> as the used and free spaces of that harddrive through xp_cmdshell
> Thanks
> Noor
>
|||Thanks Hari, but it gave the primary drive letter and it's space. I want the
all available drives and it's spaces.
Thanks
Noor
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:uCgFFknWEHA.3716@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Execute the below command from query analyzer:-
> master..xp_fixeddrives
>
> The above command will give you all the local drives and free space in MB.
> --
> Thanks
> Hari
> MCDBA
> "Noor" <noor@.ngsol.com> wrote in message
> news:OEpjKVnWEHA.3492@.TK2MSFTNGP10.phx.gbl...
> well
>
|||Hi Noor,
master..xp_fixeddrives will give the information for all fixed drives in the
machine.
The network drives will not be listed. For that you can use xp_cmdshell 'dir
driveletter'
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:#Q4u3RoWEHA.2844@.TK2MSFTNGP09.phx.gbl...
> Thanks Hari, but it gave the primary drive letter and it's space. I want
the[vbcol=seagreen]
> all available drives and it's spaces.
> Thanks
> Noor
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:uCgFFknWEHA.3716@.TK2MSFTNGP11.phx.gbl...
MB.
>

Drives in a cluster environment

Hi,

I have a SAN and configuring a cluster on SQL 2005. I initially created a Quorum drive when setting up the cluster and now added 4 more drives to the physical node but when I try to install SQL that drive cannot be located.

Do we need to create all the drives when installing the cluster or what is the way to add the drives later on.

Thanks

Anup

I remember that adding a drive for sql requires the drive to be added to the resource group, I assume you have to create a resource group prior to install?|||

It's one thing to add them locally - did you add them to the cluster via Cluster Admin as well? There's a procedure for adding drives after the cluster is already configured. Are they seen in CluAdmin? If not, you did not add them properly.

You also didn't mention MS DTC. That needs its own drive now as well in its own group with an IP, name, and DTC resource.

|||

Thanks All.

With some troubleshooting and tips from this forums the cluster is up and running with SQL 2005. However I do not understand whi we need a seperate drive for MSDTC cant we share the quorum drive to do this. Can you explain how to size this like perf issues, disks needed etc.

Thanks

|||

For failover clusters, you always need to think in terms of "units of failover". If you put the MSDTC data on the same drive as the quorum, you would need to tie MSDTC to the cluster service. You then create dependancies between MSDTC and the cluster service that shouldn't be there.

In general, you want to think in terms of a service and its associated resources. That bundle needs to be independant from all other bundles on the cluster so that it can move from node to node independant of other bundles (resource groups).

For disk storage, the unit of availability is the physical disk (or LUN in the case of a SAN array). You can't have one partition of a disk mounted to one node and another partition mounted to another node.

So, it's not a matter of capacity or throughput or perf issues, it is an availability issue.

|||

Kevin Farlee wrote:

For failover clusters, you always need to think in terms of "units of failover". If you put the MSDTC data on the same drive as the quorum, you would need to tie MSDTC to the cluster service. You then create dependancies between MSDTC and the cluster service that shouldn't be there.

Just to reinforce - this is not a recommended configuration. It only existed with Windows 2000 because of comclust and that has (thankfully) been taken away in W2K3. Always put MS DTC in a separate group.

In the cases where MS DTC is heavily used (such as BTS), it could potentially affect the availability of the quorum disk (i.e. if it gets filled up with DTC log). You don't want to go there.

|||

Assuming you added the new drives as a disk resource in cluster manager, did you also make those new drives a Dependency of SQL Server? If not, SQL Server will not be able to see them.

|||

Thanks. Now I am getting to understand the concepts. However one last question if I have a active/active cluster then do i need to setup 2 MSDTC groups one in each node?

I appreciate all the help throughout .

|||

No, one DTC per cluster. It is shared with everything else in the cluster.

You will need separate dedicated disks and such for your other SQL instance(s) though.

Driver''s SQLSetConnectAttr failed from script component

Hi

I am currently trying to get a script component to write data into a openedge database.

I am stumped by the below message.

Validation error. Bulk Load ProjPeriod Bplan: Script Component [9378]: System.Data.Odbc.OdbcException:

ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Server rejects connection on attach.

ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed. ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Server rejects connection on attach.

ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.AcquireConnections(Object transaction) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction) Package.dtsx 0 0

The two areas’ that I have found that might be causing this is transaction and codepage, however I have tried setting these appropriately with no success.

Any help would be much appreciated.

Cheers,

Ken C

Does the connection work correctly if you use the connection manager from a DataReader source?

|||

Hi jwelch

As far as I can tell, using this connection from connection manager with Datareader does work.

I created the connection and used in a datareader and it displayed the field names from the supplied sql.

Cheers,

Ken

|||

Hi Again

A bit wierd.... I changed the Fetch Array Size, in the odbc connection to 0 .....this seemed to remove the error from ssis. (This seemed to work for somone else connecting to Oracle db)

Since then i have put the value back to 50 and the error messege has not returned ?

Will develop futher and post back

Cheers

driver's sqlallochandle on sql_handle_env failed

i have just installed sql clinet
(Microsoft SQL Enterprise Manager Microsoft Corporation Version: 8.0)
on windows XP sp2 . whenever i try to reg new sql servers through Enterprise
Mgr it gives me this error . it looks like its associated with ODBC . need to
figure out whats the problem
Thanks & Regards
Sid
Try applying SQL Server 2000 SP4 + Cumulative Hotfix Build 2187.
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e2dfc8d-c20e-4446-99a9-b7f0213f8bc5&DisplayLang=en
http://www.microsoft.com/downloads/details.aspx?FamilyID=9c9ab140-bdee-44df-b7a3-e6849297754a&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyID=1705bd2f-1fb8-4ec8-b3db-0935361308c7&displaylang=en
http://www.microsoft.com/downloads/details.aspx?familyid=A643980A-26A4-44C1-9B50-53E20E7210B5&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyId=243A8A89-74D6-48FD-933F-32FF9D8459C2&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyId=2BB62F35-D041-42AC-98DA-6EC97168BE21&displaylang=en
Sincerely,
Anthony Thomas

"moharil" <sid_m15@.yahoo.com> wrote in message
news:DCFB87D2-813A-4707-8D8B-9EDB6E781058@.microsoft.com...
> i have just installed sql clinet
> (Microsoft SQL Enterprise Manager Microsoft Corporation Version: 8.0)
> on windows XP sp2 . whenever i try to reg new sql servers through
Enterprise
> Mgr it gives me this error . it looks like its associated with ODBC . need
to
> figure out whats the problem
> --
> Thanks & Regards
> Sid

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
Hi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:

> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
> failed
>
>
>

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HAND
LE_DBC
failedHi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:

> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HA
NDLE_DBC
> failed
>
>
>

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failedHi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:
> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
> failed
>
>
>

Drivers of Sqlserver 200

hi

I want to know file's list of SQLSERVER2000 Driver

I write a program , it connect to sqlserver2000 in Eternet and

client side of software install in every computer but i have to install sqlserver2000 in every client pc

how can i connect to SQLServer2000 Server (in a network) with out installing Sqlserver2000 ?

Tanks

Hi,

you just have to install the MDAC Components to access SQL Server.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Depending on your exact needs in addition to MDAC you may also want to try SQL Server Native Client, JDBC, or ADO.NET.

Check out http://msdn.microsoft.com/data for more info.

Drivers for DTS to Oracle

If I want to use DTS export table to Oracle from SQL Server, what all
drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
Does any other Oracle client library required.
You are going to need the Oracle client drivers from Oracle also as I
remember (SQL *Net)

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:1119907568.126869.35880@.g43g2000cwa.googlegro ups.com...
> If I want to use DTS export table to Oracle from SQL Server, what all
> drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
> Does any other Oracle client library required.
>

Drivers for DTS to Oracle

If I want to use DTS export table to Oracle from SQL Server, what all
drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
Does any other Oracle client library required.You are going to need the Oracle client drivers from Oracle also as I
remember (SQL *Net)
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:1119907568.126869.35880@.g43g2000cwa.googlegroups.com...
> If I want to use DTS export table to Oracle from SQL Server, what all
> drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
> Does any other Oracle client library required.
>

Drivers for DTS to Oracle

If I want to use DTS export table to Oracle from SQL Server, what all
drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
Does any other Oracle client library required.You are going to need the Oracle client drivers from Oracle also as I
remember (SQL *Net)
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:1119907568.126869.35880@.g43g2000cwa.googlegroups.com...
> If I want to use DTS export table to Oracle from SQL Server, what all
> drivers I need. One is I believe MS ODBC Driver to connect to Oracle.
> Does any other Oracle client library required.
>

Driver to connect to Informix via DTS?

Hi, folks!

I want to pump data from Informix to SQL Server using DTS to fill / fresh up my SQL-Server data warehouse every day.

In the SQL documentation I found "Don't use the ODBC driver from Informix"

Which is a good choice of ODBC/OLE-DB drivers to deal with Informix via SQL servers DTS?

Regards from Berlin!

SeBaFluDownload Informix driver from IBM website and set it up on your machine to create a DTS package. I have used it to create a DTS package and run it for over a year now.|||What was the error with current driver?
That was a general recommendation, but to followup the data import/export as referred comaptible driver must be used.|||Hi, Joe!

Originally posted by joejcheng
Download Informix driver from IBM website and set it up on your machine to create a DTS package. I have used it to create a DTS package and run it for over a year now.

OK, let's try it <s>...

... but may be I'm stupid - but I can't find any ODBC driver at the IBM site - can You advice me to the related URL?

Many thanx from Berlin!

SeBaFlu

Driver questions running with DB2 as datasource

I need some help and feedbacks from other users that are currently running Reporting Services using DB2 as a database. I have been testing OLE DB and ODBC from Microsoft and IBM, and recently DB2 .Net Data provider from IBM.

We are currently running DB2 on z/os v 7, gateway v.8 fixpack 10. We will mainly be calling Stored Procedures on the DB2 and passing recordsets back to the client.

First I installed IBM DB2 ODBC DRIVER v. 7.01.00.88, but I did not get this too work with reporting Services calling Stored Procedures, so I had too upgrade the driver to v8.01.10.812 to get it to work.

I have been in contact with Microsoft and they recommend using Microsoft OLE DB Provider for DB2 (30.sept 2005). I have tried too get this driver too work but I have problems configuring it. I think that it has something too do with some packages that the driver tries too create on DB2. I get error messages both on the DB2 and in the Data access Tool that runs a wizard setting up the driver. '—The package creation process has failed on resource "mytest", Data description mismatch SQLSTATE:HY000, SQLCODE: -292'

IBM have also developed a IBM DB2 Data provider for .Net Framework 2.0. This is the only driver that I can use too browse the database in the Server Explorer in VS. If you edit the RSReportDesigner.config file you can also use this driver in Report Server projects. Just add <Extension Name="DB2" Type="IBM.Data.DB2.DB2Connection,IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208" /> too the data section of the xml file.

So too wrap it all up. Which provider should I use? Are there any recommendations out there?

Thanks

B

well i've a question.

how to get IBM DB2 Data Provider for .Net Framework 2.0

Driver questions running with DB2 as datasource

I need some help and feedbacks from other users that are currently running Reporting Services using DB2 as a database. I have been testing OLE DB and ODBC from Microsoft and IBM, and recently DB2 .Net Data provider from IBM.

We are currently running DB2 on z/os v 7, gateway v.8 fixpack 10. We will mainly be calling Stored Procedures on the DB2 and passing recordsets back to the client.

First I installed IBM DB2 ODBC DRIVER v. 7.01.00.88, but I did not get this too work with reporting Services calling Stored Procedures, so I had too upgrade the driver to v8.01.10.812 to get it to work.

I have been in contact with Microsoft and they recommend using Microsoft OLE DB Provider for DB2 (30.sept 2005). I have tried too get this driver too work but I have problems configuring it. I think that it has something too do with some packages that the driver tries too create on DB2. I get error messages both on the DB2 and in the Data access Tool that runs a wizard setting up the driver. '—The package creation process has failed on resource "mytest", Data description mismatch SQLSTATE:HY000, SQLCODE: -292'

IBM have also developed a IBM DB2 Data provider for .Net Framework 2.0. This is the only driver that I can use too browse the database in the Server Explorer in VS. If you edit the RSReportDesigner.config file you can also use this driver in Report Server projects. Just add <Extension Name="DB2" Type="IBM.Data.DB2.DB2Connection,IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208" /> too the data section of the xml file.

So too wrap it all up. Which provider should I use? Are there any recommendations out there?

Thanks

B

well i've a question.

how to get IBM DB2 Data Provider for .Net Framework 2.0

Driver Not Capable - Error

I'm getting this error and I don't know where to begin. Our environment is
SQL Server 2000 sp3a on Win Server 2003.
I get the error when running an insert statement in a sql job that executes
as the admin. The insert is a simple one from one table to another.
Ultimately, I need to insert from a VIEW that is set up w/ a linked server
pulling data from FoxPro.
Here is the error message:
Executed as user: DOMAIN\admin. The operation could not be performed because
the OLE DB provider 'MSDASQL' was unable to begin a distributed transaction.
[SQLSTATE 42000] (Error 7391) Driver not capable] [SQLSTATE 01000] (Error
7312) OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]. [SQLSTATE 01000]
(Error 7300). The step failed.
I made a change a few days ago to resolve a memory issue. The change was I
disabled Allow InProcess on the OLE DB for ODBC Drivers provider. Doesn't
seem like this error would be related and I haven't been able to prove
otherwise when enabling the option, for instance.
Any help is appreciated. Thank you, PhilNo resolution yet but I believe the problem is in a trigger on the table I a
m
inserting to. The trigger has sql code that uses views built on a linked
server getting data from foxpro.
"phil" wrote:

> I'm getting this error and I don't know where to begin. Our environment i
s
> SQL Server 2000 sp3a on Win Server 2003.
> I get the error when running an insert statement in a sql job that execute
s
> as the admin. The insert is a simple one from one table to another.
> Ultimately, I need to insert from a VIEW that is set up w/ a linked server
> pulling data from FoxPro.
> Here is the error message:
> Executed as user: DOMAIN\admin. The operation could not be performed becau
se
> the OLE DB provider 'MSDASQL' was unable to begin a distributed transactio
n.
> [SQLSTATE 42000] (Error 7391) Driver not capable] [SQLSTATE 01000] (Error
> 7312) OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]. [SQLSTATE 01000]
> (Error 7300). The step failed.
> I made a change a few days ago to resolve a memory issue. The change was
I
> disabled Allow InProcess on the OLE DB for ODBC Drivers provider. Doesn't
> seem like this error would be related and I haven't been able to prove
> otherwise when enabling the option, for instance.
> Any help is appreciated. Thank you, Phil

Driver Install Location

I have read most of the documentation on installing the JDBC driver and need
a bit of clarification on what and where files gets installed.
First: Am I correct to assume that installation takes place on the client
machine and than NO files are actually installed on the server hosting SQL
Server?
Second: If the JRE is installed on the client, is it only the class jars,
msutil.jar, mssqlserver.jar, msbase.jar that are responsible for enabling the
JDBC connection.
Kind regards for any reply
| Thread-Topic: Driver Install Location
| thread-index: AcS7ky47eyc/czQMQSKYX1iOSRQzOQ==
| X-WBNR-Posting-Host: 24.169.110.115
| From: "=?Utf-8?B?Q2hyaXM=?=" <Chris@.discussions.microsoft.com>
| Subject: Driver Install Location
| Date: Tue, 26 Oct 2004 12:37:08 -0700
| Lines: 12
| Message-ID: <E20ADC31-1528-4F55-8A5A-C3FE05250257@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6425
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I have read most of the documentation on installing the JDBC driver and
need
| a bit of clarification on what and where files gets installed.
|
| First: Am I correct to assume that installation takes place on the client
| machine and than NO files are actually installed on the server hosting
SQL
| Server?
|
| Second: If the JRE is installed on the client, is it only the class jars,
| msutil.jar, mssqlserver.jar, msbase.jar that are responsible for enabling
the
| JDBC connection.
|
| Kind regards for any reply
|
Hello,
The Microsoft JDBC driver is a client installation. You will need to add
the three .jar files to your CLASSPATH on the client machine as well. If
you are using an application server, then the .jar files will need to be
installed on this machine. The installation location and CLASSPATH
configuration steps vary depending on the app server you are using.
The only server component that you may need is the sqljdbc.dll file, which
enables JTA support (transactions). If your application will require this,
then you will need to copy this file from C:\program files\Microsoft SQL
Server 2000 Driver for JDBC\SQLServer JTA\ (or C:\program files\Microsoft
SQL Server 2000 Driver for JDBC\SQLServer JTA 64-bit\ in the case of 64-bit
machines) into the C:\program files\Microsoft SQL Server\MSSQL\Binn\
directory of your SQL Server 2000 installation. Then, you must run the
instjdbc.sql script from C:\program files\Microsoft SQL Server 2000 Driver
for JDBC\SQLServer JTA\ to install the extended stored procedures. You can
use Query Analyzer or osql.exe to run the script.
The JDBC documentation (.pdf) describes the CLASSPATH configuration and JTA
installation in more detail. Look for the following topics:
"Setting the CLASSPATH"
"Installing Stored Procedures for JTA"
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Driver for paradox

Hi, I'm looking for driver to transfer data for paradox DB to sql DB,
It's the last version of the paradox and the DTS in the sql doesn't
help,
Someone have advice?Hi
The latest Microsoft driver for paradox should be in the latest version of
MDAC, if this is not suitable you should contact Borland.
John
"noam" wrote:

> Hi, I'm looking for driver to transfer data for paradox DB to sql DB,
> It's the last version of the paradox and the DTS in the sql doesn't
> help,
> Someone have advice?
>|||Hi
The latest Microsoft driver for paradox should be in the latest version of
MDAC, if this is not suitable you should contact Borland.
John
"noam" wrote:

> Hi, I'm looking for driver to transfer data for paradox DB to sql DB,
> It's the last version of the paradox and the DTS in the sql doesn't
> help,
> Someone have advice?
>

Driver for paradox

Hi, I'm looking for driver to transfer data for paradox DB to sql DB,
It's the last version of the paradox and the DTS in the sql doesn't
help,
Someone have advice?Hi
The latest Microsoft driver for paradox should be in the latest version of
MDAC, if this is not suitable you should contact Borland.
John
"noam" wrote:
> Hi, I'm looking for driver to transfer data for paradox DB to sql DB,
> It's the last version of the paradox and the DTS in the sql doesn't
> help,
> Someone have advice?
>

Driver caching db?

Hello,
I'm not sure if this message belongs in microsoft.public.sqlserver.msde
or is more appropriate here. Please accept my apologies if I have the
wrong list.
I've written ODBC source in C++ that accesses an MSDE instance on a
local machine. I perform the usual steps:
1. Allocate an SQLHENV
2. Allocate the SQLHDBC
3. Connect
4. Execute a statement to "use " my database
5. Issue a simple query
6. Process results
7. Disconnect SQLHDBC
8. Free SQLHDBC
9. Free SQLHENV
10. Exit application
Then I try to attach to the database in SQL Server Enterprise Manager
which returns the following error:
"Error 5123: CREATE FILE encountered operating system error 32 (The
process cannot access the file because it is being used by another
process.) while attempting to open or create the physical file:
'C:\mydb.mdf'.
Do I need to do something different to force the driver to unload the
database when the application ends?
Thanks,
John
The driver does not touch the database file directly. The SQL Server
process will open (and lock) the database file.
Is the database hosted in a different SQL instance, than the one you are
connecting to in Enterprise Manager?
Brannon
"JohnD" <john_nospam@.tech-testing.com> wrote in message
news:hqpUc.8189$YU1.7939@.newssvr22.news.prodigy.co m...
> Hello,
> I'm not sure if this message belongs in microsoft.public.sqlserver.msde
> or is more appropriate here. Please accept my apologies if I have the
> wrong list.
> I've written ODBC source in C++ that accesses an MSDE instance on a
> local machine. I perform the usual steps:
> 1. Allocate an SQLHENV
> 2. Allocate the SQLHDBC
> 3. Connect
> 4. Execute a statement to "use " my database
> 5. Issue a simple query
> 6. Process results
> 7. Disconnect SQLHDBC
> 8. Free SQLHDBC
> 9. Free SQLHENV
> 10. Exit application
> Then I try to attach to the database in SQL Server Enterprise Manager
> which returns the following error:
> "Error 5123: CREATE FILE encountered operating system error 32 (The
> process cannot access the file because it is being used by another
> process.) while attempting to open or create the physical file:
> 'C:\mydb.mdf'.
> Do I need to do something different to force the driver to unload the
> database when the application ends?
> Thanks,
> John
|||Brannon Jones wrote:
> Is the database hosted in a different SQL instance, than the one you are
> connecting to in Enterprise Manager?
Yes it is. I'm assuming (really I didn't know this...) that this makes
a different?
The application is using a default SQLSERVER instance and the attaching
is occurring in another DBINSTANCE.
|||I don't think you can attach a single database to two different SQL
instances. The first instance that loads the database locks it for
exclusive access. So the second instance that tries to load the database
wont be able to.
Brannon
"JohnD" <john_nospam@.tech-testing.com> wrote in message
news:d6vUc.1687$lY3.1035@.newssvr23.news.prodigy.co m...
> Brannon Jones wrote:
> Yes it is. I'm assuming (really I didn't know this...) that this makes
> a different?
> The application is using a default SQLSERVER instance and the attaching
> is occurring in another DBINSTANCE.
|||Brannon Jones wrote:

> I don't think you can attach a single database to two different SQL
> instances. The first instance that loads the database locks it for
> exclusive access. So the second instance that tries to load the database
> wont be able to.
Which explains why I have to stop the instance in order for the other
instance to attach to it.
Thank you very much Brannon for the clarification.

Driver caching db?

Hello,
I'm not sure if this message belongs in microsoft.public.sqlserver.msde
or is more appropriate here. Please accept my apologies if I have the
wrong list.
I've written ODBC source in C++ that accesses an MSDE instance on a
local machine. I perform the usual steps:
1. Allocate an SQLHENV
2. Allocate the SQLHDBC
3. Connect
4. Execute a statement to "use " my database
5. Issue a simple query
6. Process results
7. Disconnect SQLHDBC
8. Free SQLHDBC
9. Free SQLHENV
10. Exit application
Then I try to attach to the database in SQL Server Enterprise Manager
which returns the following error:
"Error 5123: CREATE FILE encountered operating system error 32 (The
process cannot access the file because it is being used by another
process.) while attempting to open or create the physical file:
'C:\mydb.mdf'.
Do I need to do something different to force the driver to unload the
database when the application ends?
Thanks,
JohnThe driver does not touch the database file directly. The SQL Server
process will open (and lock) the database file.
Is the database hosted in a different SQL instance, than the one you are
connecting to in Enterprise Manager?
Brannon
"JohnD" <john_nospam@.tech-testing.com> wrote in message
news:hqpUc.8189$YU1.7939@.newssvr22.news.prodigy.com...
> Hello,
> I'm not sure if this message belongs in microsoft.public.sqlserver.msde
> or is more appropriate here. Please accept my apologies if I have the
> wrong list.
> I've written ODBC source in C++ that accesses an MSDE instance on a
> local machine. I perform the usual steps:
> 1. Allocate an SQLHENV
> 2. Allocate the SQLHDBC
> 3. Connect
> 4. Execute a statement to "use " my database
> 5. Issue a simple query
> 6. Process results
> 7. Disconnect SQLHDBC
> 8. Free SQLHDBC
> 9. Free SQLHENV
> 10. Exit application
> Then I try to attach to the database in SQL Server Enterprise Manager
> which returns the following error:
> "Error 5123: CREATE FILE encountered operating system error 32 (The
> process cannot access the file because it is being used by another
> process.) while attempting to open or create the physical file:
> 'C:\mydb.mdf'.
> Do I need to do something different to force the driver to unload the
> database when the application ends?
> Thanks,
> John|||Brannon Jones wrote:
> Is the database hosted in a different SQL instance, than the one you are
> connecting to in Enterprise Manager?
Yes it is. I'm assuming (really I didn't know this...) that this makes
a different?
The application is using a default SQLSERVER instance and the attaching
is occurring in another DBINSTANCE.|||I don't think you can attach a single database to two different SQL
instances. The first instance that loads the database locks it for
exclusive access. So the second instance that tries to load the database
wont be able to.
Brannon
"JohnD" <john_nospam@.tech-testing.com> wrote in message
news:d6vUc.1687$lY3.1035@.newssvr23.news.prodigy.com...
> Brannon Jones wrote:
> Yes it is. I'm assuming (really I didn't know this...) that this makes
> a different?
> The application is using a default SQLSERVER instance and the attaching
> is occurring in another DBINSTANCE.|||Brannon Jones wrote:

> I don't think you can attach a single database to two different SQL
> instances. The first instance that loads the database locks it for
> exclusive access. So the second instance that tries to load the database
> wont be able to.
Which explains why I have to stop the instance in order for the other
instance to attach to it.
Thank you very much Brannon for the clarification.

Friday, February 24, 2012

Driver

Hi All,
I’m developing a simple program which will connect to a SQL Server
2000, but when I install the SQL Server I got a message inform me that I
cannot complete, once I check the ODBC drivers I cannot find any of them.
I’m using a Win XP home edition, although I’ve tried to install the
MDAC it inform me that it cannot be run in such version.
Any help, Thanks in advance.
Kind Regards,
MohammadWhat version of MDAC did you try to install? Make sure it's
one of the later versions. You probably want to check your
MDAC installation with component checker as well. You can
download the tool and MDAC versions from:
http://msdn.microsoft.com/data/mdac...ds/default.aspx
-Sue
On Tue, 4 Oct 2005 04:25:02 -0700, "Mohammed"
<Mohammed@.discussions.microsoft.com> wrote:

>Hi All,
> Im developing a simple program which will connect to a SQL Server
>2000, but when I install the SQL Server I got a message inform me that I
>cannot complete, once I check the ODBC drivers I cannot find any of them.
> Im using a Win XP home edition, although Ive tried to install the
>MDAC it inform me that it cannot be run in such version.
> Any help, Thanks in advance.
>Kind Regards,
>Mohammad
>

Driver

Hi All,
I’m developing a simple program which will connect to a SQL Server
2000, but when I install the SQL Server I got a message inform me that I
cannot complete, once I check the ODBC drivers I cannot find any of them.
I’m using a Win XP home edition, although I’ve tried to install the
MDAC it inform me that it cannot be run in such version.
Any help, Thanks in advance.
Kind Regards,
Mohammad
What version of MDAC did you try to install? Make sure it's
one of the later versions. You probably want to check your
MDAC installation with component checker as well. You can
download the tool and MDAC versions from:
http://msdn.microsoft.com/data/mdac/...s/default.aspx
-Sue
On Tue, 4 Oct 2005 04:25:02 -0700, "Mohammed"
<Mohammed@.discussions.microsoft.com> wrote:

>Hi All,
> Im developing a simple program which will connect to a SQL Server
>2000, but when I install the SQL Server I got a message inform me that I
>cannot complete, once I check the ODBC drivers I cannot find any of them.
> Im using a Win XP home edition, although Ive tried to install the
>MDAC it inform me that it cannot be run in such version.
> Any help, Thanks in advance.
>Kind Regards,
>Mohammad
>

Drive Space Problem

Hi,
After searching this forum I haven't found a specific answer for my problem.
We have a 2003 server used for sql databases. We are running version 8 w/
service pack 3. What is happening is we are losing on average of 10GB of disk
space a day. If I reboot the server, the space comes back. I have tried some
of things listed in this forum to no avail, i.e. setting the databases
recovery to "simple" instead of "full". The actual .ldf and .mdf files
combined are only around 200 megs and the Log directory has less than 1MB in
it. Is there anything else I can check on the SQL side to eliminate it as
culprit?
Thanks for any help,
Joe Garcia
Perhaps ODBC tracing is turned on? I believe the file is named SQL.LOG.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Joe G" <Joe G@.discussions.microsoft.com> wrote in message
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my problem.
> We have a 2003 server used for sql databases. We are running version 8 w/
> service pack 3. What is happening is we are losing on average of 10GB of disk
> space a day. If I reboot the server, the space comes back. I have tried some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than 1MB in
> it. Is there anything else I can check on the SQL side to eliminate it as
> culprit?
> Thanks for any help,
> Joe Garcia
|||Maybe it is just the tempdb database (it gets cleaned during every restart
of sql server)
Marc
"Joe G" <Joe G@.discussions.microsoft.com> wrote in message
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my
problem.
> We have a 2003 server used for sql databases. We are running version 8 w/
> service pack 3. What is happening is we are losing on average of 10GB of
disk
> space a day. If I reboot the server, the space comes back. I have tried
some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than 1MB
in
> it. Is there anything else I can check on the SQL side to eliminate it as
> culprit?
> Thanks for any help,
> Joe Garcia
|||"Joe G" <Joe G@.discussions.microsoft.com> schrieb im Newsbeitrag
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my
problem.
> We have a 2003 server used for sql databases. We are running version 8
w/
> service pack 3. What is happening is we are losing on average of 10GB of
disk
> space a day. If I reboot the server, the space comes back. I have tried
some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than
1MB in
> it. Is there anything else I can check on the SQL side to eliminate it
as
> culprit?
> Thanks for any help,
> Joe Garcia
You could set your databases to autoshrink.
robert
|||"Robert Klemme" <bob.news@.gmx.net> wrote in message
news:35pb3jF4obuq9U1@.individual.net...
> "Joe G" <Joe G@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> problem.
> w/
> disk
> some
> 1MB in
> as
> You could set your databases to autoshrink.
>
I would recommend against this though.
This can cause disk level file fragmentation. And it would only mask the
real problem.
I'd go for either tempdb or ODBC logging.

> robert
>

Drive Space Problem

Hi,
After searching this forum I haven't found a specific answer for my problem.
We have a 2003 server used for sql databases. We are running version 8 w/
service pack 3. What is happening is we are losing on average of 10GB of disk
space a day. If I reboot the server, the space comes back. I have tried some
of things listed in this forum to no avail, i.e. setting the databases
recovery to "simple" instead of "full". The actual .ldf and .mdf files
combined are only around 200 megs and the Log directory has less than 1MB in
it. Is there anything else I can check on the SQL side to eliminate it as
culprit?
Thanks for any help,
Joe GarciaPerhaps ODBC tracing is turned on? I believe the file is named SQL.LOG.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Joe G" <Joe G@.discussions.microsoft.com> wrote in message
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my problem.
> We have a 2003 server used for sql databases. We are running version 8 w/
> service pack 3. What is happening is we are losing on average of 10GB of disk
> space a day. If I reboot the server, the space comes back. I have tried some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than 1MB in
> it. Is there anything else I can check on the SQL side to eliminate it as
> culprit?
> Thanks for any help,
> Joe Garcia|||Maybe it is just the tempdb database (it gets cleaned during every restart
of sql server)
Marc
"Joe G" <Joe G@.discussions.microsoft.com> wrote in message
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my
problem.
> We have a 2003 server used for sql databases. We are running version 8 w/
> service pack 3. What is happening is we are losing on average of 10GB of
disk
> space a day. If I reboot the server, the space comes back. I have tried
some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than 1MB
in
> it. Is there anything else I can check on the SQL side to eliminate it as
> culprit?
> Thanks for any help,
> Joe Garcia|||"Joe G" <Joe G@.discussions.microsoft.com> schrieb im Newsbeitrag
news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> Hi,
> After searching this forum I haven't found a specific answer for my
problem.
> We have a 2003 server used for sql databases. We are running version 8
w/
> service pack 3. What is happening is we are losing on average of 10GB of
disk
> space a day. If I reboot the server, the space comes back. I have tried
some
> of things listed in this forum to no avail, i.e. setting the databases
> recovery to "simple" instead of "full". The actual .ldf and .mdf files
> combined are only around 200 megs and the Log directory has less than
1MB in
> it. Is there anything else I can check on the SQL side to eliminate it
as
> culprit?
> Thanks for any help,
> Joe Garcia
You could set your databases to autoshrink.
robert|||"Robert Klemme" <bob.news@.gmx.net> wrote in message
news:35pb3jF4obuq9U1@.individual.net...
> "Joe G" <Joe G@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:064FEED9-C3F9-48B2-A5D1-79926005D8E8@.microsoft.com...
> > Hi,
> > After searching this forum I haven't found a specific answer for my
> problem.
> > We have a 2003 server used for sql databases. We are running version 8
> w/
> > service pack 3. What is happening is we are losing on average of 10GB of
> disk
> > space a day. If I reboot the server, the space comes back. I have tried
> some
> > of things listed in this forum to no avail, i.e. setting the databases
> > recovery to "simple" instead of "full". The actual .ldf and .mdf files
> > combined are only around 200 megs and the Log directory has less than
> 1MB in
> > it. Is there anything else I can check on the SQL side to eliminate it
> as
> > culprit?
> >
> > Thanks for any help,
> > Joe Garcia
> You could set your databases to autoshrink.
>
I would recommend against this though.
This can cause disk level file fragmentation. And it would only mask the
real problem.
I'd go for either tempdb or ODBC logging.
> robert
>