Showing posts with label guide. Show all posts
Showing posts with label guide. Show all posts

Friday, March 30, 2012

how to construct dynamic sql in stored procedure

Hi Guys.

I want to construct a SQL in stored procedure in the following way. Please guide me how to achive this

CREATE PROCEDURE P_SAMPLE

(

@.P_ONE NVARCHAR(240)

)

AS

BEGIN

DECLARE

@.TMP_CNT INT

BEGIN

EXEC ('SELECT @.TMP_CNT = 1')

-- PRINT @.TMP_CNT

END

END

Regards

Mani

Use sp_executesql to pass/retrive the data to/from dynamic sql. Exec won’t help you here.

Code Snippet

DECLARE @.TMP_CNT INT

DECLARE @.SQL as NVarchar(4000)

DECLARE @.Params as NVarchar(4000)

Set @.SQL = N'SELECT @.TMP_CNT = 1'

Set @.Params = N'@.TMP_CNT as Int OUTPUT'

Exec sp_executesql @.SQL, @.Params, @.TMP_CNT OUTPUT

Select @.TMP_CNT

|||

here is one of the best resource in Dynamic sql

http://www.sommarskog.se/dynamic_sql.html

Madhu

Monday, March 26, 2012

How to connect to a sql-server through internet?

Hi,
after I tried it a few times without success, I'm searching for a step by
step guide how I can realize a odbc-connection to a sql-server through the
internet.
In the local Network where the Server is installed the port 1433 is opened,
directed to the server and I know the WAN-IP-Adress and the Name of the
Computer on which the sql-server is installed.
I don't want to establish the connection through vpn. This works, but when I
am connected to the server through vpn I am not able to work in the clients
local Network.
Do I need anything more? - How do I have to go step by step?
thx in advance for your help and ideas why I'm successless in the past
Hubert
Do you have TCP/IP protocol enabled for the SQL Server? Is it
configured to work with port 1433? All this could be done by using SQL
Server Network Utility.
Leonid.
"Hubert Ball" <Hubert@.Lochkarte.com> wrote in message news:<ceflan$ubm$05$1@.news.t-online.com>...
> Hi,
> after I tried it a few times without success, I'm searching for a step by
> step guide how I can realize a odbc-connection to a sql-server through the
> internet.
> In the local Network where the Server is installed the port 1433 is opened,
> directed to the server and I know the WAN-IP-Adress and the Name of the
> Computer on which the sql-server is installed.
> I don't want to establish the connection through vpn. This works, but when I
> am connected to the server through vpn I am not able to work in the clients
> local Network.
> Do I need anything more? - How do I have to go step by step?
> thx in advance for your help and ideas why I'm successless in the past
> Hubert

Monday, March 19, 2012

How to configure SSRS on DMZ! Help!

Hi all,

Would any please guide me to get SSRS set up on DMZ server please. What are the steps i need to aware of? How will the process work will be same as regular SSRS installation? also what prot or ports i have to open on the firewall side!!

Thanks
Pat

You need to read this article it was great help for me
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/rsdepgd.mspx

http://sqlserver-qa.net/blogs/tools/archive/2007/10/08/how-to-run-reporting-services-2000-and-2005-side-by-side.aspx

How to Configure SQLServer with VSS6.0

I would like to configure Sql Server 2000 with Visual Source Safe 6.0
can any one guide me how to go about ...
atleast URLs that discuss on this work
thanks
SatishHi Satish,
Dint get ur Query Exactly. Looking for something Like this?
http://www.mssqlsourcesafe.com/mssqlXpress_Download.shtm
Best Regards
Thirumal
>--Original Message--
>I would like to configure Sql Server 2000 with Visual
Source Safe 6.0
>can any one guide me how to go about ...
>atleast URLs that discuss on this work
>thanks
>Satish
>
>.
>|||Satish,
There is no direct integration that I know of.
Save database objects such as stored procedures and triggers from Query Analyser or Enterprise Manager or a
Database project to file
Check them in and out from sourcesafe as files.
There have been a few discussions. You might try reading the archives:
http://www.google.com/advanced_group_search?hl=en
with sourcesafe as the subject, searching in microsoft.public.sqlserver.server
Regards
AJ
p.s. You can do mean/clever things like loading / overwriting SQL objects from sourcesafe using .bat files as
a means of enforcing that
developers use sourcesafe - as unlike a filesystem based project, the "sourcecode" is in the database and is
readwrite beyond sourcesafe's control, so it takes a certain discipline to always check the file out before
you modify the object in SQL.
"Satish" <kvensatish@.hotmail.com> wrote in message news:eguWRNrQDHA.2636@.TK2MSFTNGP10.phx.gbl...
> I would like to configure Sql Server 2000 with Visual Source Safe 6.0
> can any one guide me how to go about ...
> atleast URLs that discuss on this work
> thanks
> Satish
>