Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Monday, March 26, 2012

Newbie question

Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age
_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?Seems that either the object doesn=B4t exist or you are connected to the
wrong database (ont the object surely doesn=B4t exists there). Try to
check this.
HTH, Jens Suessmeyer.|||Who is the owner of the table? If it is not dbo you need to specify who the
owner is. Actually it is always a good idea to specify the owner even if it
is dbo.
FROM [YourOwner].[ascis_acadyear_setup]
Andrew J. Kelly SQL MVP
"Allison" <,> wrote in message
news:44007a16$0$6995$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can connect to Northwind and Pubs (the samples) and do simple selections
> on them. At work we have a personnel database which I am tesing at home.
> I can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [a
ge_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>|||>>Very sorry for offending you - newbies need help not a slapped wrist
I can't speak for Jens but I believe his reply was quite polite with no
'slapping' intended. As you can see, he is trying to help you in your other
thread.
Multi-posting is a common mistake newbies make and it's appropriate to point
this out so that it can be avoided it in the future. With multiple
independent threads, there's a lot of duplicate effort going on to help you
out.
If you need to post the same question to different forums, you can
cross-post by specify multiple newsgroups in the list and replies will
appear in the all the forums posted.
Hope this helps.
Dan Guzman
SQL Server MVP
"Allison" <,> wrote in message
news:440086ed$0$6962$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1140883638.016887.92390@.e56g2000cwe.googlegroups.com...
>

Friday, March 23, 2012

Newbie question

Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?
Seems that either the object doesn=B4t exist or you are connected to the
wrong database (ont the object surely doesn=B4t exists there). Try to
check this.
HTH, Jens Suessmeyer.
|||Who is the owner of the table? If it is not dbo you need to specify who the
owner is. Actually it is always a good idea to specify the owner even if it
is dbo.
FROM [YourOwner].[ascis_acadyear_setup]
Andrew J. Kelly SQL MVP
"Allison" <,> wrote in message
news:44007a16$0$6995$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can connect to Northwind and Pubs (the samples) and do simple selections
> on them. At work we have a personnel database which I am tesing at home.
> I can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>
|||>>Very sorry for offending you - newbies need help not a slapped wrist
I can't speak for Jens but I believe his reply was quite polite with no
'slapping' intended. As you can see, he is trying to help you in your other
thread.
Multi-posting is a common mistake newbies make and it's appropriate to point
this out so that it can be avoided it in the future. With multiple
independent threads, there's a lot of duplicate effort going on to help you
out.
If you need to post the same question to different forums, you can
cross-post by specify multiple newsgroups in the list and replies will
appear in the all the forums posted.
Hope this helps.
Dan Guzman
SQL Server MVP
"Allison" <,> wrote in message
news:440086ed$0$6962$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1140883638.016887.92390@.e56g2000cwe.googlegro ups.com...
>

Newbie question

Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?
It's possible that the object owner is not yourself or dbo. Try the
following:
select
table_schema
from
information_schema.tables
where
table_name = 'ascis_acadyear_setup'
This will tell you who the owner is. Then use two-part naming:
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [TheOwner].[ascis_acadyear_setup]
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Allison" <,> wrote in message
news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?
|||Please do not multipost, answered in connect.
HTH, jens Suessmeyer.
|||"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1140883638.016887.92390@.e56g2000cwe.googlegro ups.com...
> Please do not multipost, answered in connect.
> HTH, jens Suessmeyer.
>Very sorry for offending you - newbies need help not a slapped wrist
|||"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time

> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>
|||>>Very sorry for offending you - newbies need help not a slapped wrist
I can't speak for Jens but I believe his reply was quite polite with no
'slapping' intended. As you can see, he is trying to help you in your other
thread.
Multi-posting is a common mistake newbies make and it's appropriate to point
this out so that it can be avoided it in the future. With multiple
independent threads, there's a lot of duplicate effort going on to help you
out.
If you need to post the same question to different forums, you can
cross-post by specify multiple newsgroups in the list and replies will
appear in the all the forums posted.
Hope this helps.
Dan Guzman
SQL Server MVP
"Allison" <,> wrote in message
news:440086ed$0$6962$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1140883638.016887.92390@.e56g2000cwe.googlegro ups.com...
>
|||?
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Allison" <,> wrote in message
news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time

> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>
|||I think she thanked you (just kind of hidden):
[vbcol=seagreen]
Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>
>
|||Thanx, Adam. It was buried in there somewhere.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:%23QiIKVmOGHA.1088@.tk2msftngp13.phx.gbl...
I think she thanked you (just kind of hidden):
[vbcol=seagreen]
Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>
>

Newbie question

Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age
_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?It's possible that the object owner is not yourself or dbo. Try the
following:
select
table_schema
from
information_schema.tables
where
table_name = 'ascis_acadyear_setup'
This will tell you who the owner is. Then use two-part naming:
SELECT [acadyear_setup_id], [narrative], [census_date], [age
_as_at_date]
FROM [TheOwner].[ascis_acadyear_setup]
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Allison" <,> wrote in message
news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age
_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?|||Please do not multipost, answered in connect.
HTH, jens Suessmeyer.|||"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1140883638.016887.92390@.e56g2000cwe.googlegroups.com...
> Please do not multipost, answered in connect.
> HTH, jens Suessmeyer.
>Very sorry for offending you - newbies need help not a slapped wrist|||"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [a
ge_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time

> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [a
ge_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>|||>>Very sorry for offending you - newbies need help not a slapped wrist
I can't speak for Jens but I believe his reply was quite polite with no
'slapping' intended. As you can see, he is trying to help you in your other
thread.
Multi-posting is a common mistake newbies make and it's appropriate to point
this out so that it can be avoided it in the future. With multiple
independent threads, there's a lot of duplicate effort going on to help you
out.
If you need to post the same question to different forums, you can
cross-post by specify multiple newsgroups in the list and replies will
appear in the all the forums posted.
Hope this helps.
Dan Guzman
SQL Server MVP
"Allison" <,> wrote in message
news:440086ed$0$6962$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1140883638.016887.92390@.e56g2000cwe.googlegroups.com...
>|||?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Allison" <,> wrote in message
news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [a
ge_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time

> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [a
ge_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>|||I think she thanked you (just kind of hidden):

Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>
>|||Thanx, Adam. It was buried in there somewhere.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:%23QiIKVmOGHA.1088@.tk2msftngp13.phx.gbl...
I think she thanked you (just kind of hidden):

Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>
>sql

Newbie question

Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?It's possible that the object owner is not yourself or dbo. Try the
following:
select
table_schema
from
information_schema.tables
where
table_name = 'ascis_acadyear_setup'
This will tell you who the owner is. Then use two-part naming:
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [TheOwner].[ascis_acadyear_setup]
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Allison" <,> wrote in message
news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
Apolgies if this seems obvious.
I am using Visual Studio and experimenting with SQL server databases. I can
connect to Northwind and Pubs (the samples) and do simple selections on
them. At work we have a personnel database which I am tesing at home. I
can connect to it and explore the contents but when I run this
SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
FROM [ascis_acadyear_setup]
I get the error invlaid object name ascis_acadyear_setup
What am I doing wrong?|||Please do not multipost, answered in connect.
HTH, jens Suessmeyer.|||"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1140883638.016887.92390@.e56g2000cwe.googlegroups.com...
> Please do not multipost, answered in connect.
> HTH, jens Suessmeyer.
>Very sorry for offending you - newbies need help not a slapped wrist|||"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time
> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>|||>>Very sorry for offending you - newbies need help not a slapped wrist
I can't speak for Jens but I believe his reply was quite polite with no
'slapping' intended. As you can see, he is trying to help you in your other
thread.
Multi-posting is a common mistake newbies make and it's appropriate to point
this out so that it can be avoided it in the future. With multiple
independent threads, there's a lot of duplicate effort going on to help you
out.
If you need to post the same question to different forums, you can
cross-post by specify multiple newsgroups in the list and replies will
appear in the all the forums posted.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Allison" <,> wrote in message
news:440086ed$0$6962$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1140883638.016887.92390@.e56g2000cwe.googlegroups.com...
>> Please do not multipost, answered in connect.
>> HTH, jens Suessmeyer.
>>Very sorry for offending you - newbies need help not a slapped wrist
>|||?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Allison" <,> wrote in message
news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
> It's possible that the object owner is not yourself or dbo. Try the
> following:
> select
> table_schema
> from
> information_schema.tables
> where
> table_name = 'ascis_acadyear_setup'
> This will tell you who the owner is. Then use two-part naming:
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [TheOwner].[ascis_acadyear_setup]
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .Thank you this worked first time
> "Allison" <,> wrote in message
> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
> Apolgies if this seems obvious.
> I am using Visual Studio and experimenting with SQL server databases. I
> can
> connect to Northwind and Pubs (the samples) and do simple selections on
> them. At work we have a personnel database which I am tesing at home. I
> can connect to it and explore the contents but when I run this
> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
> FROM [ascis_acadyear_setup]
> I get the error invlaid object name ascis_acadyear_setup
> What am I doing wrong?
>|||I think she thanked you (just kind of hidden):
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>> www.pinpub.com
>> .Thank you this worked first time
Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>> It's possible that the object owner is not yourself or dbo. Try the
>> following:
>> select
>> table_schema
>> from
>> information_schema.tables
>> where
>> table_name = 'ascis_acadyear_setup'
>> This will tell you who the owner is. Then use two-part naming:
>> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
>> FROM [TheOwner].[ascis_acadyear_setup]
>>
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>> www.pinpub.com
>> .Thank you this worked first time
>> "Allison" <,> wrote in message
>> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
>> Apolgies if this seems obvious.
>> I am using Visual Studio and experimenting with SQL server databases. I
>> can
>> connect to Northwind and Pubs (the samples) and do simple selections on
>> them. At work we have a personnel database which I am tesing at home. I
>> can connect to it and explore the contents but when I run this
>> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
>> FROM [ascis_acadyear_setup]
>> I get the error invlaid object name ascis_acadyear_setup
>> What am I doing wrong?
>>
>|||Thanx, Adam. It was buried in there somewhere.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:%23QiIKVmOGHA.1088@.tk2msftngp13.phx.gbl...
I think she thanked you (just kind of hidden):
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>> www.pinpub.com
>> .Thank you this worked first time
Allison:
">" indicates a quote. When you want to add text in response, start
your line without that character so that we can tell when the original post
ends and the reply begins.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OhNwSAjOGHA.2012@.TK2MSFTNGP14.phx.gbl...
> ?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Allison" <,> wrote in message
> news:44008a84$0$6993$ed2619ec@.ptn-nntp-reader02.plus.net...
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uVMJYMiOGHA.720@.TK2MSFTNGP14.phx.gbl...
>> It's possible that the object owner is not yourself or dbo. Try the
>> following:
>> select
>> table_schema
>> from
>> information_schema.tables
>> where
>> table_name = 'ascis_acadyear_setup'
>> This will tell you who the owner is. Then use two-part naming:
>> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
>> FROM [TheOwner].[ascis_acadyear_setup]
>>
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>> www.pinpub.com
>> .Thank you this worked first time
>> "Allison" <,> wrote in message
>> news:44007a2f$0$6981$ed2619ec@.ptn-nntp-reader02.plus.net...
>> Apolgies if this seems obvious.
>> I am using Visual Studio and experimenting with SQL server databases. I
>> can
>> connect to Northwind and Pubs (the samples) and do simple selections on
>> them. At work we have a personnel database which I am tesing at home. I
>> can connect to it and explore the contents but when I run this
>> SELECT [acadyear_setup_id], [narrative], [census_date], [age_as_at_date]
>> FROM [ascis_acadyear_setup]
>> I get the error invlaid object name ascis_acadyear_setup
>> What am I doing wrong?
>>
>

Wednesday, March 21, 2012

newbie question

how do I grant a user permission to a database from sql server mgmt studio
express ?
I used admin to create the database, granted the user smith full access to
the directory and files for the database. I tried grant the login id smith
access by simply smith as well as mypc\smith. both were rejected
how should I go about granting user permission?Hi
I don;t use SQL Server 2005 Management Studio Express but this describes how
to do the tasks
http://www.microsoft.com/technet/prodtechnol/sql/2005/mgsqlexpwssmse.mspx
You may want use SQLCMD and the CREATE LOGIN/CREATE USER commands if you
have a large number of logins/users to create.
John
"GS" wrote:
> how do I grant a user permission to a database from sql server mgmt studio
> express ?
> I used admin to create the database, granted the user smith full access to
> the directory and files for the database. I tried grant the login id smith
> access by simply smith as well as mypc\smith. both were rejected
> how should I go about granting user permission?
>
>|||thank you
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:944A0AF9-6167-4698-8610-571B3E8C3148@.microsoft.com...
> Hi
> I don;t use SQL Server 2005 Management Studio Express but this describes
how
> to do the tasks
> http://www.microsoft.com/technet/prodtechnol/sql/2005/mgsqlexpwssmse.mspx
> You may want use SQLCMD and the CREATE LOGIN/CREATE USER commands if you
> have a large number of logins/users to create.
> John
> "GS" wrote:
> > how do I grant a user permission to a database from sql server mgmt
studio
> > express ?
> >
> > I used admin to create the database, granted the user smith full access
to
> > the directory and files for the database. I tried grant the login id
smith
> > access by simply smith as well as mypc\smith. both were rejected
> > how should I go about granting user permission?
> >
> >
> >

Monday, March 19, 2012

Newbie on permissions: ADO.NET, C++.NET, SQL SERVER 2005 EXPRESS, Visual Studio 2005

This is a very basic question, perhaps more of a Windows XP
Professional OS permissions question than a dB or programming
question: how to create and access SQL SERVER databases from an
account other than "Administrator"; for example, from a "Power User"
account?

As anything other than an "Administrator" user (i.e. as a Power User),
I keep getting (when I try from inside of MS Visual Studio 2005
development environment) the error message: "CREATE DATABASE
permission denied in database 'master'

Using the SQL Server Express Surface Area Configuration tool, I set
the parameters below to "enabled" (they were disabled). This only
helped in one respect: now I can create a database with Visual Studio
2005 (using the Server Explorer tool) when logged in as an
"Administrator". But for security reasons (which I'm not even sure
are valid, but at least in my mind they are) I would like to log in as
a Power User.

My configuration: Windows OS on a standalone Pentium 4 PC connected
to the internet--I'm using Visual Studio 2005 and programming in
C#.NET and C++.NET using ADO.NET. I don't need to access any other PC
in any network--I'm just learning the language at this point.

Any ideas? I did remove some prior versions of SQL Server '7' which
helped remove some other unrelated error messages, and, like I say,
from inside the Administrator account I can program and create
databases using the Server Explorer of Visual Studio 2005, but I'd
like to do so from a non-Admin account.

Also whether I can disable some of the parameters below--i.e., do I
really need the "xp_cmdshell" enabled?

Thanks!

RL

Configuring and Managing SQL Server Express
For improved manageability and security, SQL Server 2005 provides
more control over the SQL Server surface area on your system. To
minimize the surface area, the following default configurations have
been applied to your instance of SQL server:

oTCP/IP connections are disabled [changed to enabled]
oNamed Pipes is disabled [changed to enabled]
oSQL Browser must be started manually
oOPENROWSET and OPENDATASOURCE have been disabled
oCLR integration is disabled [changed to enabled]
oOLE automation is disabled [changed to enabled]
oxp_cmdshell is disabled [changed to enabled]

[This works fine but only from inside "Administrator"--RL]raylopez99 (raylopez99@.yahoo.com) writes:

Quote:

Originally Posted by

This is a very basic question, perhaps more of a Windows XP
Professional OS permissions question than a dB or programming
question: how to create and access SQL SERVER databases from an
account other than "Administrator"; for example, from a "Power User"
account?
>
As anything other than an "Administrator" user (i.e. as a Power User),
I keep getting (when I try from inside of MS Visual Studio 2005
development environment) the error message: "CREATE DATABASE
permission denied in database 'master'


That's indeed an issue of SQL Server permissions.

When you are logged in as an Administrator in Windows and connect to
SQL Server, you account maps to BUILTIN\Administrator which has sysadmin
privilege in SQL Server. That is, you can do anything.

WHen you connect with some other Windows user, no get no such extra
thrills, but you need to grant that login rights to do things. For instance

GRANT CREATE DATABASE TO DOMAIN\PowerUser

You can also add that user a role which has the privileges you want,
for instance to the sysadmin role.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On Mar 28, 3:45 pm, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

raylopez99 (raylope...@.yahoo.com) writes:


Quote:

Originally Posted by

WHen you connect with some other Windows user, no get no such extra
thrills, but you need to grant that login rights to do things. For instance
>
GRANT CREATE DATABASE TO DOMAIN\PowerUser
>
You can also add that user a role which has the privileges you want,
for instance to the sysadmin role.
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
>


Erland Sommarskog-- thanks.

At the risk of looking even more stupid, if you know of how to "also
add that user a role which has the privileges you want, for instance
to the sysadmin role" within Visual Studio 2005 and/or Windows XP (for
the program SQL Server 2005 Express Edition), please feel free to let
me know. I just want to add the Power User to have Administrator
access for the Visual Studio 2005, when working on ADO.NET (SQL Server
2005), not for all programs, if possible. For now I will simply
program while logged in as an Administrator, which seems to be a good
workaround to my problem.

I've also ordered some books on ADO.NET and SQL SERVER from O'Reilly
and Microsoft Press; if you have any favorites for a C#/C++ programmer
hobbiest, let me know.

RL|||raylopez99 (raylopez99@.yahoo.com) writes:

Quote:

Originally Posted by

At the risk of looking even more stupid, if you know of how to "also
add that user a role which has the privileges you want, for instance
to the sysadmin role" within Visual Studio 2005 and/or Windows XP (for
the program SQL Server 2005 Express Edition), please feel free to let
me know. I just want to add the Power User to have Administrator
access for the Visual Studio 2005, when working on ADO.NET (SQL Server
2005), not for all programs, if possible. For now I will simply
program while logged in as an Administrator, which seems to be a good
workaround to my problem.


Do I understand this correctly that you want your user to have heavy
perms when connected through VS and your application, but not when it's
connected through Management Studio? There is no way you can assign
permissions per application. Permissions are per logins and users.

Of course, it's a legit requirement that a user should only be able to
access objects in the database through the application, as the application
then can control what the user can see and update. There are a couple of
ways to implement this requirement. The method that has been most tested
and rried is to use stored procedures. There are several ways that
permissions can be granted through stored procedures, whereof the most
useful is ownership chaining. If all stored procedures and tables are
owned by dbo, the users only need execute permissions to the stored
procedures.

There are ways to handle this without stored procedures, but I am less
of fond of these methods.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On Mar 29, 3:03 pm, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

raylopez99 (raylope...@.yahoo.com) writes:


Quote:

Originally Posted by

>
Do I understand this correctly that you want your user to have heavy
perms when connected through VS and your application, but not when it's
connected through Management Studio? There is no way you can assign
permissions per application. Permissions are per logins and users.
>
Of course, it's a legit requirement that a user should only be able to
access objects in the database through the application, as the application
then can control what the user can see and update. There are a couple of
ways to implement this requirement. The method that has been most tested
and rried is to use stored procedures. There are several ways that
permissions can be granted through stored procedures, whereof the most
useful is ownership chaining. If all stored procedures and tables are
owned by dbo, the users only need execute permissions to the stored
procedures.
>
There are ways to handle this without stored procedures, but I am less
of fond of these methods.
>


Thank you Erland. I see the problem is not as simple as I thought. I
also see I have two problems: one is what you addressed, the other is
more simple: how to use VS2005 from an account other than
"Administrator" when working on databases. So far I've not been able
to figure out this, and only use "Adminstrator" to code. This simple
question can be answered by an experienced user of VS2005, and is to
an extent a trivial question since I can do programming in VS as
"Administrator" (it's annoying to switch users using Windows XP Pro,
but it's only an annoyance, nothing more).

THanks for your help,

RL|||raylopez99 (raylopez99@.yahoo.com) writes:

Quote:

Originally Posted by

Thank you Erland. I see the problem is not as simple as I thought. I
also see I have two problems: one is what you addressed, the other is
more simple: how to use VS2005 from an account other than
"Administrator" when working on databases. So far I've not been able
to figure out this, and only use "Adminstrator" to code.


I did not answer that question, since I was uncertain of the scope of
your question. But it's fairly simple, although there are several options.

One is to enable SQL Server Authentication through Management Studio.
(Right-click the server itself in the Object Explorer, select Properties
and go the the Security tab. You need to restart SQL Server for the
setting to take effect.) Then you can connect as sa from VS and have
sysadmin rights. The good thing with this is that when you connect
through your application with Windows authentication, you are a plain
user and can test that you have granted that user the right permissions.

The other option is to add your Windows user to the sysadmin role:

sp_addsrvrolemember 'sysadmin', 'MACHINE\User'

(If command fails, try swapping the parameters; I may not remember the
order correctly.)
You would first have to grant MACHINE\User access to the SQL Server.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On Mar 30, 2:29 pm, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

raylopez99 (raylope...@.yahoo.com) writes:

Quote:

Originally Posted by

Thank you Erland. I see the problem is not as simple as I thought. I
also see I have two problems: one is what you addressed, the other is
more simple: how to use VS2005 from an account other than
"Administrator" when working on databases. So far I've not been able
to figure out this, and only use "Adminstrator" to code.


>
I did not answer that question, since I was uncertain of the scope of
your question. But it's fairly simple, although there are several options.
>
One is to enable SQL Server Authentication through Management Studio.
(Right-click the server itself in the Object Explorer, select Properties
and go the the Security tab. You need to restart SQL Server for the
setting to take effect.) Then you can connect as sa from VS and have
sysadmin rights. The good thing with this is that when you connect
through your application with Windows authentication, you are a plain
user and can test that you have granted that user the right permissions.
>


Well, turns out I don't have "Management Studio" on my system (yet
strangely I was able to create a simple SQL database and run some
commands). If you don't have "Management Studio" you don't have
"Object Explorer", even though it's possible to have SQL Server 2005
Express (a 36.5 MB file) and not the SQL Server Management Studio
Express (a 46.1 MB file) installed on your PC, as I have. Details
here: http://go.microsoft.com/fwlink/?LinkId=65110
I'll post again if I'm successful, for anybody reading this thread in
the future.

RL

Information on OE below...

Using Object Explorer

Object Explorer, a component of SQL Server Management Studio, connects
to Database Engine instances, Analysis Services, Integration Services,
Reporting Services, and SQL Server Compact Edition. It provides a view
of all the objects in the server and presents a user interface to
manage them. The capabilities of Object Explorer vary slightly
depending on the type of server, but generally include the development
features for databases, and management features for all server types.

Viewing Object Explorer

Object Explorer is visible in the Management Studio by default. If you
cannot see Object Explorer, on the View menu, click Object Explorer.

Connecting Object Explorer to a Server

To use Object Explorer you must first connect to a server. Click
Connect on the Object Explorer toolbar and choose the type of server
from the drop-down list. The Connect to Server dialog box opens. To
connect, you must provide at least the name of the server and the
correct authentication information.|||raylopez99 (raylopez99@.yahoo.com) writes:

Quote:

Originally Posted by

Well, turns out I don't have "Management Studio" on my system (yet
strangely I was able to create a simple SQL database and run some
commands). If you don't have "Management Studio" you don't have
"Object Explorer", even though it's possible to have SQL Server 2005
Express (a 36.5 MB file) and not the SQL Server Management Studio
Express (a 46.1 MB file) installed on your PC, as I have. Details
here: http://go.microsoft.com/fwlink/?LinkId=65110


I would definitely recommend that you download and install SQL Server
Management Studio Express. In the long run it will be difficult to be
without it. Particularly if you ask questions in newsgroups, because most
people answering questions will assume that you have Management Studio in
some form. :-)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On Mar 31, 2:42 pm, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

>
I would definitely recommend that you download and install SQL Server
Management Studio Express. In the long run it will be difficult to be
without it. Particularly if you ask questions in newsgroups, because most
people answering questions will assume that you have Management Studio in
some form. :-)
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se


Hi Erland--it worked! Thank you very much, now I can code as a non-
Administrator with no problem...except one: http://tinyurl.com/38ssp8
(a sort of bug in VS2005 doing SQL it seems)

However, at least I did solve this problem and I appreciate your
advice.

Cheers,

Ray|||raylopez99 (raylopez99@.yahoo.com) writes:

Quote:

Originally Posted by

Hi Erland--it worked! Thank you very much, now I can code as a non-
Administrator with no problem...except one: http://tinyurl.com/38ssp8
(a sort of bug in VS2005 doing SQL it seems)


As I understand that link, it's not a bug at all. If you want to create
a procedure, you use CREATE PROCEDURE. If you want to change an existing
procedure, you use ALTER PROCEDURE. Alternatively, you drop the existing
procedure first, but then you would have to reapply permissions. Visual
Studio helps you out by changing CREATE to ALTER for you.

Also, one thing to keep in mind is that you enter things into the database,
that is not a Save operation, although unfortunately some tools use that
terminology. As with all other programming code, you save your code to disk
and then put it under version control. Regard what's in the database as
binaries.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

NEWBIE Needs Help automating data from another server

Hi,

I am able to do these actions interactively from SQL 2005 (not developers nor enterprise edition, just using SQL 2005 Mgmt Studio) and want to "script/batch" them so I can have them automatically run at a pre selected time.

First: I am able to delete the table by performing a right click on the table, then click Delete from Mgmt Studio SQL 2005. I verify the table is completely gone with a refresh. (I pulled the code that did this ..... DROP TABLE etc. to Notepad)

2nd: I am able to import the table (again from Mgmt Studio SQL 2005) and have saved this action as a SSIS. Execute the script and "waLa" I have all 17K rows of data. I pulled this create table code into notepad also.

Now I put the code of both of the above actions together (drop table and create table) into one SQL query and execute it. This does not give me the same results of above, instead my table is blank now.

Maybe there is a better way. The business problem I am attempting to solve: I am refreshing the data in a as/400 table weekly. I want that refreshed data to be available in the SQL2005 database without my having to press buttons first thing Monday morning. Can any one help? Thanks in advance.

Below is the Code:

USE [400kas]
GO
/****** Object: Table [dbo].[navar100] Script Date: 09/07/2007 16:09:04 ******/
DROP TABLE [dbo].[navar100]
GO


USE [400kas]
GO
/****** Object: Table [dbo].[Query] Script Date: 09/07/2007 16:12:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[navar100](
[CMPNO] [decimal](3, 0) NOT NULL,
[ARTDT] [datetime] NOT NULL,
[AUDDT] [datetime] NOT NULL,
[ARDDT] [datetime] NOT NULL,
[CCUS#] [decimal](6, 0) NOT NULL,
[CCNAM] [nvarchar](25) NOT NULL,
[CUSNO] [decimal](6, 0) NOT NULL,
[CNAME] [nvarchar](25) NOT NULL,
[SHPNO] [decimal](4, 0) NOT NULL,
[ARRCD] [nvarchar](1) NOT NULL,
[AUDUS] [nvarchar](10) NOT NULL,
[INVNO] [decimal](6, 0) NOT NULL,
[CUSPO] [nvarchar](15) NOT NULL,
[REFNO] [decimal](6, 0) NOT NULL,
[COMNT] [nvarchar](10) NOT NULL,
[SHPPO] [nvarchar](15) NOT NULL,
[AMONT] [decimal](13, 2) NOT NULL,
[AMOUNT] [decimal](24, 8) NOT NULL,
[REMAN] [decimal](13, 2) NOT NULL,
[INREG] [decimal](3, 0) NOT NULL,
[INSAL] [decimal](3, 0) NOT NULL,
[TMCOD] [nvarchar](2) NOT NULL,
[CRHLD] [nvarchar](1) NOT NULL,
[CRLIM] [decimal](13, 0) NOT NULL,
[CRDAY] [decimal](3, 0) NOT NULL,
[TCRCD] [nvarchar](3) NOT NULL,
[TEXRT] [decimal](11, 6) NOT NULL,
[R1RGL] [decimal](13, 2) NOT NULL,
[TAXAM] [decimal](13, 2) NOT NULL,
[TFRTX] [decimal](13, 3) NOT NULL,
[TFRGT] [decimal](13, 2) NOT NULL,
[TSPCH] [decimal](13, 2) NOT NULL,
[SPCST] [decimal](13, 2) NOT NULL,
[IRPFT] [decimal](13, 2) NOT NULL
) ON [PRIMARY]

Instead of dropping and recreating the table, you can just truncate it.

e.g.

Code Snippet

truncate table [400kas];

|||

1) create an ssis package that pulls the the data from the as400 to your table

-execute sql task- truncate table <tableName>

-data flow task to pull data from source to target

2)create a sql server agent job that executes the package, and runs at the time you'd like (ex. everyday at 7am)

Monday, March 12, 2012

Newbie Installation Problem

I'm using Visual Studio.Net and have been unable to access SQL Server
Databases from the Server Explorer. Under SQL Servers I did see one from the
Office Business Contact Manager (BCM). So I down loaded the MSDE Sp3a file
and installed it from a command prompt, setup SAPWD="AStrongPassword"
(substituting an actual password within the quotes). The setup seemed to
proceed smoothly and then just ended. Now in VS.Net Server Exporer I see a
second SQL Server with simply the computer name, and when I click on the "+"
to expand it, a Login Box pops up with my username under Login. If have
tried typing the password I entered after the SAPWD parameter with my user
name and the following login names: sa, SA, Admin, Administrator, all to no
effect. I've entered the password with and without quotes. Each time I get
the server does not exist or access denied message. The only way I have been
able to tell if the MSDE is actually running is by looking under processes in
the task manager. There I do see an SQL2000 process. I've looked at the
knowledge base describing connection problems, and most of those seemed to be
related to access from other computers, and it really isn't clear to me which
of the problems they describe might apply to a local machine by itself. Is
there a different login name I should be using? Many of the wizards in
Visual Studio only work with MS SQL, so its a real hassle not having it
installed. Any suggestions would be greatly appreciated.
hi,
JerryKogan wrote:
> I'm using Visual Studio.Net and have been unable to access SQL Server
> Databases from the Server Explorer. Under SQL Servers I did see one
> from the Office Business Contact Manager (BCM). So I down loaded the
> MSDE Sp3a file and installed it from a command prompt, setup
> SAPWD="AStrongPassword" (substituting an actual password within the
> quotes). The setup seemed to proceed smoothly and then just ended.
> Now in VS.Net Server Exporer I see a second SQL Server with simply
> the computer name, and when I click on the "+" to expand it, a Login
> Box pops up with my username under Login. If have tried typing the
> password I entered after the SAPWD parameter with my user name and
> the following login names: sa, SA, Admin, Administrator, all to no
> effect. I've entered the password with and without quotes. Each
> time I get the server does not exist or access denied message. The
> only way I have been able to tell if the MSDE is actually running is
> by looking under processes in the task manager. There I do see an
> SQL2000 process. I've looked at the knowledge base describing
> connection problems, and most of those seemed to be related to access
> from other computers, and it really isn't clear to me which of the
> problems they describe might apply to a local machine by itself. Is
> there a different login name I should be using? Many of the wizards
> in Visual Studio only work with MS SQL, so its a real hassle not
> having it installed. Any suggestions would be greatly appreciated.
MSDE installs by default allowing only tusted WinNT authenticated
connections.. you have to provide the additional
SECURITYMODE=SQL
parameter to the setup.exe boostrap installer to allow SQL Server (standard)
authenticated connections or, after install, to modify the Windows registry
as foillowing:
(named instance)
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\InstanceName\MSSQLServer
LoginMode=2
(default instance, your case)
HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
LoginMode=2
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply