question

Aaronsoggi-6095 avatar image
0 Votes"
Aaronsoggi-6095 asked AmeliaGu-msft commented

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

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-generaldotnet-csharp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Aaronsoggi-6095,
Did the answers help you?
Please feel free to let us know if you have any other question.
If you find any post in the thread is helpful, you could kindly accept it as answer.

Best Regards,
Amelia

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
1 Vote"
karenpayneoregon answered Aaronsoggi-6095 commented

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



f1.png (36.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you karen! :)

0 Votes 0 ·