Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Monday, March 19, 2012

Invalid destination path when trying to create distribution database

Hello. I am attempting to add a distribution database to an instance of SQL Server on my local PC. I am using SQL 2005 Developer Edition. I am able to set the instance up as a distributor using the following command:

exec sp_adddistributor @.distributor = N'computername\instancename'

I use the following command to create the distribution database:

exec sp_adddistributiondb @.database = N'distribution', @.data_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data',

@.data_file_size = 4, @.log_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data',

I get the following error when executing that command:

Msg 14430, Level 16, State 1, Procedure sp_adddistributiondb, Line 214

Invalid destination path C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data.

It's not due to permissions on that particular folder. I have tried using other folders, all with the same results. Also, I am an Administrator on the PC, so I have full permissions. I have tried running the SQL Server services as myself and Local System. Same results both times. Co-workers with apparently the same setup are able to create the distribution database without a problem.

Has anybody had this type of problem?

Thanks,

Evan

I executed the same thing above, but different path, and it worked for me. Proc sp_adddistributiondb is raising error 14430 because proc sp_MSget_file_existence cannot locate the path you specified. I'd run a profiler trace to see why this proc cannot locate your path.

Friday, March 9, 2012

'Invalid authorization specification' from IDBInitialize::Initialize (c++)

Hi

I've been trying to connect to my local SQL Server instance (SQL Server 2005) using the SQLNCLI interface from c++ without success. I consistently receive an 'Invalid authorization specification' error (SQL state 28000 and SQL error number 0) when I call IDBInitialize::Initialize to connect to the database. I was hoping someone here could shed some light on this and help me out.

The strange thing is that I get no error if I leave the user blank (L"" in vValue.bstrVal) and try to connect. Also, IDBProperties::SetProperties returns 0 when the user is blank but 40eda when the user is set. This seems to be a message from the pipeline facility but I haven't found the description of the code (0xeda).

The user in the database is configured with no password and I can successfully connect to the server and open the database using that user through Management Studio.

I've also tried using the SQLOLEDB provider with the same results.

Suspecting that I'm setting the properties wrong I include a code snippet below showing how I'm setting the properties:

for (int i = 0; i < sizeof(dbprop) / sizeof(dbprop[0]); i++)
VariantInit(&dbprop[ i ].vValue);

// Server name
dbprop[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
dbprop[0].vValue.vt = VT_BSTR;
dbprop[0].vValue.bstrVal = SysAllocString(L"localhost");
dbprop[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[0].colid = DB_NULLID;

// Database
dbprop[1].dwPropertyID = DBPROP_INIT_CATALOG;
dbprop[1].vValue.vt = VT_BSTR;
dbprop[1].vValue.bstrVal = SysAllocString(L"test");
dbprop[1].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[1].colid = DB_NULLID;

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_INTEGRATED;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

Cheers,
JPProblem solved.

A little bit embarrasing, since I, somehow, misinterpreted the DBPROP_AUTH_INTEGRATED parameter. It should have been DBPROP_AUTH_USERID (of course) instead.

The username propertie now looks like this:

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_USERID;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

and works like a charm.

JP

Friday, February 24, 2012

into clause

hi, how to define the temp table to local, only the current use can see it:
select * from into temp?A single # implies local temp table for the current connection/context. No
other user (on another connection) can access this #temp.
e.g.
select *
into #temp
from tb
-oj
"js" <js@.someone@.hotmail.com> wrote in message
news:OUFrxpBTFHA.1384@.TK2MSFTNGP09.phx.gbl...
> hi, how to define the temp table to local, only the current use can see
> it:
> select * from into temp?
>|||Do:
SELECT * INTO #temp FROM tbl ;
Anith|||select c1, ..., cn
into #local_temp_table
from t1
If you use one # then it is local. Use ## for global temporary.
AMB
"js" wrote:

> hi, how to define the temp table to local, only the current use can see it
:
> select * from into temp?
>
>|||how about if I don't use, global? Thks.
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:EC46D1A7-AF6B-4A95-ADA4-D58372CEF649@.microsoft.com...
> select c1, ..., cn
> into #local_temp_table
> from t1
> If you use one # then it is local. Use ## for global temporary.
>
> AMB
> "js" wrote:
>|||> how about if I don't use, global? Thks.
Can you re-phrase that question?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"js" <js@.someone@.hotmail.com> wrote in message news:urny42BTFHA.2128@.TK2MSFTNGP14.phx.gbl..
.
> how about if I don't use, global? Thks.
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in messag
e
> news:EC46D1A7-AF6B-4A95-ADA4-D58372CEF649@.microsoft.com...
>|||Sorry,
If you use one # then it is local. Use ## for global temporary. how about if
I don't use # or ##(select * into temp from tb1), is it global?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23HSKB8BTFHA.3040@.TK2MSFTNGP10.phx.gbl...
> Can you re-phrase that question?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:urny42BTFHA.2128@.TK2MSFTNGP14.phx.gbl...
>|||Then it is a permanent table (normal one).
AMB
"js" wrote:

> Sorry,
> If you use one # then it is local. Use ## for global temporary. how about
if
> I don't use # or ##(select * into temp from tb1), is it global?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:%23HSKB8BTFHA.3040@.TK2MSFTNGP10.phx.gbl...
>
>|||In SQL Query Analyzer, if i open a new query window, is it a new
connection/context?
"oj" <nospam_ojngo@.home.com> wrote in message
news:eVQ58sBTFHA.3140@.TK2MSFTNGP14.phx.gbl...
>A single # implies local temp table for the current connection/context. No
>other user (on another connection) can access this #temp.
> e.g.
> select *
> into #temp
> from tb
>
> --
> -oj
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:OUFrxpBTFHA.1384@.TK2MSFTNGP09.phx.gbl...
>|||Thanks for the help...
how to check is #temp is already in database?
"oj" <nospam_ojngo@.home.com> wrote in message
news:eVQ58sBTFHA.3140@.TK2MSFTNGP14.phx.gbl...
>A single # implies local temp table for the current connection/context. No
>other user (on another connection) can access this #temp.
> e.g.
> select *
> into #temp
> from tb
>
> --
> -oj
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:OUFrxpBTFHA.1384@.TK2MSFTNGP09.phx.gbl...
>

Sunday, February 19, 2012

Internet explorer lost from server

Gurus--
I am not really sure how it happened but on a small local server that I
admin seems to have lost IE, "The E" is missing, I am running xp pro I
have a connection to msn dsl on this server and had to reload all os and
server due to spyware attack. Since then the "E" is gone I need to have
in order to set up wireless network. How do you reload ie without
running the whole setup again ? Is this possible?
*** Sent via Developersdex http://www.codecomments.com ***
I think this should be posted in one of the windowsXP newsgroups.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Bill" <nospam@.devdex.com> wrote in message
news:OutdtFu8GHA.4476@.TK2MSFTNGP04.phx.gbl...
> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible?
> *** Sent via Developersdex http://www.codecomments.com ***
|||Hi
This does not seem to have anything to do with SQL server so I don't know
why you have posted it to this group. It sounds like your network settings
are incorrect, therefore you need to check them against what they should be.
John
"Bill" wrote:

> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible?
> *** Sent via Developersdex http://www.codecomments.com ***
>

Internet explorer lost from server

Gurus--
I am not really sure how it happened but on a small local server that I
admin seems to have lost IE, "The E" is missing, I am running xp pro I
have a connection to msn dsl on this server and had to reload all os and
server due to spyware attack. Since then the "E" is gone I need to have
in order to set up wireless network. How do you reload ie without
running the whole setup again ? Is this possible'
*** Sent via Developersdex http://www.developersdex.com ***I think this should be posted in one of the windowsXP newsgroups.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Bill" <nospam@.devdex.com> wrote in message
news:OutdtFu8GHA.4476@.TK2MSFTNGP04.phx.gbl...
> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible'
> *** Sent via Developersdex http://www.developersdex.com ***|||Hi
This does not seem to have anything to do with SQL server so I don't know
why you have posted it to this group. It sounds like your network settings
are incorrect, therefore you need to check them against what they should be.
John
"Bill" wrote:
> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible'
> *** Sent via Developersdex http://www.developersdex.com ***
>

Internet explorer lost from server

Gurus--
I am not really sure how it happened but on a small local server that I
admin seems to have lost IE, "The E" is missing, I am running xp pro I
have a connection to msn dsl on this server and had to reload all os and
server due to spyware attack. Since then the "E" is gone I need to have
in order to set up wireless network. How do you reload ie without
running the whole setup again ? Is this possible'
*** Sent via Developersdex http://www.codecomments.com ***I think this should be posted in one of the windowsXP newsgroups.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Bill" <nospam@.devdex.com> wrote in message
news:OutdtFu8GHA.4476@.TK2MSFTNGP04.phx.gbl...
> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible'
> *** Sent via Developersdex http://www.codecomments.com ***|||Hi
This does not seem to have anything to do with SQL server so I don't know
why you have posted it to this group. It sounds like your network settings
are incorrect, therefore you need to check them against what they should be.
John
"Bill" wrote:

> Gurus--
> I am not really sure how it happened but on a small local server that I
> admin seems to have lost IE, "The E" is missing, I am running xp pro I
> have a connection to msn dsl on this server and had to reload all os and
> server due to spyware attack. Since then the "E" is gone I need to have
> in order to set up wireless network. How do you reload ie without
> running the whole setup again ? Is this possible'
> *** Sent via Developersdex http://www.codecomments.com ***
>