Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Monday, March 26, 2012

How to connect to remote server

Hi All,

I have created my sql database script using SQL data publishing wizard, now i want to execute the same on my shared hosting database. But i am not getting any option to connect to remote server in SSMSE.

I have developed web based application with back hand as SQL Server 2005, so now i want to execute my script file onto the server. so how i will connect with my server using SSMSE ?

My application is located under www.briskonsales.com/sales

Any idea ?

Thanks,

Jay

You will have to work with your Hosting provider to obtain access through their firewalls to access their SQL Server instance.

|||Is the remote instance a SQL Server Express edition ?

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||

Very few hosting providers will allow you to connect to their server using SSMS; rather they provide their own set of management tools accessable through their site. If you log into your account you will likely find a set of links that take you to the management console for your hosted database. From there you should be able to load the script file that you saved from the DPW and run it to create your objects in the hosted database.

As others mention, contact your hosting provider if you have questions about managing your hosted database.

Mike

how to connect to multiple database?

Is it possible to connect to 3 database and execute a cross db query?

I usually use SqlConnection(connectionString) for a single connection

As I understand, an open SQLConnection will connect to a SQL instance rather than just a SQL database, which means you can perform query on all objects in all databases if you have sufficient permission, just like what you can do in Query Analyzer. Is this what you want? If yes, you can write your query using qualified object name:

select * from db1.dbo.tbl1 as t1 join db2.dbo.tbl2 as t2

on t1.id=t2.id

Monday, March 12, 2012

how to configure a server as distributor

When configuring my SQL Server as a distributor I get the following
error:
Error 14113:Could not execute 'copy "
C:\Program Files\Microsoft SQL Server\MSSQL\DATA\DISTMDL.MDF"
"C:\Program Files\Microsoft SQL Server\MSSQL\DATA\distribution.MDF"'.
Check
'instdist.out' in the install directory
I could not find a file named instdist.out in the install directory.
Please Help!!
Thanks.
The setup will require you to be a system administrator - are you logged on
as one?
Also has the distribution database been created?
Also, check that you have sufficient room for a copy of the distribution
database.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||I've logged in as system administrator.
distmodel database is also there and have sufficient space on my disk.
but still the problem has not been solved.
please show me a way.
thanx
jeff
Paul Ibison wrote:
> The setup will require you to be a system administrator - are you logged on
> as one?
> Also has the distribution database been created?
> Also, check that you have sufficient room for a copy of the distribution
> database.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||I'd set it up manually and see where the issue is:
sp_adddistributor
sp_adddistributiondb
sp_adddistpublisher
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||First disable distribution from the Replication menu
Then try below commands in query analyser
sp_helpserver ( to see server name)
sp_dropserver 'SERVERNAME','DROPLOGINS'
sp_addserver 'SERVERNAME','LOCAL'
Then try creating Distribution again
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:u7Y6pBCBHHA.3540@.TK2MSFTNGP03.phx.gbl...
> I'd set it up manually and see where the issue is:
> sp_adddistributor
> sp_adddistributiondb
> sp_adddistpublisher
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
|||Take the database distmodel to Offline
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

How to configure a job for maintenance plan?

hello, everyone:
I have a maintenane plan to backup user database daily, How to configure a job to execute this plan daily? Thanks
zytLook up SQLMAINT or XP_SQLMAINT in BOL, depending on whether you want to run the job as OS command or T-SQL, respectively.

Friday, March 9, 2012

How to compose the connection String of a SSIS package that execute another package?

Dear All,

I now have two SSIS package, "TESTING" and "LOADING". The "TESTING" package have an execute package task that call the "LOADING" package. When I want to execute the TESTING package, how can I setup the connection string so that I can edit the password of the database connected by the "LOADING" package?

Regards,

Strike

You should use configurations to achieve this. There's plenty of material out there about SSIS configurations if you google it.

-Jamie

|||How about if I want to create a command file so that I can input the password externally in the command prompt?|||

You can pass values into a package via the command-line using the /SET option of dtexec.

If the package that you call is a parent package then you can pass the value through to the child using a parent package configuration.

-Jamie

|||

Hi Jamie,

I would like to know how can I setup the command line in the SQL Server Job Agent for executing the two packages mentioned above? I have already configured the parent variable for the child package. However, I have encountered some errors when executing the job, and I don't know how to set up the path for the child package in the command line as both of the packages are loaded from the SQL server, not from the file system.

Thank you very much!!

Strike Wong

|||For help building command lines, try DTExecUI.exe. Set the options you want, and then look at the Command Line page. You can copy the command from there. Obviously you can execute the package from there as well to check the validity of the command you have built.|||

Is this included in the MS SQL Server 2005?
I can't found it in the directories

|||

Yes -

How to: Run a Package Using the DTExecUI Utility
(http://msdn2.microsoft.com/en-us/library/d827d7b2-2eb6-4f4a-a775-ab00c444c0dd.aspx)

It should be available from a command prompt or the Run dialog, as the Bin folder were it lives should be on your PATH, set as part of the SQL 2005 install.

Sunday, February 19, 2012

How to check which tables were called?

Hello everyone:
I have some nightly jobs that execute stored procedure to call the tables? I want to know which table are called by these stored procedures. Is it possible? Any idea will be appreciated.
Thanks
ZYTLemme get this right, you have a series of stored procedures that run every night, but want a list of the affected tables? basically a listing of the tables in those stored procedures run at night?

Basically, in stead of reading through the SP's and noting the tables used, you want an automation process?|||Yes, I need a table list that are affected in the nightly job/|||Just do sp_depends on all of the stored procedures

USE Northwind
GO

CREATE PROC mySproc99
AS
SELECT * FROM Orders
GO

EXEC sp_depends mySproc99
GO

DROP PROC mySproc99
GO|||...although be aware that this will not show tables referenced in dynamic SQL statements embedded in your procedures.|||True..and if the tables was dropped and recreated it won't show as well..

How about adding some triggers

How to check whether an SSIS package is executing

I have scheduled an SQL Job to run every 15 mins. This runs an SSIS package. But sometimes my package might execute for more than 15 mins. In this case, a second instance of the package would start. I don't want this to happen. So is there any way I can check whether the package is already running before I continue the execution of the same. Right now I am using a mutex to handle this problem. Are there any problems using the mutex and is there a better way to handle this?

Thanks in advance.

Sumesh

have you tried using the sql server profiler?|||Actually the entire process is an automated process. I want my SSIS or the SQL job to check whether an instance it has initiated earlier is not running when the next instance has to be started.|||

Interesting problem. There is no way that I know of to check whether a package is already executing or not. A good way of getting around this is to disable the Agent job at the start of the package and then re-enable it again at the end. I would probably do this even if I *could* check if a package was running or not.

-Jamie

|||Thank you Jamie! But if I disable the job and then re-enable it after the execution of my package, won't the agent wait for another 15 mins before it starts the next execution of the package?|||i recently heard in an msdn webcast that package execution can be monitored in the sql server management studio object explorer, but i haven't tried this.|||

Hi Sumesh,

I think you could use a scripting task and SMO to extract the current run status of the job:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.agent.job.currentrunstatus.aspx

cheers,
Markus