Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 685593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:56:17+00:00 2026-05-14T01:56:17+00:00

I have a script that I am using to copy data from a table

  • 0

I have a script that I am using to copy data from a table in one database to a table in another database on the same SQL Server instance. The script works great when I am connected to the SQL Server instance as myself as I have dbo access to both databases. The problem is that this won’t be the case on the client’s SQL Server. They have seperate logins for each database (SQL Authentication Logins). Does anyone know if there is a way to run a script under these circumstances. The script would be doing something like.

use sourceDB
Insert targetDB.dbo.tblTest (id, test_name)
Select id, test_name from dbo.tblTest

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:56:18+00:00Added an answer on May 14, 2026 at 1:56 am

    You can set up a linked server:

    http://www.databasejournal.com/features/mssql/article.php/3085211/Linked-Servers-on-MS-SQL-Part-1.htm

    http://msdn.microsoft.com/en-us/library/ms190479.aspx

    You can then reference the linked server from within your script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Ant script that performs a copy operation using the 'copy' task
I have a script that checks responses from HTTP servers using the PEAR HTTP
I have a script that works fine on my test server (using IIS6). The
I have written a CGI script that creates an image dynamically using GET data.
I have a simple php script on a server that's using fsockopen to connect
I have a script that I'd like to continue using, but it looks like
I have a Perl script that I'm attempting to set up using Perl Threads
I have a Perl script that I'd like to run on Windows, using either
I have a Python script I recently wrote that I call using the command
The only reliable method that I a have found for using a script to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.