Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Friday, March 30, 2012

Running Access XP Macro with script task

I found this and have done everything it says to do, but I can't get the script to compile. Any ideas on how to run a access macro in SSIS?

Baiscally to execute an Access Macros in SSIS package we need to Download

Microsoft.Office.Interop.Access DLL from Office XP PIAs.

Download site

http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en

1) Extract the Microsoft.Office.Interop.Access DLL from Oxppia.exe

2) Drag and Drop Microsoft.Office.Interop.Access DLL to Global Assembley Directory(GAC) ie: C:\WINNT\assembly for Windows 2000 -- C:\WINDOWS\assembly for ( Win Xp and Win 2003)

3) Copy paste Microsoft.Office.Interop.Access to C:\WINNT\Microsoft.NET\Framework\v2.0.50727 for Windows 2000 -- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 ( Win Xp and Win 2003)

4) Add DLL reference in the Script Task

5) Add the below Code

1) Create a New Project in SSIS

2) Drag and Drop Script Task

3) Copy Paste the code in script task editor

Imports Microsoft.Office.Interop.Access

Try

Dim objAccess As New Access.Application

objAccess.OpenCurrentDatabase("D:\TestMacro.mdb", False) ' Add the Access File Path

objAccess.DoCmd.RunMacro("Macro1") ' Replace Macro1 with the name of your macro

objAccess.CloseCurrentDatabase()

objAccess.Quit(Access.AcQuitOption.acQuitSaveNone)

objAccess = Nothing

Catch ex As Exception

System.Windows.Forms.MessageBox.Show(ex.ToString())

End Try

Dts.TaskResult = Dts.Results.Success

I actually figured this out. Had to reference alot more than just the access dll. Below is the final code to get it to work if anyone else wants to do something like this.

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Imports Microsoft.Office.Interop.Access

Imports ADODB

Imports dao

Imports mscomctl

Imports msdatasrc

Imports stdole

Imports Microsoft.Office.Interop

Imports Microsoft.Office.Interop.OWC

PublicClass ScriptMain

' The execution engine calls this method when the task executes.

' To access the object model, use the Dts object. Connections, variables, events,

' and logging features are available as static members of the Dts class.

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

'

' To open Code and Text Editor Help, press F1.

' To open Object Browser, press Ctrl+Alt+J.

PublicSub Main()

'

Try

Dim objAccess AsNew Access.Application

objAccess.OpenCurrentDatabase("D:MyDB.mdb", False) ' Add the Access File Path

objAccess.DoCmd.RunMacro("Macro1") 'Add your Macro name

objAccess.CloseCurrentDatabase()

objAccess.Quit(Access.AcQuitOption.acQuitSaveNone)

objAccess = Nothing

Catch ex As Exception

System.Windows.Forms.MessageBox.Show(ex.ToString())

EndTry

Dts.TaskResult = Dts.Results.Success

EndSub

EndClass

Wednesday, March 28, 2012

running a sql script

how can i run a .sql script from my asp.net project?

thanks,

jbProbably need a little more information. How big is it, how often, is it dynamic, does it take parameters, does the user enter it. Describe the scenario a little|||pdraigh,

it is a very small script. it will create a database and five tables in the database. the largest table having around 15 fields. I would like the user to be able to enter some information on the page, one of those being a database name field. then run the script and create a database with the name being passed from the database name field.

thanks,

JB|||it is a very small script. it will create a database and five tables in the database. the largest table having around 15 fields. I would like the user to be able to enter some information on the page, one of those being a database name field. then run the script and create a database with the name being passed from the database name field.

thanks,

JB

Running a Sql query from Crontab.

Hi,

I want to run a sql query from a crontab.
I hav written a script which enters SQLPLUS , executes the query and directs the output to a flat file.

My problem is when Iam palcing the script in crontab it is throwing an error .But when executed in the prompt ,it is running.

pls give ur suggestions on that.If you don't spell the name of the script correctly, then SQL Plus will throw an error.

As you probably guessed, I'm trying to be funny. ;) Without you providing information about the error being thrown, we have to guess at it. There's a pretty wide area for guessing!

Please be more specific. Cut the error message from the log (SQL Plus output) file, and post it here. If possible (without security or related problems), cut the whole command you are using, and post that here too.

With all of the people that contribute here, I'm sure that someone can help you if you can give them the information that they need to do that!

-PatPsql

running a script which accepts a parameter against SQL2000 database

Hi there,
I'm fairly new to this stuff - I want to write a batch file or small
vbscript app that will aceept a parameter and then insert this into a
simple update command and execute agaisnt a SQL2000 database. andy help
appreciated!!
Cheers,
Paulat this link you can find about connecting to SQL server and adding new
records to a table using ADO
http://www.microsoft.com/technet/scriptcenter/scripts/misc/database/default.mspx?mfr=true
for using command line arguments, this link:
http://www.microsoft.com/technet/scriptcenter/resources/tales/sg0704.mspx
--
urkec
"pauls1888" wrote:
> Hi there,
> I'm fairly new to this stuff - I want to write a batch file or small
> vbscript app that will aceept a parameter and then insert this into a
> simple update command and execute agaisnt a SQL2000 database. andy help
> appreciated!!
> Cheers,
> Paul
>|||Look up batch files, using replaceable parameters, and then using SQL Server
Books Online, check out osql.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"pauls1888" <pauls1888@.gmail.com> wrote in message
news:1164726964.399837.44300@.45g2000cws.googlegroups.com...
> Hi there,
> I'm fairly new to this stuff - I want to write a batch file or small
> vbscript app that will aceept a parameter and then insert this into a
> simple update command and execute agaisnt a SQL2000 database. andy help
> appreciated!!
> Cheers,
> Paul
>|||Thanks for the help guys

running a script which accepts a parameter against SQL2000 database

Hi there,
I'm fairly new to this stuff - I want to write a batch file or small
vbscript app that will aceept a parameter and then insert this into a
simple update command and execute agaisnt a SQL2000 database. andy help
appreciated!!
Cheers,
Paul
at this link you can find about connecting to SQL server and adding new
records to a table using ADO
http://www.microsoft.com/technet/scriptcenter/scripts/misc/database/default.mspx?mfr=true
for using command line arguments, this link:
http://www.microsoft.com/technet/scriptcenter/resources/tales/sg0704.mspx
urkec
"pauls1888" wrote:

> Hi there,
> I'm fairly new to this stuff - I want to write a batch file or small
> vbscript app that will aceept a parameter and then insert this into a
> simple update command and execute agaisnt a SQL2000 database. andy help
> appreciated!!
> Cheers,
> Paul
>
|||Look up batch files, using replaceable parameters, and then using SQL Server
Books Online, check out osql.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"pauls1888" <pauls1888@.gmail.com> wrote in message
news:1164726964.399837.44300@.45g2000cws.googlegrou ps.com...
> Hi there,
> I'm fairly new to this stuff - I want to write a batch file or small
> vbscript app that will aceept a parameter and then insert this into a
> simple update command and execute agaisnt a SQL2000 database. andy help
> appreciated!!
> Cheers,
> Paul
>
|||Thanks for the help guys
sql

running a script which accepts a parameter against SQL2000 database

Hi there,
I'm fairly new to this stuff - I want to write a batch file or small
vbscript app that will aceept a parameter and then insert this into a
simple update command and execute agaisnt a SQL2000 database. andy help
appreciated!!
Cheers,
PaulLook up batch files, using replaceable parameters, and then using SQL Server
Books Online, check out osql.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"pauls1888" <pauls1888@.gmail.com> wrote in message
news:1164726964.399837.44300@.45g2000cws.googlegroups.com...
> Hi there,
> I'm fairly new to this stuff - I want to write a batch file or small
> vbscript app that will aceept a parameter and then insert this into a
> simple update command and execute agaisnt a SQL2000 database. andy help
> appreciated!!
> Cheers,
> Paul
>|||Thanks for the help guys

running a script to create a database in MSDE

I've been able to create a CD where it installs MSDE 2000
sp3 on a user machine. I need to create a database on the
users machine, how do I incorporate the SQL script to
create the database? Do I call the script within the
setup.ini file? Any sample anywhere I can take a look at?
Thank you,
Randers
hi Randers,
Randers wrote:
> I've been able to create a CD where it installs MSDE 2000
> sp3 on a user machine. I need to create a database on the
> users machine, how do I incorporate the SQL script to
> create the database? Do I call the script within the
> setup.ini file? Any sample anywhere I can take a look at?
> Thank you,
> Randers
unfortunately is not that easy as you are trying to do... nothing from the
box...
you can perhaps run oSql.exe to execute your DDL sql script, or a home built
app of yours you pass the path to your script and execute it via an
ADO/Ado.Net connection, or have a look at
http://msdn.microsoft.com/msdnmag/is...baseinstaller/ for
a custom made database installation task...
another approach is relying on tools such as
http://www.red-gate.com/sql/sql_packager.htm
or you could redistribute a full backup of your database made on your
distribution environment and, via osql.exe and/or a home built app of yours
relying on ADO/Ado.Net connection restore it on the destination instance...
the very same path could be performed using the .Mdf and .Ldf detached
database files and reattache them using sp_attach_db system stored
procedures...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Running a Script in DTS

I'm new to DTS.
The task that I want to do is that I want to run a SQL Script from DTS. I know that there is Execute SQL Task for the same purpose.

But my problem is that the Script that i have to run will be in a file and I have to first read the file in DTS.then execute the contents of the file.

The script file may contain :
create database SOMEDB

create table Table1 ( Col1 varchar(10), col2 int)

I tried to use the DTS file handling but when i try to create a FileSystemObject it gives me the error that it cannot create FileSystemObject. And even if i am able to read the File using the FileSystemObject how would I run what I have read.

Can you help me out.

If this is a DTS question (which I think it is) then you are in the wrong place. Hop over to microsoft.public.sqlserver.dts

This is an SSIS forum. SSIS is the successor to DTS.

If this is a question about SSIS then what you want can easily be achieved using the Execute SQL Task which is able to take the statement/script that is going to execute from a file. Just change the SQLSourceType property to "File connection".

-Jamie

Monday, March 26, 2012

Running a package from another computer with DTSRunUI

I set up a package with runs from a batch file on my computer after creating
the script with DTSRunUI. I cannot run it on another computer. Do I have t
o
copy DTSRun.exe to the other computer with the related rll files to get it t
o
run ? Is there a recommended way to do this ?It sounds like you are looking for the steps on
redistributing DTS. You can find information on this in the
Redist.txt file on the installation CD/DVD for SQL Server.
The dts.com web site has a great article on redistribution:
Redistributing DTS with your program
http://www.sqldts.com/default.aspx?225
-Sue
On Wed, 16 Aug 2006 10:12:02 -0700, rmcompute
<rmcompute@.discussions.microsoft.com> wrote:

>I set up a package with runs from a batch file on my computer after creatin
g
>the script with DTSRunUI. I cannot run it on another computer. Do I have
to
>copy DTSRun.exe to the other computer with the related rll files to get it
to
>run ? Is there a recommended way to do this ?

Running a DTS

Hi there
I've been trying to do this all w and it's driving me mad !
All I want to do is run a DTS import from a SQL script. When it's run
manually it takes 15 seconds.
The Dts is called "DTS_LisImport"
The DB is "sqlReleaseTwo"
I'm running SQL7
Many thanks
Paul.try
[url]http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_11959518.html[/ur
l]
"Paul in Harrow" <PaulinHarrow@.discussions.microsoft.com> wrote in message
news:D0CC5A4A-5E73-4A91-A17C-344852ED2F7D@.microsoft.com...
> Hi there
> I've been trying to do this all w and it's driving me mad !
> All I want to do is run a DTS import from a SQL script. When it's run
> manually it takes 15 seconds.
> The Dts is called "DTS_LisImport"
> The DB is "sqlReleaseTwo"
> I'm running SQL7
> Many thanks
> Paul.
>|||See if this helps: http://www.sqldts.com/default.aspx?210
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Paul in Harrow" <PaulinHarrow@.discussions.microsoft.com> wrote in message
news:D0CC5A4A-5E73-4A91-A17C-344852ED2F7D@.microsoft.com...
Hi there
I've been trying to do this all w and it's driving me mad !
All I want to do is run a DTS import from a SQL script. When it's run
manually it takes 15 seconds.
The Dts is called "DTS_LisImport"
The DB is "sqlReleaseTwo"
I'm running SQL7
Many thanks
Paul.|||Tried something different:
Use msdb
execute sp_start_job @.job_id= "7B42CBCD-A615-4CF4-B204-8FE4A31E65B1"
[Open sysjobs_view in msdb to get the job_id]
gives me: "Job 'DTS__LisImport' started successfully."
Is there a sp_run_job anywhere?
Paul

Running a batch command using scheduler

Hi,

I have a batch file that runs an isql script. The sql accepts command line arguments as parameters. I want to invoke this batch file using windows scheduler. How do I pass parameters to my sql? Somebody please help.

Thanks.

I am not sure about the batch file idea, but SQL server has a job scheduler built in called sql agent. You would be much better using this to call a stored procedure and pass in the arguments. To get you started, try this:

http://msdn2.microsoft.com/en-us/library(d=robot)/ms189237.aspx

Otherwise, why not replace your batch file with a .NET console application that takes command line parameters and passes them to a stored procedure call. Batch files are old, and while they still have some uses, there are much better ways of achieving what you are trying to do in an easier way, which gives you more power and flexibility.

There is a way to run sql scripts from the commandline using an exe supplied with sql server. For information on this, check out:

http://msdn2.microsoft.com/en-us/library/ms170207.aspx

HTH

For more T-SQL tips, check out my home page:|||Thanks for the reply :)

Running a .vbs script as a job

I have created a .vbs scripted that i've tested and works fine when i run it on it's own but when i try to run it as a job on my SQL 2005 i get this error:

Message
Executed as user: OESCCA\MKIMONOS-IT$. Error Code: 0 Error Source= Microsoft VBScript compilation error Error Description: Expected statement Error on Line 0. The step failed.

The Step Type is "ActiveX Script"

i have selected the VBScript Radio button and this is the command

"C:\ESG_COM\WorkFlowProcessorLogFileJanitor.vbs" " C:\ESG_COM\"

the " C:\ESG_COM\" is the directory path of the folder it should process.

Thanks

Marios

Marios,

You would put the code in the vbs file - the script code itself - in an ActiveX Script job.

If you want to execute a vbs script file, you would use a CmdExec job step - you'd execute the script with a command along the lines of:

CScript.exe /NOLOGO C:\YourPath\YourScript.vbs

-Sue

|||

Hey Sue

i tried executing the script with CmdExec but it said this is not a valid 32 app

i didn't realized i had to first put CScript.exe /NOLOGO ... what does that do?

Thanks!!

Marios

|||

Hi Marios,

Cscript.exe is just the command line based host for windows scripts. The /NOLOGO suppresses the banner that you get when you run a script through Cscript.

You can see the options for the exe by typing the following at the command prompt: cscript /?

-Sue

Friday, March 23, 2012

running .sql script from command line

how do I run a file with an .sql extension from the command window in windows 2k server?
Hi,
Use OSQL utility from command prompt
OSQL -SSERVER_NAME -Uuser -Ppassword -d db_name -i file_name.sql -o
output.log
Thanks
Hari
MCDBA
"joel" <anonymous@.discussions.microsoft.com> wrote in message
news:0FB9BC49-83D4-416D-889C-00A024A07079@.microsoft.com...
> how do I run a file with an .sql extension from the command window in
windows 2k server?

Wednesday, March 21, 2012

Run trace script

Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,What's the interval for sampling the perofmance data, in your alert? Could
it be that when the alert is checking the CPU utilisation, the CPU was not
really running above the threshold?
How is the alert supposed to invoke the trace? Are you using a OSQL?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108700587.482182.134100@.l41g2000cwc.googlegroups.com...
Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,|||Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,|||You mean, you provided a path to your .sql file where your sql commands are
stored? Then it will not work. See OSQL in SQL Server Books Online. It can
take your script file and server details as parameters and run your script
against the specified server.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108736989.524985.277180@.l41g2000cwc.googlegroups.com...
Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,|||Vyas,
Let me explain to you clearly now. I have 2 files name below:
1. RunOSQL.SQL
This file has this OSQL syntax below
"OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
The RunOSQL.SQL file is the file I provide the with a valid path on
the Action tab of alert.
2. The input file is the file to create trace when CPU utilization hits
over threshold
Both these files are located in C drive.
But when I inserted millions rows into a temp table the CPU ran at 100%
and the script never get executed. I think, I have to make this SQL
script to be a cmd, exe or bat file before it can call another script
to get executed.
Please let me know what I am missing now.
Thanks,
Silaphet,|||Name the file containing the OSQL.EXE call as a .BAT file. For example,
RunScript.bat
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108751013.930610.13850@.c13g2000cwb.googlegroups.com...
> Vyas,
> Let me explain to you clearly now. I have 2 files name below:
> 1. RunOSQL.SQL
> This file has this OSQL syntax below
> "OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
> The RunOSQL.SQL file is the file I provide the with a valid path on
> the Action tab of alert.
> 2. The input file is the file to create trace when CPU utilization hits
> over threshold
> Both these files are located in C drive.
> But when I inserted millions rows into a temp table the CPU ran at 100%
> and the script never get executed. I think, I have to make this SQL
> script to be a cmd, exe or bat file before it can call another script
> to get executed.
>
> Please let me know what I am missing now.
> Thanks,
> Silaphet,
>

Run trace script

Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,
What's the interval for sampling the perofmance data, in your alert? Could
it be that when the alert is checking the CPU utilisation, the CPU was not
really running above the threshold?
How is the alert supposed to invoke the trace? Are you using a OSQL?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108700587.482182.134100@.l41g2000cwc.googlegr oups.com...
Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,
|||Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,
|||You mean, you provided a path to your .sql file where your sql commands are
stored? Then it will not work. See OSQL in SQL Server Books Online. It can
take your script file and server details as parameters and run your script
against the specified server.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108736989.524985.277180@.l41g2000cwc.googlegr oups.com...
Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,
|||Vyas,
Let me explain to you clearly now. I have 2 files name below:
1. RunOSQL.SQL
This file has this OSQL syntax below
"OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
The RunOSQL.SQL file is the file I provide the with a valid path on
the Action tab of alert.
2. The input file is the file to create trace when CPU utilization hits
over threshold
Both these files are located in C drive.
But when I inserted millions rows into a temp table the CPU ran at 100%
and the script never get executed. I think, I have to make this SQL
script to be a cmd, exe or bat file before it can call another script
to get executed.
Please let me know what I am missing now.
Thanks,
Silaphet,
|||Name the file containing the OSQL.EXE call as a .BAT file. For example,
RunScript.bat
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108751013.930610.13850@.c13g2000cwb.googlegro ups.com...
> Vyas,
> Let me explain to you clearly now. I have 2 files name below:
> 1. RunOSQL.SQL
> This file has this OSQL syntax below
> "OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
> The RunOSQL.SQL file is the file I provide the with a valid path on
> the Action tab of alert.
> 2. The input file is the file to create trace when CPU utilization hits
> over threshold
> Both these files are located in C drive.
> But when I inserted millions rows into a temp table the CPU ran at 100%
> and the script never get executed. I think, I have to make this SQL
> script to be a cmd, exe or bat file before it can call another script
> to get executed.
>
> Please let me know what I am missing now.
> Thanks,
> Silaphet,
>
sql

Run trace script

Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,What's the interval for sampling the perofmance data, in your alert? Could
it be that when the alert is checking the CPU utilisation, the CPU was not
really running above the threshold?
How is the alert supposed to invoke the trace? Are you using a OSQL?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108700587.482182.134100@.l41g2000cwc.googlegroups.com...
Hi All,
I really need help to fix this issue. Below is what I am trying to do.
I created a trace template and script it out to be a SQL script file. I
want to run this script when CPU utilizes at over 50 or 60 or higher. I
set up an System Moniter Alert to run this script when CPU runs meet
above threshold. However, when I manipulated data in Query Analyzer to
make CPU utilize at 100% but trace script never get kick off.
The ideal task is, I wanted to capture what is running on my box when
CPU runs at 50% or higher.
Please let me know and provide me any instructions on what I'm missing.
Thanks,
Silaphet,|||Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,|||You mean, you provided a path to your .sql file where your sql commands are
stored? Then it will not work. See OSQL in SQL Server Books Online. It can
take your script file and server details as parameters and run your script
against the specified server.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108736989.524985.277180@.l41g2000cwc.googlegroups.com...
Hi Vyas,
The interval was 2 for sampling data and the unit was seconds. While
the alert was running, I manipulated data to insert into a table in
millions rows from Query Analyzer. At that time, I watched the CPU and
it was 100% for at least 5 seconds to complete. I though, when CPU ran
over the threshold the alert should kick off the trace script file to
capture the SQL statements that I inserted data into table as I
explained above.
In the alert, there is a tab called "ACTION" and has option check box
says 'run this program'. I checked this option with valid path where I
store my strace script file.
Do I need to convert my trace script SQL file to be cmd or executable
file before alert can kick it of?
Please let me know what do I have to do to remedy this issue.
Thanks,
Silaphet,|||Vyas,
Let me explain to you clearly now. I have 2 files name below:
1. RunOSQL.SQL
This file has this OSQL syntax below
"OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
The RunOSQL.SQL file is the file I provide the with a valid path on
the Action tab of alert.
2. The input file is the file to create trace when CPU utilization hits
over threshold
Both these files are located in C drive.
But when I inserted millions rows into a temp table the CPU ran at 100%
and the script never get executed. I think, I have to make this SQL
script to be a cmd, exe or bat file before it can call another script
to get executed.
Please let me know what I am missing now.
Thanks,
Silaphet,|||Name the file containing the OSQL.EXE call as a .BAT file. For example,
RunScript.bat
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Silaphet" <kmounkhaty@.cox.net> wrote in message
news:1108751013.930610.13850@.c13g2000cwb.googlegroups.com...
> Vyas,
> Let me explain to you clearly now. I have 2 files name below:
> 1. RunOSQL.SQL
> This file has this OSQL syntax below
> "OSQL -Sserver\Instance -Usa -Ppassword -iInputfile
> The RunOSQL.SQL file is the file I provide the with a valid path on
> the Action tab of alert.
> 2. The input file is the file to create trace when CPU utilization hits
> over threshold
> Both these files are located in C drive.
> But when I inserted millions rows into a temp table the CPU ran at 100%
> and the script never get executed. I think, I have to make this SQL
> script to be a cmd, exe or bat file before it can call another script
> to get executed.
>
> Please let me know what I am missing now.
> Thanks,
> Silaphet,
>

Run SQL T-SQL Job Step across Different Domains

I have two sql 2005 servers in two different domains. I have a SQL job on
one of the servers that runs a T-SQL script that accesses databases on the
SQL box inthe other domain.
I'm getting a message in the job history that the job won't run because of
the security context.
How can I set this up?
Thanks for your help.
--
MWDWhat Operating Systems are these two servers running?
What trusts, if any, are set up between the two domains?
How are you trying to connect?
What is the exact error number and error message?
-Sue
On Thu, 9 Aug 2007 08:10:09 -0700, MWD
<MWD@.discussions.microsoft.com> wrote:

>I have two sql 2005 servers in two different domains. I have a SQL job on
>one of the servers that runs a T-SQL script that accesses databases on the
>SQL box inthe other domain.
>I'm getting a message in the job history that the job won't run because of
>the security context.
>How can I set this up?
>Thanks for your help.sql

run sql script on sql server2000

dear all i am using ASP.net ,c# and SQL server 2000. i have create all
table, stored procedure .views in my application which is running well
in localhost but now i want to deploy it on server. for that pupose i
need to create all table, stored procedure, views on the domain server
database. can any one tell me how i can do it?
Do you have the DDL in script files? Or do you just want to transfer the database on your local
database as is to the server?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegro ups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>
|||Hi,
Easy option is :-
1. Backup the database in your machine [Use Backup Database]
2. Copy the backup file to Domain server
3. Restore the database [Use Restore Database command]
4. If you do not want the data then Truncate the contents of all tables.
follow the parent chld relationship
while truncating table.
Alternative is ... In the local sql server .. open enterprise manager..
Select database .. right click-- all tasks-- Generate SQL Scripts...
choose all objects , all dependant objects -- permissions...Script it as a
SQL file. Then you could use this script to create
objects in Domain sql server.
Thanks
Hari
SQL Server MVP
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegro ups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> is
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>
|||but i am not having access of enterprise manager of domain server. i
need to run it only programatically.
Hari Prasad wrote:[vbcol=seagreen]
> Hi,
> Easy option is :-
> 1. Backup the database in your machine [Use Backup Database]
> 2. Copy the backup file to Domain server
> 3. Restore the database [Use Restore Database command]
> 4. If you do not want the data then Truncate the contents of all tables.
> follow the parent chld relationship
> while truncating table.
> Alternative is ... In the local sql server .. open enterprise manager..
> Select database .. right click-- all tasks-- Generate SQL Scripts...
> choose all objects , all dependant objects -- permissions...Script it as a
> SQL file. Then you could use this script to create
> objects in Domain sql server.
>
> Thanks
> Hari
> SQL Server MVP
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159607442.786501.105340@.e3g2000cwe.googlegro ups.com...
|||> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
From what programming language?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159939062.047937.268110@.k70g2000cwa.googlegr oups.com...
> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
> Hari Prasad wrote:
>
|||In asp.net using C#.net
Tibor Karaszi wrote:[vbcol=seagreen]
> From what programming language?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159939062.047937.268110@.k70g2000cwa.googlegr oups.com...
|||Read the file from your code, take the SQL from the file you read and put it in a command object.
Whenever you reach GO in the script file, execute what you have in the command object using
ExecuteNonQuery.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160023668.433979.75200@.i42g2000cwa.googlegro ups.com...
> In asp.net using C#.net
> Tibor Karaszi wrote:
>
|||ok fine it is working but how i can transfer data from local to domain
server.
Tibor Karaszi wrote:[vbcol=seagreen]
> Read the file from your code, take the SQL from the file you read and put it in a command object.
> Whenever you reach GO in the script file, execute what you have in the command object using
> ExecuteNonQuery.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160023668.433979.75200@.i42g2000cwa.googlegro ups.com...
|||I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
Servers?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160108798.342356.275430@.e3g2000cwe.googlegro ups.com...
> ok fine it is working but how i can transfer data from local to domain
> server.
> --
> Tibor Karaszi wrote:
>
|||i am having data at my local sql server but i need to transfer it on
domain sql server. but i don't have direct access of domain enterprise
manager or query analyzer i am having only DSN Name uid and pwd.
Tibor Karaszi wrote:[vbcol=seagreen]
> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
> Servers?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160108798.342356.275430@.e3g2000cwe.googlegro ups.com...

run sql script on sql server2000

dear all i am using ASP.net ,c# and SQL server 2000. i have create all
table, stored procedure .views in my application which is running well
in localhost but now i want to deploy it on server. for that pupose i
need to create all table, stored procedure, views on the domain server
database. can any one tell me how i can do it?Do you have the DDL in script files? Or do you just want to transfer the dat
abase on your local
database as is to the server?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>|||Hi,
Easy option is :-
1. Backup the database in your machine [Use Backup Database]
2. Copy the backup file to Domain server
3. Restore the database [Use Restore Database command]
4. If you do not want the data then Truncate the contents of all tables.
follow the parent chld relationship
while truncating table.
Alternative is ... In the local sql server .. open enterprise manager..
Select database .. right click-- all tasks-- Generate SQL Scripts...
choose all objects , all dependant objects -- permissions...Script it as a
SQL file. Then you could use this script to create
objects in Domain sql server.
Thanks
Hari
SQL Server MVP
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> is
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>|||but i am not having access of enterprise manager of domain server. i
need to run it only programatically.
Hari Prasad wrote:[vbcol=seagreen]
> Hi,
> Easy option is :-
> 1. Backup the database in your machine [Use Backup Database]
> 2. Copy the backup file to Domain server
> 3. Restore the database [Use Restore Database command]
> 4. If you do not want the data then Truncate the contents of all tables.
> follow the parent chld relationship
> while truncating table.
> Alternative is ... In the local sql server .. open enterprise manager..
> Select database .. right click-- all tasks-- Generate SQL Scripts...
> choose all objects , all dependant objects -- permissions...Script it as a
> SQL file. Then you could use this script to create
> objects in Domain sql server.
>
> Thanks
> Hari
> SQL Server MVP
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...|||> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
From what programming language?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
> Hari Prasad wrote:
>|||In asp.net using C#.net
Tibor Karaszi wrote:[vbcol=seagreen]
> From what programming language?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...|||Read the file from your code, take the SQL from the file you read and put it
in a command object.
Whenever you reach GO in the script file, execute what you have in the comma
nd object using
ExecuteNonQuery.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> In asp.net using C#.net
> Tibor Karaszi wrote:
>|||ok fine it is working but how i can transfer data from local to domain
server.
Tibor Karaszi wrote:[vbcol=seagreen]
> Read the file from your code, take the SQL from the file you read and put
it in a command object.
> Whenever you reach GO in the script file, execute what you have in the com
mand object using
> ExecuteNonQuery.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...|||I'm not sure what you are asking here. What data do you refer to, where is i
t? Between two SQL
Servers?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> ok fine it is working but how i can transfer data from local to domain
> server.
> --
> Tibor Karaszi wrote:
>|||i am having data at my local sql server but i need to transfer it on
domain sql server. but i don't have direct access of domain enterprise
manager or query analyzer i am having only DSN Name uid and pwd.
Tibor Karaszi wrote:[vbcol=seagreen]
> I'm not sure what you are asking here. What data do you refer to, where is
it? Between two SQL
> Servers?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...

run sql script on sql server2000

dear all i am using ASP.net ,c# and SQL server 2000. i have create all
table, stored procedure .views in my application which is running well
in localhost but now i want to deploy it on server. for that pupose i
need to create all table, stored procedure, views on the domain server
database. can any one tell me how i can do it?Do you have the DDL in script files? Or do you just want to transfer the database on your local
database as is to the server?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>|||Hi,
Easy option is :-
1. Backup the database in your machine [Use Backup Database]
2. Copy the backup file to Domain server
3. Restore the database [Use Restore Database command]
4. If you do not want the data then Truncate the contents of all tables.
follow the parent chld relationship
while truncating table.
Alternative is ... In the local sql server .. open enterprise manager..
Select database .. right click-- all tasks-- Generate SQL Scripts...
choose all objects , all dependant objects -- permissions...Script it as a
SQL file. Then you could use this script to create
objects in Domain sql server.
Thanks
Hari
SQL Server MVP
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> table, stored procedure .views in my application which is running well
> in localhost but now i want to deploy it on server. for that pupose i
> is
> need to create all table, stored procedure, views on the domain server
> database. can any one tell me how i can do it?
>|||but i am not having access of enterprise manager of domain server. i
need to run it only programatically.
Hari Prasad wrote:
> Hi,
> Easy option is :-
> 1. Backup the database in your machine [Use Backup Database]
> 2. Copy the backup file to Domain server
> 3. Restore the database [Use Restore Database command]
> 4. If you do not want the data then Truncate the contents of all tables.
> follow the parent chld relationship
> while truncating table.
> Alternative is ... In the local sql server .. open enterprise manager..
> Select database .. right click-- all tasks-- Generate SQL Scripts...
> choose all objects , all dependant objects -- permissions...Script it as a
> SQL file. Then you could use this script to create
> objects in Domain sql server.
>
> Thanks
> Hari
> SQL Server MVP
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >
> > table, stored procedure .views in my application which is running well
> > in localhost but now i want to deploy it on server. for that pupose i
> > is
> > need to create all table, stored procedure, views on the domain server
> >
> > database. can any one tell me how i can do it?
> >|||> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
From what programming language?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> but i am not having access of enterprise manager of domain server. i
> need to run it only programatically.
> Hari Prasad wrote:
>> Hi,
>> Easy option is :-
>> 1. Backup the database in your machine [Use Backup Database]
>> 2. Copy the backup file to Domain server
>> 3. Restore the database [Use Restore Database command]
>> 4. If you do not want the data then Truncate the contents of all tables.
>> follow the parent chld relationship
>> while truncating table.
>> Alternative is ... In the local sql server .. open enterprise manager..
>> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> choose all objects , all dependant objects -- permissions...Script it as a
>> SQL file. Then you could use this script to create
>> objects in Domain sql server.
>>
>> Thanks
>> Hari
>> SQL Server MVP
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >
>> > table, stored procedure .views in my application which is running well
>> > in localhost but now i want to deploy it on server. for that pupose i
>> > is
>> > need to create all table, stored procedure, views on the domain server
>> >
>> > database. can any one tell me how i can do it?
>> >
>|||In asp.net using C#.net
Tibor Karaszi wrote:
> > but i am not having access of enterprise manager of domain server. i
> > need to run it only programatically.
> From what programming language?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> > but i am not having access of enterprise manager of domain server. i
> > need to run it only programatically.
> > Hari Prasad wrote:
> >> Hi,
> >>
> >> Easy option is :-
> >>
> >> 1. Backup the database in your machine [Use Backup Database]
> >> 2. Copy the backup file to Domain server
> >> 3. Restore the database [Use Restore Database command]
> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> follow the parent chld relationship
> >> while truncating table.
> >>
> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> SQL file. Then you could use this script to create
> >> objects in Domain sql server.
> >>
> >>
> >> Thanks
> >> Hari
> >> SQL Server MVP
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >
> >> > table, stored procedure .views in my application which is running well
> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> > is
> >> > need to create all table, stored procedure, views on the domain server
> >> >
> >> > database. can any one tell me how i can do it?
> >> >
> >|||Read the file from your code, take the SQL from the file you read and put it in a command object.
Whenever you reach GO in the script file, execute what you have in the command object using
ExecuteNonQuery.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> In asp.net using C#.net
> Tibor Karaszi wrote:
>> > but i am not having access of enterprise manager of domain server. i
>> > need to run it only programatically.
>> From what programming language?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> > but i am not having access of enterprise manager of domain server. i
>> > need to run it only programatically.
>> > Hari Prasad wrote:
>> >> Hi,
>> >>
>> >> Easy option is :-
>> >>
>> >> 1. Backup the database in your machine [Use Backup Database]
>> >> 2. Copy the backup file to Domain server
>> >> 3. Restore the database [Use Restore Database command]
>> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> follow the parent chld relationship
>> >> while truncating table.
>> >>
>> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> SQL file. Then you could use this script to create
>> >> objects in Domain sql server.
>> >>
>> >>
>> >> Thanks
>> >> Hari
>> >> SQL Server MVP
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >
>> >> > table, stored procedure .views in my application which is running well
>> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> > is
>> >> > need to create all table, stored procedure, views on the domain server
>> >> >
>> >> > database. can any one tell me how i can do it?
>> >> >
>> >
>|||ok fine it is working but how i can transfer data from local to domain
server.
--
Tibor Karaszi wrote:
> Read the file from your code, take the SQL from the file you read and put it in a command object.
> Whenever you reach GO in the script file, execute what you have in the command object using
> ExecuteNonQuery.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> > In asp.net using C#.net
> >
> > Tibor Karaszi wrote:
> >> > but i am not having access of enterprise manager of domain server. i
> >> > need to run it only programatically.
> >>
> >> From what programming language?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> >> > but i am not having access of enterprise manager of domain server. i
> >> > need to run it only programatically.
> >> > Hari Prasad wrote:
> >> >> Hi,
> >> >>
> >> >> Easy option is :-
> >> >>
> >> >> 1. Backup the database in your machine [Use Backup Database]
> >> >> 2. Copy the backup file to Domain server
> >> >> 3. Restore the database [Use Restore Database command]
> >> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> >> follow the parent chld relationship
> >> >> while truncating table.
> >> >>
> >> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> >> SQL file. Then you could use this script to create
> >> >> objects in Domain sql server.
> >> >>
> >> >>
> >> >> Thanks
> >> >> Hari
> >> >> SQL Server MVP
> >> >>
> >> >>
> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >> >
> >> >> > table, stored procedure .views in my application which is running well
> >> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> >> > is
> >> >> > need to create all table, stored procedure, views on the domain server
> >> >> >
> >> >> > database. can any one tell me how i can do it?
> >> >> >
> >> >
> >|||I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
Servers?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> ok fine it is working but how i can transfer data from local to domain
> server.
> --
> Tibor Karaszi wrote:
>> Read the file from your code, take the SQL from the file you read and put it in a command object.
>> Whenever you reach GO in the script file, execute what you have in the command object using
>> ExecuteNonQuery.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
>> > In asp.net using C#.net
>> >
>> > Tibor Karaszi wrote:
>> >> > but i am not having access of enterprise manager of domain server. i
>> >> > need to run it only programatically.
>> >>
>> >> From what programming language?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> >> > but i am not having access of enterprise manager of domain server. i
>> >> > need to run it only programatically.
>> >> > Hari Prasad wrote:
>> >> >> Hi,
>> >> >>
>> >> >> Easy option is :-
>> >> >>
>> >> >> 1. Backup the database in your machine [Use Backup Database]
>> >> >> 2. Copy the backup file to Domain server
>> >> >> 3. Restore the database [Use Restore Database command]
>> >> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> >> follow the parent chld relationship
>> >> >> while truncating table.
>> >> >>
>> >> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> >> SQL file. Then you could use this script to create
>> >> >> objects in Domain sql server.
>> >> >>
>> >> >>
>> >> >> Thanks
>> >> >> Hari
>> >> >> SQL Server MVP
>> >> >>
>> >> >>
>> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >> >
>> >> >> > table, stored procedure .views in my application which is running well
>> >> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> >> > is
>> >> >> > need to create all table, stored procedure, views on the domain server
>> >> >> >
>> >> >> > database. can any one tell me how i can do it?
>> >> >> >
>> >> >
>> >
>|||i am having data at my local sql server but i need to transfer it on
domain sql server. but i don't have direct access of domain enterprise
manager or query analyzer i am having only DSN Name uid and pwd.
Tibor Karaszi wrote:
> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
> Servers?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> > ok fine it is working but how i can transfer data from local to domain
> > server.
> >
> > --
> > Tibor Karaszi wrote:
> >> Read the file from your code, take the SQL from the file you read and put it in a command object.
> >> Whenever you reach GO in the script file, execute what you have in the command object using
> >> ExecuteNonQuery.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> >> > In asp.net using C#.net
> >> >
> >> > Tibor Karaszi wrote:
> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> > need to run it only programatically.
> >> >>
> >> >> From what programming language?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> > need to run it only programatically.
> >> >> > Hari Prasad wrote:
> >> >> >> Hi,
> >> >> >>
> >> >> >> Easy option is :-
> >> >> >>
> >> >> >> 1. Backup the database in your machine [Use Backup Database]
> >> >> >> 2. Copy the backup file to Domain server
> >> >> >> 3. Restore the database [Use Restore Database command]
> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> >> >> follow the parent chld relationship
> >> >> >> while truncating table.
> >> >> >>
> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> >> >> SQL file. Then you could use this script to create
> >> >> >> objects in Domain sql server.
> >> >> >>
> >> >> >>
> >> >> >> Thanks
> >> >> >> Hari
> >> >> >> SQL Server MVP
> >> >> >>
> >> >> >>
> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >> >> >
> >> >> >> > table, stored procedure .views in my application which is running well
> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> >> >> > is
> >> >> >> > need to create all table, stored procedure, views on the domain server
> >> >> >> >
> >> >> >> > database. can any one tell me how i can do it?
> >> >> >> >
> >> >> >
> >> >
> >|||Let me see if I understand this.
You have a local SQL Server with schema and data. You have script files for the DDL on your local
SQL Server.
You now want to get both the schema and data to the other SQL Server.
I'm confused by the comment:
> but i don't have direct access of domain enterprise
> manager or query analyzer i am having only DSN Name uid and pwd.
If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager, right?
Anyhow, why not transfer the whole database using backup and restore? If you do want to script out
the data as well as the DDL, check out some options at:
http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
>i am having data at my local sql server but i need to transfer it on
> domain sql server. but i don't have direct access of domain enterprise
> manager or query analyzer i am having only DSN Name uid and pwd.
>
> Tibor Karaszi wrote:
>> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
>> Servers?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
>> > ok fine it is working but how i can transfer data from local to domain
>> > server.
>> >
>> > --
>> > Tibor Karaszi wrote:
>> >> Read the file from your code, take the SQL from the file you read and put it in a command
>> >> object.
>> >> Whenever you reach GO in the script file, execute what you have in the command object using
>> >> ExecuteNonQuery.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
>> >> > In asp.net using C#.net
>> >> >
>> >> > Tibor Karaszi wrote:
>> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> > need to run it only programatically.
>> >> >>
>> >> >> From what programming language?
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> > need to run it only programatically.
>> >> >> > Hari Prasad wrote:
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> Easy option is :-
>> >> >> >>
>> >> >> >> 1. Backup the database in your machine [Use Backup Database]
>> >> >> >> 2. Copy the backup file to Domain server
>> >> >> >> 3. Restore the database [Use Restore Database command]
>> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> >> >> follow the parent chld relationship
>> >> >> >> while truncating table.
>> >> >> >>
>> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> >> >> SQL file. Then you could use this script to create
>> >> >> >> objects in Domain sql server.
>> >> >> >>
>> >> >> >>
>> >> >> >> Thanks
>> >> >> >> Hari
>> >> >> >> SQL Server MVP
>> >> >> >>
>> >> >> >>
>> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >> >> >
>> >> >> >> > table, stored procedure .views in my application which is running well
>> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> >> >> > is
>> >> >> >> > need to create all table, stored procedure, views on the domain server
>> >> >> >> >
>> >> >> >> > database. can any one tell me how i can do it?
>> >> >> >> >
>> >> >> >
>> >> >
>> >
>|||i want to say i don't have access of domain servers sql server
enterprise manager and query analyser which i have registered
Tibor Karaszi wrote:
> Let me see if I understand this.
> You have a local SQL Server with schema and data. You have script files for the DDL on your local
> SQL Server.
> You now want to get both the schema and data to the other SQL Server.
> I'm confused by the comment:
> > but i don't have direct access of domain enterprise
> > manager or query analyzer i am having only DSN Name uid and pwd.
> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager, right?
> Anyhow, why not transfer the whole database using backup and restore? If you do want to script out
> the data as well as the DDL, check out some options at:
> http://www.karaszi.com/SQLServer/info_generate_script.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
> >i am having data at my local sql server but i need to transfer it on
> > domain sql server. but i don't have direct access of domain enterprise
> > manager or query analyzer i am having only DSN Name uid and pwd.
> >
> >
> > Tibor Karaszi wrote:
> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
> >> Servers?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> >> > ok fine it is working but how i can transfer data from local to domain
> >> > server.
> >> >
> >> > --
> >> > Tibor Karaszi wrote:
> >> >> Read the file from your code, take the SQL from the file you read and put it in a command
> >> >> object.
> >> >> Whenever you reach GO in the script file, execute what you have in the command object using
> >> >> ExecuteNonQuery.
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> >> >> > In asp.net using C#.net
> >> >> >
> >> >> > Tibor Karaszi wrote:
> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> > need to run it only programatically.
> >> >> >>
> >> >> >> From what programming language?
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> > need to run it only programatically.
> >> >> >> > Hari Prasad wrote:
> >> >> >> >> Hi,
> >> >> >> >>
> >> >> >> >> Easy option is :-
> >> >> >> >>
> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
> >> >> >> >> 2. Copy the backup file to Domain server
> >> >> >> >> 3. Restore the database [Use Restore Database command]
> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> >> >> >> follow the parent chld relationship
> >> >> >> >> while truncating table.
> >> >> >> >>
> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> >> >> >> SQL file. Then you could use this script to create
> >> >> >> >> objects in Domain sql server.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> Thanks
> >> >> >> >> Hari
> >> >> >> >> SQL Server MVP
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >> >> >> >
> >> >> >> >> > table, stored procedure .views in my application which is running well
> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> >> >> >> > is
> >> >> >> >> > need to create all table, stored procedure, views on the domain server
> >> >> >> >> >
> >> >> >> >> > database. can any one tell me how i can do it?
> >> >> >> >> >
> >> >> >> >
> >> >> >
> >> >
> >|||I still don't understand I'm afraid. Are you saying that you try to access the SQL Server from your
Query Analyzer or Enterprise Manager but cannot login?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160234825.895887.46100@.h48g2000cwc.googlegroups.com...
>i want to say i don't have access of domain servers sql server
> enterprise manager and query analyser which i have registered
>
> Tibor Karaszi wrote:
>> Let me see if I understand this.
>> You have a local SQL Server with schema and data. You have script files for the DDL on your local
>> SQL Server.
>> You now want to get both the schema and data to the other SQL Server.
>> I'm confused by the comment:
>> > but i don't have direct access of domain enterprise
>> > manager or query analyzer i am having only DSN Name uid and pwd.
>> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager, right?
>> Anyhow, why not transfer the whole database using backup and restore? If you do want to script
>> out
>> the data as well as the DDL, check out some options at:
>> http://www.karaszi.com/SQLServer/info_generate_script.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
>> >i am having data at my local sql server but i need to transfer it on
>> > domain sql server. but i don't have direct access of domain enterprise
>> > manager or query analyzer i am having only DSN Name uid and pwd.
>> >
>> >
>> > Tibor Karaszi wrote:
>> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
>> >> Servers?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
>> >> > ok fine it is working but how i can transfer data from local to domain
>> >> > server.
>> >> >
>> >> > --
>> >> > Tibor Karaszi wrote:
>> >> >> Read the file from your code, take the SQL from the file you read and put it in a command
>> >> >> object.
>> >> >> Whenever you reach GO in the script file, execute what you have in the command object using
>> >> >> ExecuteNonQuery.
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
>> >> >> > In asp.net using C#.net
>> >> >> >
>> >> >> > Tibor Karaszi wrote:
>> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> > need to run it only programatically.
>> >> >> >>
>> >> >> >> From what programming language?
>> >> >> >>
>> >> >> >> --
>> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >>
>> >> >> >>
>> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> > need to run it only programatically.
>> >> >> >> > Hari Prasad wrote:
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> Easy option is :-
>> >> >> >> >>
>> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
>> >> >> >> >> 2. Copy the backup file to Domain server
>> >> >> >> >> 3. Restore the database [Use Restore Database command]
>> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> >> >> >> follow the parent chld relationship
>> >> >> >> >> while truncating table.
>> >> >> >> >>
>> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> >> >> >> SQL file. Then you could use this script to create
>> >> >> >> >> objects in Domain sql server.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> Thanks
>> >> >> >> >> Hari
>> >> >> >> >> SQL Server MVP
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >> >> >> >
>> >> >> >> >> > table, stored procedure .views in my application which is running well
>> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> >> >> >> > is
>> >> >> >> >> > need to create all table, stored procedure, views on the domain server
>> >> >> >> >> >
>> >> >> >> >> > database. can any one tell me how i can do it?
>> >> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >
>> >
>|||Just tell me can i login to my domain servers enterprise manager or
query analyser by using DSN name.
suppose my domain is vritti.co.in and i got DSN=xyz UId =xyz Pwd=xyz.
then how i can access it by using enterprise manager or query analyser.
Tibor Karaszi wrote:
> I still don't understand I'm afraid. Are you saying that you try to access the SQL Server from your
> Query Analyzer or Enterprise Manager but cannot login?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160234825.895887.46100@.h48g2000cwc.googlegroups.com...
> >i want to say i don't have access of domain servers sql server
> > enterprise manager and query analyser which i have registered
> >
> >
> > Tibor Karaszi wrote:
> >> Let me see if I understand this.
> >>
> >> You have a local SQL Server with schema and data. You have script files for the DDL on your local
> >> SQL Server.
> >>
> >> You now want to get both the schema and data to the other SQL Server.
> >>
> >> I'm confused by the comment:
> >>
> >> > but i don't have direct access of domain enterprise
> >> > manager or query analyzer i am having only DSN Name uid and pwd.
> >>
> >> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager, right?
> >>
> >> Anyhow, why not transfer the whole database using backup and restore? If you do want to script
> >> out
> >> the data as well as the DDL, check out some options at:
> >> http://www.karaszi.com/SQLServer/info_generate_script.asp
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
> >> >i am having data at my local sql server but i need to transfer it on
> >> > domain sql server. but i don't have direct access of domain enterprise
> >> > manager or query analyzer i am having only DSN Name uid and pwd.
> >> >
> >> >
> >> > Tibor Karaszi wrote:
> >> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between two SQL
> >> >> Servers?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> >> >> > ok fine it is working but how i can transfer data from local to domain
> >> >> > server.
> >> >> >
> >> >> > --
> >> >> > Tibor Karaszi wrote:
> >> >> >> Read the file from your code, take the SQL from the file you read and put it in a command
> >> >> >> object.
> >> >> >> Whenever you reach GO in the script file, execute what you have in the command object using
> >> >> >> ExecuteNonQuery.
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> >> >> >> > In asp.net using C#.net
> >> >> >> >
> >> >> >> > Tibor Karaszi wrote:
> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> >> > need to run it only programatically.
> >> >> >> >>
> >> >> >> >> From what programming language?
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> >> http://www.solidqualitylearning.com/
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> >> > need to run it only programatically.
> >> >> >> >> > Hari Prasad wrote:
> >> >> >> >> >> Hi,
> >> >> >> >> >>
> >> >> >> >> >> Easy option is :-
> >> >> >> >> >>
> >> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
> >> >> >> >> >> 2. Copy the backup file to Domain server
> >> >> >> >> >> 3. Restore the database [Use Restore Database command]
> >> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> >> >> >> >> follow the parent chld relationship
> >> >> >> >> >> while truncating table.
> >> >> >> >> >>
> >> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> >> >> >> >> SQL file. Then you could use this script to create
> >> >> >> >> >> objects in Domain sql server.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> Thanks
> >> >> >> >> >> Hari
> >> >> >> >> >> SQL Server MVP
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >> >> >> >> >
> >> >> >> >> >> > table, stored procedure .views in my application which is running well
> >> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> >> >> >> >> > is
> >> >> >> >> >> > need to create all table, stored procedure, views on the domain server
> >> >> >> >> >> >
> >> >> >> >> >> > database. can any one tell me how i can do it?
> >> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >
> >> >> >
> >> >
> >|||I don't think that these tools accept DSN. You have to type in the server name (or, IP etc, as found
in your DSN), and select your login attributes (SQL Server login, login name and password).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160371392.636159.274620@.c28g2000cwb.googlegroups.com...
> Just tell me can i login to my domain servers enterprise manager or
> query analyser by using DSN name.
> suppose my domain is vritti.co.in and i got DSN=xyz UId =xyz Pwd=xyz.
> then how i can access it by using enterprise manager or query analyser.
> Tibor Karaszi wrote:
>> I still don't understand I'm afraid. Are you saying that you try to access the SQL Server from
>> your
>> Query Analyzer or Enterprise Manager but cannot login?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1160234825.895887.46100@.h48g2000cwc.googlegroups.com...
>> >i want to say i don't have access of domain servers sql server
>> > enterprise manager and query analyser which i have registered
>> >
>> >
>> > Tibor Karaszi wrote:
>> >> Let me see if I understand this.
>> >>
>> >> You have a local SQL Server with schema and data. You have script files for the DDL on your
>> >> local
>> >> SQL Server.
>> >>
>> >> You now want to get both the schema and data to the other SQL Server.
>> >>
>> >> I'm confused by the comment:
>> >>
>> >> > but i don't have direct access of domain enterprise
>> >> > manager or query analyzer i am having only DSN Name uid and pwd.
>> >>
>> >> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager,
>> >> right?
>> >>
>> >> Anyhow, why not transfer the whole database using backup and restore? If you do want to script
>> >> out
>> >> the data as well as the DDL, check out some options at:
>> >> http://www.karaszi.com/SQLServer/info_generate_script.asp
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
>> >> >i am having data at my local sql server but i need to transfer it on
>> >> > domain sql server. but i don't have direct access of domain enterprise
>> >> > manager or query analyzer i am having only DSN Name uid and pwd.
>> >> >
>> >> >
>> >> > Tibor Karaszi wrote:
>> >> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between two
>> >> >> SQL
>> >> >> Servers?
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
>> >> >> > ok fine it is working but how i can transfer data from local to domain
>> >> >> > server.
>> >> >> >
>> >> >> > --
>> >> >> > Tibor Karaszi wrote:
>> >> >> >> Read the file from your code, take the SQL from the file you read and put it in a
>> >> >> >> command
>> >> >> >> object.
>> >> >> >> Whenever you reach GO in the script file, execute what you have in the command object
>> >> >> >> using
>> >> >> >> ExecuteNonQuery.
>> >> >> >>
>> >> >> >> --
>> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >>
>> >> >> >>
>> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
>> >> >> >> > In asp.net using C#.net
>> >> >> >> >
>> >> >> >> > Tibor Karaszi wrote:
>> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> >> > need to run it only programatically.
>> >> >> >> >>
>> >> >> >> >> From what programming language?
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> >> > need to run it only programatically.
>> >> >> >> >> > Hari Prasad wrote:
>> >> >> >> >> >> Hi,
>> >> >> >> >> >>
>> >> >> >> >> >> Easy option is :-
>> >> >> >> >> >>
>> >> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
>> >> >> >> >> >> 2. Copy the backup file to Domain server
>> >> >> >> >> >> 3. Restore the database [Use Restore Database command]
>> >> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> >> >> >> >> follow the parent chld relationship
>> >> >> >> >> >> while truncating table.
>> >> >> >> >> >>
>> >> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> >> >> >> >> SQL file. Then you could use this script to create
>> >> >> >> >> >> objects in Domain sql server.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> Thanks
>> >> >> >> >> >> Hari
>> >> >> >> >> >> SQL Server MVP
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >> >> >> >> >
>> >> >> >> >> >> > table, stored procedure .views in my application which is running well
>> >> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> >> >> >> >> > is
>> >> >> >> >> >> > need to create all table, stored procedure, views on the domain server
>> >> >> >> >> >> >
>> >> >> >> >> >> > database. can any one tell me how i can do it?
>> >> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >
>> >
>|||but only DSN name , uid and pwd is given to me not server name and
database name in such condition how i can transfer my data.
Tibor Karaszi wrote:
> I don't think that these tools accept DSN. You have to type in the server name (or, IP etc, as found
> in your DSN), and select your login attributes (SQL Server login, login name and password).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> news:1160371392.636159.274620@.c28g2000cwb.googlegroups.com...
> > Just tell me can i login to my domain servers enterprise manager or
> > query analyser by using DSN name.
> > suppose my domain is vritti.co.in and i got DSN=xyz UId =xyz Pwd=xyz.
> > then how i can access it by using enterprise manager or query analyser.
> >
> > Tibor Karaszi wrote:
> >> I still don't understand I'm afraid. Are you saying that you try to access the SQL Server from
> >> your
> >> Query Analyzer or Enterprise Manager but cannot login?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> news:1160234825.895887.46100@.h48g2000cwc.googlegroups.com...
> >> >i want to say i don't have access of domain servers sql server
> >> > enterprise manager and query analyser which i have registered
> >> >
> >> >
> >> > Tibor Karaszi wrote:
> >> >> Let me see if I understand this.
> >> >>
> >> >> You have a local SQL Server with schema and data. You have script files for the DDL on your
> >> >> local
> >> >> SQL Server.
> >> >>
> >> >> You now want to get both the schema and data to the other SQL Server.
> >> >>
> >> >> I'm confused by the comment:
> >> >>
> >> >> > but i don't have direct access of domain enterprise
> >> >> > manager or query analyzer i am having only DSN Name uid and pwd.
> >> >>
> >> >> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager,
> >> >> right?
> >> >>
> >> >> Anyhow, why not transfer the whole database using backup and restore? If you do want to script
> >> >> out
> >> >> the data as well as the DDL, check out some options at:
> >> >> http://www.karaszi.com/SQLServer/info_generate_script.asp
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
> >> >> >i am having data at my local sql server but i need to transfer it on
> >> >> > domain sql server. but i don't have direct access of domain enterprise
> >> >> > manager or query analyzer i am having only DSN Name uid and pwd.
> >> >> >
> >> >> >
> >> >> > Tibor Karaszi wrote:
> >> >> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between two
> >> >> >> SQL
> >> >> >> Servers?
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
> >> >> >> > ok fine it is working but how i can transfer data from local to domain
> >> >> >> > server.
> >> >> >> >
> >> >> >> > --
> >> >> >> > Tibor Karaszi wrote:
> >> >> >> >> Read the file from your code, take the SQL from the file you read and put it in a
> >> >> >> >> command
> >> >> >> >> object.
> >> >> >> >> Whenever you reach GO in the script file, execute what you have in the command object
> >> >> >> >> using
> >> >> >> >> ExecuteNonQuery.
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> >> http://www.solidqualitylearning.com/
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
> >> >> >> >> > In asp.net using C#.net
> >> >> >> >> >
> >> >> >> >> > Tibor Karaszi wrote:
> >> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> >> >> > need to run it only programatically.
> >> >> >> >> >>
> >> >> >> >> >> From what programming language?
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> >> >> http://www.solidqualitylearning.com/
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
> >> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
> >> >> >> >> >> > need to run it only programatically.
> >> >> >> >> >> > Hari Prasad wrote:
> >> >> >> >> >> >> Hi,
> >> >> >> >> >> >>
> >> >> >> >> >> >> Easy option is :-
> >> >> >> >> >> >>
> >> >> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
> >> >> >> >> >> >> 2. Copy the backup file to Domain server
> >> >> >> >> >> >> 3. Restore the database [Use Restore Database command]
> >> >> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
> >> >> >> >> >> >> follow the parent chld relationship
> >> >> >> >> >> >> while truncating table.
> >> >> >> >> >> >>
> >> >> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
> >> >> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
> >> >> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
> >> >> >> >> >> >> SQL file. Then you could use this script to create
> >> >> >> >> >> >> objects in Domain sql server.
> >> >> >> >> >> >>
> >> >> >> >> >> >>
> >> >> >> >> >> >> Thanks
> >> >> >> >> >> >> Hari
> >> >> >> >> >> >> SQL Server MVP
> >> >> >> >> >> >>
> >> >> >> >> >> >>
> >> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
> >> >> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
> >> >> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
> >> >> >> >> >> >> >
> >> >> >> >> >> >> > table, stored procedure .views in my application which is running well
> >> >> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
> >> >> >> >> >> >> > is
> >> >> >> >> >> >> > need to create all table, stored procedure, views on the domain server
> >> >> >> >> >> >> >
> >> >> >> >> >> >> > database. can any one tell me how i can do it?
> >> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >
> >> >> >
> >> >
> >|||A DSN is something that you create locally on your machine. It contains the server name, possibly an
instance name (if not the default instance) and the database name. If they won't give you that
information, you should look for some other provider.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
news:1160408183.524642.222390@.m7g2000cwm.googlegroups.com...
> but only DSN name , uid and pwd is given to me not server name and
> database name in such condition how i can transfer my data.
> Tibor Karaszi wrote:
>> I don't think that these tools accept DSN. You have to type in the server name (or, IP etc, as
>> found
>> in your DSN), and select your login attributes (SQL Server login, login name and password).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> news:1160371392.636159.274620@.c28g2000cwb.googlegroups.com...
>> > Just tell me can i login to my domain servers enterprise manager or
>> > query analyser by using DSN name.
>> > suppose my domain is vritti.co.in and i got DSN=xyz UId =xyz Pwd=xyz.
>> > then how i can access it by using enterprise manager or query analyser.
>> >
>> > Tibor Karaszi wrote:
>> >> I still don't understand I'm afraid. Are you saying that you try to access the SQL Server from
>> >> your
>> >> Query Analyzer or Enterprise Manager but cannot login?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> news:1160234825.895887.46100@.h48g2000cwc.googlegroups.com...
>> >> >i want to say i don't have access of domain servers sql server
>> >> > enterprise manager and query analyser which i have registered
>> >> >
>> >> >
>> >> > Tibor Karaszi wrote:
>> >> >> Let me see if I understand this.
>> >> >>
>> >> >> You have a local SQL Server with schema and data. You have script files for the DDL on your
>> >> >> local
>> >> >> SQL Server.
>> >> >>
>> >> >> You now want to get both the schema and data to the other SQL Server.
>> >> >>
>> >> >> I'm confused by the comment:
>> >> >>
>> >> >> > but i don't have direct access of domain enterprise
>> >> >> > manager or query analyzer i am having only DSN Name uid and pwd.
>> >> >>
>> >> >> If you have a local SQL Server, you would have both Query Analyzer and Enterprise Manager,
>> >> >> right?
>> >> >>
>> >> >> Anyhow, why not transfer the whole database using backup and restore? If you do want to
>> >> >> script
>> >> >> out
>> >> >> the data as well as the DDL, check out some options at:
>> >> >> http://www.karaszi.com/SQLServer/info_generate_script.asp
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> news:1160198245.515066.96750@.m7g2000cwm.googlegroups.com...
>> >> >> >i am having data at my local sql server but i need to transfer it on
>> >> >> > domain sql server. but i don't have direct access of domain enterprise
>> >> >> > manager or query analyzer i am having only DSN Name uid and pwd.
>> >> >> >
>> >> >> >
>> >> >> > Tibor Karaszi wrote:
>> >> >> >> I'm not sure what you are asking here. What data do you refer to, where is it? Between
>> >> >> >> two
>> >> >> >> SQL
>> >> >> >> Servers?
>> >> >> >>
>> >> >> >> --
>> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >>
>> >> >> >>
>> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> news:1160108798.342356.275430@.e3g2000cwe.googlegroups.com...
>> >> >> >> > ok fine it is working but how i can transfer data from local to domain
>> >> >> >> > server.
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Tibor Karaszi wrote:
>> >> >> >> >> Read the file from your code, take the SQL from the file you read and put it in a
>> >> >> >> >> command
>> >> >> >> >> object.
>> >> >> >> >> Whenever you reach GO in the script file, execute what you have in the command object
>> >> >> >> >> using
>> >> >> >> >> ExecuteNonQuery.
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> news:1160023668.433979.75200@.i42g2000cwa.googlegroups.com...
>> >> >> >> >> > In asp.net using C#.net
>> >> >> >> >> >
>> >> >> >> >> > Tibor Karaszi wrote:
>> >> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> >> >> > need to run it only programatically.
>> >> >> >> >> >>
>> >> >> >> >> >> From what programming language?
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> >> news:1159939062.047937.268110@.k70g2000cwa.googlegroups.com...
>> >> >> >> >> >> > but i am not having access of enterprise manager of domain server. i
>> >> >> >> >> >> > need to run it only programatically.
>> >> >> >> >> >> > Hari Prasad wrote:
>> >> >> >> >> >> >> Hi,
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Easy option is :-
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> 1. Backup the database in your machine [Use Backup Database]
>> >> >> >> >> >> >> 2. Copy the backup file to Domain server
>> >> >> >> >> >> >> 3. Restore the database [Use Restore Database command]
>> >> >> >> >> >> >> 4. If you do not want the data then Truncate the contents of all tables.
>> >> >> >> >> >> >> follow the parent chld relationship
>> >> >> >> >> >> >> while truncating table.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Alternative is ... In the local sql server .. open enterprise manager..
>> >> >> >> >> >> >> Select database .. right click-- all tasks-- Generate SQL Scripts...
>> >> >> >> >> >> >> choose all objects , all dependant objects -- permissions...Script it as a
>> >> >> >> >> >> >> SQL file. Then you could use this script to create
>> >> >> >> >> >> >> objects in Domain sql server.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Thanks
>> >> >> >> >> >> >> Hari
>> >> >> >> >> >> >> SQL Server MVP
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> "santosh" <Santoshmshinde_it@.yahoo.com> wrote in message
>> >> >> >> >> >> >> news:1159607442.786501.105340@.e3g2000cwe.googlegroups.com...
>> >> >> >> >> >> >> > dear all i am using ASP.net ,c# and SQL server 2000. i have create all
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> > table, stored procedure .views in my application which is running well
>> >> >> >> >> >> >> > in localhost but now i want to deploy it on server. for that pupose i
>> >> >> >> >> >> >> > is
>> >> >> >> >> >> >> > need to create all table, stored procedure, views on the domain server
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> > database. can any one tell me how i can do it?
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >
>> >
>