How would I be able to view my sql database on another PC?

Aaron soggi 246 Reputation points
2021-03-27T13:21:47.553+00:00

I'm currently doing a college project which i will need to submit online. My teacher would need to be able to view all of the tables within my SQl server project when downloading it onto his work pc.

Does anyone know what i would need to change in order to allow this?

Thankyou

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,755 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,275 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,036 Reputation points
    2021-03-27T14:42:07.07+00:00

    Hello,

    I suggest using GitHub, it's free and works in Visual Studio, otherwise, perform a clean operation on the solution and create a .zip file which you can place in Microsoft OneDrive (free) and should use the same login as here, if not create a free account. Although a .zip works it's much better to use GitHub as it also services as a backup to your local code.

    1. Create a GitHub account (this should be the link, unsure as I already have an account) with this link.
    2. Create a public repository, give it a name such as project1
    3. Copy the link (which you email your instructor)
    4. Using SSMS, select the database
    5. Right click on the database, select task
    6. Select generate scripts, follow the prompts and when asked use "copy to clipboard" (see figure 1)
    7. Then in Visual Studio, right click on the right, add new item, select text file, call it script.sql
    8. Paste in from SSMS
    9. Assuming Visual Studio 2019, Community edition, select the Git menu, follow prompts to signin to GitHub and commit/push to the repository.
    10. Go back to GitHub, visually inspect the repository is populated, if not back in Visual Studio do a push from the Git menu. ## See also

    How to use Git in Visual Studio

    Figure 1

    82072-f1.png

    1 person found this answer helpful.

  2. Erland Sommarskog 101.4K Reputation points MVP
    2021-03-27T13:24:59.207+00:00

    I think you better ask your teacher about that, since we don't know how the teacher wants your work to be delivered.

    The best way to copy a database is by BACKUP/RESTORE, but your teacher may expecting a .bacpac file, or just a set of scripts.

    0 comments No comments