Showing posts with label own. Show all posts
Showing posts with label own. Show all posts

Wednesday, March 28, 2012

I don't understand it

Dear all,
I'm executing a DTS which own a sql server task that launch a stored
procedure.
This stored procedure run a WHILE sentence and then launch a bcp command
dinamically.
Well, everything works debugging that stored procedure or simply launch it
throught Query Analyzer with its parameters.
Problem come up when I launch the DTS. That sql server task works but only
launch one time the BCP command.
I know that is very difficult reach to see the exit but...
There goes an excerpt:
set @.cont = 1
Set @.iCont = (select count(*) from tblDownloadKF_Bridge_Info)
WHILE @.cont < @.iCont + 1
begin
set @.table = (select name from tblDownloadKF_Bridge_Info where ID = @.cont)
SET @.bcpCommand= 'bcp ' + @.db + '' + @.table + ' out ' + @.strPath +
Ltrim(RTrim(@.table)) + '.dat -c -S ' + @.host + ' -U ' + @.strUser +' -P '
+
@.strPassword + ''
EXEC @.result = master.dbo.xp_cmdshell @.bcpCommand
if (@.result = 0)
set @.status = 'done'
else
set @.status = 'error'
update tblDownloadKF_Bridge_Info
set Remarks = Ltrim(Rtrim(@.status)),
dateoperation = getdate()
where ID = @.cont
set @.table = ''
set @.cont = @.cont + 1
end
GO
Is there any restriction on that command via DTS'
Thanks so much,Hi Enric,
Your problem is not the BCP command but xp_cmdshell stored procedure.
"INF: How to Run a DTS Package as a Scheduled Job"
http://support.microsoft.com/defaul...kb;en-us;269074
Cristian Lefter, SQL Server MVP
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:0C0CB603-97B8-40B0-9255-D6E3E3F245B3@.microsoft.com...
> Dear all,
> I'm executing a DTS which own a sql server task that launch a stored
> procedure.
> This stored procedure run a WHILE sentence and then launch a bcp command
> dinamically.
> Well, everything works debugging that stored procedure or simply launch it
> throught Query Analyzer with its parameters.
> Problem come up when I launch the DTS. That sql server task works but only
> launch one time the BCP command.
> I know that is very difficult reach to see the exit but...
> There goes an excerpt:
> set @.cont = 1
> Set @.iCont = (select count(*) from tblDownloadKF_Bridge_Info)
> WHILE @.cont < @.iCont + 1
> begin
> set @.table = (select name from tblDownloadKF_Bridge_Info where ID = @.cont)
>
> SET @.bcpCommand= 'bcp ' + @.db + '' + @.table + ' out ' + @.strPath +
> Ltrim(RTrim(@.table)) + '.dat -c -S ' + @.host + ' -U ' + @.strUser +' -P
> ' +
> @.strPassword + ''
> EXEC @.result = master.dbo.xp_cmdshell @.bcpCommand
> if (@.result = 0)
> set @.status = 'done'
> else
> set @.status = 'error'
> update tblDownloadKF_Bridge_Info
> set Remarks = Ltrim(Rtrim(@.status)),
> dateoperation = getdate()
> where ID = @.cont
> set @.table = ''
> set @.cont = @.cont + 1
> end
> GO
>
> Is there any restriction on that command via DTS'
> Thanks so much,

Monday, March 19, 2012

I cannot create a brand new MDF (sql server database) with Visual Basic 2005

Hi everybody:

I go to Server Explorer, right click on Data Connection, input the server name (that is, my own computer), give a new name to the database to create, and then inevitably get the error window saying:

An error occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Provider: Named Pipes Provider, error 40, could not open a conection to SQL Server)

So, how to open a connection to SQL server 2005? I looked in the msdn but found absolutely nothing.

Please help

Paolo

There is a great blog post that discusses common causes of connection errors and the errors that you get when that problem exists. This particular error suggests that SQL Express is not running. Launch SQL Server Configuration Manager and verify that the server is running.

Mike

I cannot create a brand new MDF (sql server database) with Visual Basic 2005

Hi everybody:

I go to Server Explorer, right click on Data Connection, input the server name (that is, my own computer), give a new name to the database to create, and then inevitably get the error window saying:

An error occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Provider: Named Pipes Provider, error 40, could not open a conection to SQL Server)

So, how to open a connection to SQL server 2005? I looked in the msdn but found absolutely nothing.

Please help

Paolo

There is a great blog post that discusses common causes of connection errors and the errors that you get when that problem exists. This particular error suggests that SQL Express is not running. Launch SQL Server Configuration Manager and verify that the server is running.

Mike

Monday, March 12, 2012

I can not connect to a SQL which namespace

I have two computers,which have it's own sql server
computer1 : sql1
computer2 : computer2\sql2 -->( use namespace)
I use computer1 to connect computer2.
And I use "computer2\sql2" with connectstring,but
I can not connect succeed.
On Computer3,My boss use the same way to connect
computer2 ,and then succeed.
I do not know that Why I can not connect to computer2 but
he can.
Is any possible issue?
What is wrong on my computer?
Thank you!!Perhaps you have MDAC 2.5 or earlier on the machine form which you cannot
connect to the named instance?
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Arron" <9144492@.pchome.com.tw> wrote in message
news:1183401c3f5ea$7f1e2420$a101280a@.phx.gbl...
> I have two computers,which have it's own sql server
> computer1 : sql1
> computer2 : computer2\sql2 -->( use namespace)
> I use computer1 to connect computer2.
> And I use "computer2\sql2" with connectstring,but
> I can not connect succeed.
> On Computer3,My boss use the same way to connect
> computer2 ,and then succeed.
> I do not know that Why I can not connect to computer2 but
> he can.
> Is any possible issue?
> What is wrong on my computer?
> Thank you!!

I can not connect to a SQL which namespace

I have two computers,which have it's own sql server
computer1 : sql1
computer2 : computer2\sql2 -->( use namespace)
I use computer1 to connect computer2.
And I use "computer2\sql2" with connectstring,but
I can not connect succeed.
On Computer3,My boss use the same way to connect
computer2 ,and then succeed.
I do not know that Why I can not connect to computer2 but
he can.
Is any possible issue?
What is wrong on my computer?
Thank you!!Perhaps you have MDAC 2.5 or earlier on the machine form which you cannot
connect to the named instance?
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Arron" <9144492@.pchome.com.tw> wrote in message
news:1183401c3f5ea$7f1e2420$a101280a@.phx
.gbl...
> I have two computers,which have it's own sql server
> computer1 : sql1
> computer2 : computer2\sql2 -->( use namespace)
> I use computer1 to connect computer2.
> And I use "computer2\sql2" with connectstring,but
> I can not connect succeed.
> On Computer3,My boss use the same way to connect
> computer2 ,and then succeed.
> I do not know that Why I can not connect to computer2 but
> he can.
> Is any possible issue?
> What is wrong on my computer?
> Thank you!!

Friday, March 9, 2012

I am accessing data using data access pages in IIS 7 to SQL server 2005 Authentication is failin

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

There is another post that had a similar issue...the discussion there may prove to be relevant for you:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=978330&SiteID=1

The important step is to disable Anonymous Authentication on your web server and enable Integrated Windows authentication. This will get the database request running in the context of the user making the web request (as opposed to the context of the default anonymous account).

Note that for data security/privacy reasons, you will probably want to avoid having clients from different companies, etc. sharing the same database and/or tables.

I am accessing data using data access pages in IIS 7 to SQL server 2005 Authentication is fa

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

There is another post that had a similar issue...the discussion there may prove to be relevant for you:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=978330&SiteID=1

The important step is to disable Anonymous Authentication on your web server and enable Integrated Windows authentication. This will get the database request running in the context of the user making the web request (as opposed to the context of the default anonymous account).

Note that for data security/privacy reasons, you will probably want to avoid having clients from different companies, etc. sharing the same database and/or tables.