Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Tuesday, March 27, 2012

can not delete tempdb

Hi,
after a huge ODBC operation to read some data from a DB table, my tempdb
is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
right mouse click and delete does not work, dbcc checks does not work. I
even stopped the service and started it again, but tempdb did not
regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
log file but after I started the MSSQLSERVER service, they are all
recovered as 2.8 GB.
How can I get rid of this tempdb?
regards,
atxTempdb can not be dropped. In fact, your concern is just to reduce size of
the tempdb. You can use DBCC Shrinkdatabase or DBCC Shrinkfile for that.
"atx" wrote:

> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx
>|||Look at trying "Method 1 to Shrink Tempdb" in the KB article below
http://support.microsoft.com/?id=307487
"atx" <atx@.xerox.com> wrote in message
news:uBQHOwC9FHA.2832@.TK2MSFTNGP14.phx.gbl...
> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx

can not delete tempdb

Hi,
after a huge ODBC operation to read some data from a DB table, my tempdb
is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
right mouse click and delete does not work, dbcc checks does not work. I
even stopped the service and started it again, but tempdb did not
regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
log file but after I started the MSSQLSERVER service, they are all
recovered as 2.8 GB.
How can I get rid of this tempdb?
regards,
atxTempdb can not be dropped. In fact, your concern is just to reduce size of
the tempdb. You can use DBCC Shrinkdatabase or DBCC Shrinkfile for that.
"atx" wrote:
> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx
>|||Look at trying "Method 1 to Shrink Tempdb" in the KB article below
http://support.microsoft.com/?id=307487
"atx" <atx@.xerox.com> wrote in message
news:uBQHOwC9FHA.2832@.TK2MSFTNGP14.phx.gbl...
> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx

can not delete tempdb

Hi,
after a huge ODBC operation to read some data from a DB table, my tempdb
is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
right mouse click and delete does not work, dbcc checks does not work. I
even stopped the service and started it again, but tempdb did not
regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
log file but after I started the MSSQLSERVER service, they are all
recovered as 2.8 GB.
How can I get rid of this tempdb?
regards,
atx
Tempdb can not be dropped. In fact, your concern is just to reduce size of
the tempdb. You can use DBCC Shrinkdatabase or DBCC Shrinkfile for that.
"atx" wrote:

> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx
>
|||Look at trying "Method 1 to Shrink Tempdb" in the KB article below
http://support.microsoft.com/?id=307487
"atx" <atx@.xerox.com> wrote in message
news:uBQHOwC9FHA.2832@.TK2MSFTNGP14.phx.gbl...
> Hi,
> after a huge ODBC operation to read some data from a DB table, my tempdb
> is now 2.8 GB and I can not delete tempdb. Query analyzer does not work,
> right mouse click and delete does not work, dbcc checks does not work. I
> even stopped the service and started it again, but tempdb did not
> regenerated and still 2.8 GB. I manually deleted the tempdb.mdf file and
> log file but after I started the MSSQLSERVER service, they are all
> recovered as 2.8 GB.
> How can I get rid of this tempdb?
> regards,
> atx

Thursday, March 22, 2012

Can not connect to SQL server 2000 on windows authentication mode

Hello everyone,

We have SQL server 2000 on windows 2000. From our desktop MS Access was connected to database through ODBC. Since yesterday (after our consultant had updated another asp application in the same server) we are getting “SQL Server Error: 18452. ….. Login failed for user ‘(null)’. Reason: not associated with a trusted SQL Server connection. “

The consultant saying he did not touch any settings on server (?). And the problem is even server’s security property shows it has mixed mode authentication. But I cannot connect to server even through my SQL server enterprise manager in windows authentication mode. I can connect if I use SQL server authentication. Through ODBC I can connect also and test fine, if I use SQL authentication. But the Access application wouldn’t connect using SQL authentication in ODBC.

So, can any one help me to find out what else could be done to make sure that the server is going to accept windows authentication. I’m thinking any other settings or registry change … etc. Please help.

Thanks

You are getting the error during the communication with the Web Servcie, right ? Then you probably changed the Security of the ASP application to not allow Integrated authentication. Are you using an asp or an ASP.nET application ?

HTH, jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi Jens,

No our web service is fine. We are trying to connect through ODBC and SQL enterprise manager.

|||

Hi Taposh,

Did any of the security settings on the SQL Server itself changed? (ie. was some Windows user account access removed from SQL security settings?) You can verify this by using Enterprise manager and login using "sa" and expand the server; expand Security, and then click Logins.

Unfortunately, there are a few scenarios in which you will receive an 18452 error back from the server. Some of the typical scenarios include; missing login rights for Windows users; client and server on different domains (Kerberos trust issue).

Please have a look at http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx

I would also recommend searching on the web using the error message as the key phrase.

HTH,
Jimmy

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:
> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
> >A user who has been connected to our server for several years can not
> >longer
> > connect.
> >
> > The error through ODBC shows the following :
> > Connection failed:
> > SQLState: '01000'
> > [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> > (Connect()).
> > Connection failed:
> > SQLState: '08001'
> > SQL Server Error: 6
> > [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> > not
> > found.
> >
> > No one else in the firm is having troubles connecting to the server. The
> > server has SP4 applied.
>
>

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Op
en
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL
Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection
Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified S
QL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:

> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>
>sql

Can not connect to SQL Server

A user who has been connected to our server for several years can not longer
connect.
The error through ODBC shows the following :
Connection failed:
SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server not
found.
No one else in the firm is having troubles connecting to the server. The
server has SP4 applied.
Can he ping the server by hostname? Check to his ODBC connection to ensure
that it is correct. It sounds like a name resolution problem.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>A user who has been connected to our server for several years can not
>longer
> connect.
> The error through ODBC shows the following :
> Connection failed:
> SQLState: '01000'
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 6
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL Server
> not
> found.
> No one else in the firm is having troubles connecting to the server. The
> server has SP4 applied.
|||They can ping and connect to other named instances on the server.
I have since found if they put "SERVERNAME\PortNumber" instead of
"SERVERNAME\INSTANCENAME" in their definition it all works.
Why is that ?
"Hilary Cotter" wrote:

> Can he ping the server by hostname? Check to his ODBC connection to ensure
> that it is correct. It sounds like a name resolution problem.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Snoopstah" <Snoopstah@.discussions.microsoft.com> wrote in message
> news:84167888-D06E-4E37-8030-103ABF66F29D@.microsoft.com...
>
>

Sunday, March 11, 2012

Can it be read only ?

We get connected to a SQL Server 2000 database by using
Access 2000 with ODBC Connection.
Is it possible for us to read data from the SQL Server
Database with Access only ? This is because we find that
we can update the data in SQL Server with Access BUT we
don't want to make any changes accidentially.Hi
You can make the whole database read only but then no-one will be able to
update any data. By only granting select permissions to the tables for the
user you are connecting with, they will not be able to update/insert data if
they access the data directly (SELECT statements). If you are using stored
procedures then it will be that users' permissions which will restrict the
actions and the user that you connect with will need execute permissions on
the stored procedure.
Books online is a great resource for finding out things related to SQL
Server, check out the topics "Setting Database Options", "Managing
Permissions" and "Owners and Permissions". If Books online is not in your SQL
Server program group on the start menu, it can be downloaded from
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
John
"Jason" wrote:
> We get connected to a SQL Server 2000 database by using
> Access 2000 with ODBC Connection.
> Is it possible for us to read data from the SQL Server
> Database with Access only ? This is because we find that
> we can update the data in SQL Server with Access BUT we
> don't want to make any changes accidentially.
>|||Dear John,
From your reply, my understanding is that the behaviour depends on the user
account used to create the ODBC connection.
If I create a login that belongs to db_datareader and public database roles
AND use this account for ODBC connection, I will be able to SELECT from
tables and cannot alter the data.
On the other hand, is there any database role that allows a login to execute
Stored Procedures (Instead of setting up one by one) ?
Thanks
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
> Hi
> You can make the whole database read only but then no-one will be able to
> update any data. By only granting select permissions to the tables for the
> user you are connecting with, they will not be able to update/insert data
> if
> they access the data directly (SELECT statements). If you are using stored
> procedures then it will be that users' permissions which will restrict the
> actions and the user that you connect with will need execute permissions
> on
> the stored procedure.
> Books online is a great resource for finding out things related to SQL
> Server, check out the topics "Setting Database Options", "Managing
> Permissions" and "Owners and Permissions". If Books online is not in your
> SQL
> Server program group on the start menu, it can be downloaded from
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
> John
>
> "Jason" wrote:
>> We get connected to a SQL Server 2000 database by using
>> Access 2000 with ODBC Connection.
>> Is it possible for us to read data from the SQL Server
>> Database with Access only ? This is because we find that
>> we can update the data in SQL Server with Access BUT we
>> don't want to make any changes accidentially.
>>|||Hi
Adding users to the db_datareader will mean they can select all data from
any user table in the database, this may not be restictive enough if you have
say configuration or sensitive information that you don't want them to see.
The best way to assign specific permissions would be to create a role
(sp_addrole) and assign the permissions to that role, then make an NT Group
or SQL Server user a member of the role (sp_addrolemember). The users can
then be added to the appropriate group rather than having to assign specific
permissions to each one.
John
"Jason" wrote:
> Dear John,
> From your reply, my understanding is that the behaviour depends on the user
> account used to create the ODBC connection.
> If I create a login that belongs to db_datareader and public database roles
> AND use this account for ODBC connection, I will be able to SELECT from
> tables and cannot alter the data.
> On the other hand, is there any database role that allows a login to execute
> Stored Procedures (Instead of setting up one by one) ?
> Thanks
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
> > Hi
> >
> > You can make the whole database read only but then no-one will be able to
> > update any data. By only granting select permissions to the tables for the
> > user you are connecting with, they will not be able to update/insert data
> > if
> > they access the data directly (SELECT statements). If you are using stored
> > procedures then it will be that users' permissions which will restrict the
> > actions and the user that you connect with will need execute permissions
> > on
> > the stored procedure.
> >
> > Books online is a great resource for finding out things related to SQL
> > Server, check out the topics "Setting Database Options", "Managing
> > Permissions" and "Owners and Permissions". If Books online is not in your
> > SQL
> > Server program group on the start menu, it can be downloaded from
> > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
> >
> > John
> >
> >
> > "Jason" wrote:
> >
> >> We get connected to a SQL Server 2000 database by using
> >> Access 2000 with ODBC Connection.
> >>
> >> Is it possible for us to read data from the SQL Server
> >> Database with Access only ? This is because we find that
> >> we can update the data in SQL Server with Access BUT we
> >> don't want to make any changes accidentially.
> >>
> >>
>
>|||Dear John,
From my understanding, you suggest to create a application role that assign
permissions to tables / stored procedures.
Then create logins and add them to the role created before.
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...
> Hi
> Adding users to the db_datareader will mean they can select all data from
> any user table in the database, this may not be restictive enough if you
> have
> say configuration or sensitive information that you don't want them to
> see.
> The best way to assign specific permissions would be to create a role
> (sp_addrole) and assign the permissions to that role, then make an NT
> Group
> or SQL Server user a member of the role (sp_addrolemember). The users can
> then be added to the appropriate group rather than having to assign
> specific
> permissions to each one.
> John
> "Jason" wrote:
>> Dear John,
>> From your reply, my understanding is that the behaviour depends on the
>> user
>> account used to create the ODBC connection.
>> If I create a login that belongs to db_datareader and public database
>> roles
>> AND use this account for ODBC connection, I will be able to SELECT from
>> tables and cannot alter the data.
>> On the other hand, is there any database role that allows a login to
>> execute
>> Stored Procedures (Instead of setting up one by one) ?
>> Thanks
>> Jason
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
>> > Hi
>> >
>> > You can make the whole database read only but then no-one will be able
>> > to
>> > update any data. By only granting select permissions to the tables for
>> > the
>> > user you are connecting with, they will not be able to update/insert
>> > data
>> > if
>> > they access the data directly (SELECT statements). If you are using
>> > stored
>> > procedures then it will be that users' permissions which will restrict
>> > the
>> > actions and the user that you connect with will need execute
>> > permissions
>> > on
>> > the stored procedure.
>> >
>> > Books online is a great resource for finding out things related to SQL
>> > Server, check out the topics "Setting Database Options", "Managing
>> > Permissions" and "Owners and Permissions". If Books online is not in
>> > your
>> > SQL
>> > Server program group on the start menu, it can be downloaded from
>> > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
>> >
>> > John
>> >
>> >
>> > "Jason" wrote:
>> >
>> >> We get connected to a SQL Server 2000 database by using
>> >> Access 2000 with ODBC Connection.
>> >>
>> >> Is it possible for us to read data from the SQL Server
>> >> Database with Access only ? This is because we find that
>> >> we can update the data in SQL Server with Access BUT we
>> >> don't want to make any changes accidentially.
>> >>
>> >>
>>|||Hi Jason
Just a "normal" SQL Server role would probably be better as you wont need to
worry about a setting the application role and the password. If you are using
windows authentication create a group and assign the NT logins for the users
that require access to that group. Then add the NT group as a member of the
SQL Server role (sp_addrolemember). If you are using SQL Server
authentication add the each SQL Server user to the SQL Server role.
Only allowing the users to access the data through Stored Procedure would
enable you to create a more restricted policy.
John
"Jason" wrote:
> Dear John,
> From my understanding, you suggest to create a application role that assign
> permissions to tables / stored procedures.
> Then create logins and add them to the role created before.
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...
> > Hi
> >
> > Adding users to the db_datareader will mean they can select all data from
> > any user table in the database, this may not be restictive enough if you
> > have
> > say configuration or sensitive information that you don't want them to
> > see.
> >
> > The best way to assign specific permissions would be to create a role
> > (sp_addrole) and assign the permissions to that role, then make an NT
> > Group
> > or SQL Server user a member of the role (sp_addrolemember). The users can
> > then be added to the appropriate group rather than having to assign
> > specific
> > permissions to each one.
> >
> > John
> >
> > "Jason" wrote:
> >
> >> Dear John,
> >>
> >> From your reply, my understanding is that the behaviour depends on the
> >> user
> >> account used to create the ODBC connection.
> >>
> >> If I create a login that belongs to db_datareader and public database
> >> roles
> >> AND use this account for ODBC connection, I will be able to SELECT from
> >> tables and cannot alter the data.
> >>
> >> On the other hand, is there any database role that allows a login to
> >> execute
> >> Stored Procedures (Instead of setting up one by one) ?
> >>
> >> Thanks
> >> Jason
> >>
> >> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> >> news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
> >> > Hi
> >> >
> >> > You can make the whole database read only but then no-one will be able
> >> > to
> >> > update any data. By only granting select permissions to the tables for
> >> > the
> >> > user you are connecting with, they will not be able to update/insert
> >> > data
> >> > if
> >> > they access the data directly (SELECT statements). If you are using
> >> > stored
> >> > procedures then it will be that users' permissions which will restrict
> >> > the
> >> > actions and the user that you connect with will need execute
> >> > permissions
> >> > on
> >> > the stored procedure.
> >> >
> >> > Books online is a great resource for finding out things related to SQL
> >> > Server, check out the topics "Setting Database Options", "Managing
> >> > Permissions" and "Owners and Permissions". If Books online is not in
> >> > your
> >> > SQL
> >> > Server program group on the start menu, it can be downloaded from
> >> > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
> >> >
> >> > John
> >> >
> >> >
> >> > "Jason" wrote:
> >> >
> >> >> We get connected to a SQL Server 2000 database by using
> >> >> Access 2000 with ODBC Connection.
> >> >>
> >> >> Is it possible for us to read data from the SQL Server
> >> >> Database with Access only ? This is because we find that
> >> >> we can update the data in SQL Server with Access BUT we
> >> >> don't want to make any changes accidentially.
> >> >>
> >> >>
> >>
> >>
> >>
>
>

Can it be read only ?

We get connected to a SQL Server 2000 database by using
Access 2000 with ODBC Connection.
Is it possible for us to read data from the SQL Server
Database with Access only ? This is because we find that
we can update the data in SQL Server with Access BUT we
don't want to make any changes accidentially.
Hi
You can make the whole database read only but then no-one will be able to
update any data. By only granting select permissions to the tables for the
user you are connecting with, they will not be able to update/insert data if
they access the data directly (SELECT statements). If you are using stored
procedures then it will be that users' permissions which will restrict the
actions and the user that you connect with will need execute permissions on
the stored procedure.
Books online is a great resource for finding out things related to SQL
Server, check out the topics "Setting Database Options", "Managing
Permissions" and "Owners and Permissions". If Books online is not in your SQL
Server program group on the start menu, it can be downloaded from
http://www.microsoft.com/sql/techinf...000/books.mspx
John
"Jason" wrote:

> We get connected to a SQL Server 2000 database by using
> Access 2000 with ODBC Connection.
> Is it possible for us to read data from the SQL Server
> Database with Access only ? This is because we find that
> we can update the data in SQL Server with Access BUT we
> don't want to make any changes accidentially.
>
|||Dear John,
From your reply, my understanding is that the behaviour depends on the user
account used to create the ODBC connection.
If I create a login that belongs to db_datareader and public database roles
AND use this account for ODBC connection, I will be able to SELECT from
tables and cannot alter the data.
On the other hand, is there any database role that allows a login to execute
Stored Procedures (Instead of setting up one by one) ?
Thanks
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...[vbcol=seagreen]
> Hi
> You can make the whole database read only but then no-one will be able to
> update any data. By only granting select permissions to the tables for the
> user you are connecting with, they will not be able to update/insert data
> if
> they access the data directly (SELECT statements). If you are using stored
> procedures then it will be that users' permissions which will restrict the
> actions and the user that you connect with will need execute permissions
> on
> the stored procedure.
> Books online is a great resource for finding out things related to SQL
> Server, check out the topics "Setting Database Options", "Managing
> Permissions" and "Owners and Permissions". If Books online is not in your
> SQL
> Server program group on the start menu, it can be downloaded from
> http://www.microsoft.com/sql/techinf...000/books.mspx
> John
>
> "Jason" wrote:
|||Hi
Adding users to the db_datareader will mean they can select all data from
any user table in the database, this may not be restictive enough if you have
say configuration or sensitive information that you don't want them to see.
The best way to assign specific permissions would be to create a role
(sp_addrole) and assign the permissions to that role, then make an NT Group
or SQL Server user a member of the role (sp_addrolemember). The users can
then be added to the appropriate group rather than having to assign specific
permissions to each one.
John
"Jason" wrote:

> Dear John,
> From your reply, my understanding is that the behaviour depends on the user
> account used to create the ODBC connection.
> If I create a login that belongs to db_datareader and public database roles
> AND use this account for ODBC connection, I will be able to SELECT from
> tables and cannot alter the data.
> On the other hand, is there any database role that allows a login to execute
> Stored Procedures (Instead of setting up one by one) ?
> Thanks
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
>
>
|||Dear John,
From my understanding, you suggest to create a application role that assign
permissions to tables / stored procedures.
Then create logins and add them to the role created before.
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...[vbcol=seagreen]
> Hi
> Adding users to the db_datareader will mean they can select all data from
> any user table in the database, this may not be restictive enough if you
> have
> say configuration or sensitive information that you don't want them to
> see.
> The best way to assign specific permissions would be to create a role
> (sp_addrole) and assign the permissions to that role, then make an NT
> Group
> or SQL Server user a member of the role (sp_addrolemember). The users can
> then be added to the appropriate group rather than having to assign
> specific
> permissions to each one.
> John
> "Jason" wrote:
|||Hi Jason
Just a "normal" SQL Server role would probably be better as you wont need to
worry about a setting the application role and the password. If you are using
windows authentication create a group and assign the NT logins for the users
that require access to that group. Then add the NT group as a member of the
SQL Server role (sp_addrolemember). If you are using SQL Server
authentication add the each SQL Server user to the SQL Server role.
Only allowing the users to access the data through Stored Procedure would
enable you to create a more restricted policy.
John
"Jason" wrote:

> Dear John,
> From my understanding, you suggest to create a application role that assign
> permissions to tables / stored procedures.
> Then create logins and add them to the role created before.
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...
>
>

Can it be read only ?

We get connected to a SQL Server 2000 database by using
Access 2000 with ODBC Connection.
Is it possible for us to read data from the SQL Server
Database with Access only ? This is because we find that
we can update the data in SQL Server with Access BUT we
don't want to make any changes accidentially.Hi
You can make the whole database read only but then no-one will be able to
update any data. By only granting select permissions to the tables for the
user you are connecting with, they will not be able to update/insert data if
they access the data directly (SELECT statements). If you are using stored
procedures then it will be that users' permissions which will restrict the
actions and the user that you connect with will need execute permissions on
the stored procedure.
Books online is a great resource for finding out things related to SQL
Server, check out the topics "Setting Database Options", "Managing
Permissions" and "Owners and Permissions". If Books online is not in your SQ
L
Server program group on the start menu, it can be downloaded from
http://www.microsoft.com/sql/techin...2000/books.mspx
John
"Jason" wrote:

> We get connected to a SQL Server 2000 database by using
> Access 2000 with ODBC Connection.
> Is it possible for us to read data from the SQL Server
> Database with Access only ? This is because we find that
> we can update the data in SQL Server with Access BUT we
> don't want to make any changes accidentially.
>|||Dear John,
From your reply, my understanding is that the behaviour depends on the user
account used to create the ODBC connection.
If I create a login that belongs to db_datareader and public database roles
AND use this account for ODBC connection, I will be able to SELECT from
tables and cannot alter the data.
On the other hand, is there any database role that allows a login to execute
Stored Procedures (Instead of setting up one by one) ?
Thanks
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...[vbcol=seagreen]
> Hi
> You can make the whole database read only but then no-one will be able to
> update any data. By only granting select permissions to the tables for the
> user you are connecting with, they will not be able to update/insert data
> if
> they access the data directly (SELECT statements). If you are using stored
> procedures then it will be that users' permissions which will restrict the
> actions and the user that you connect with will need execute permissions
> on
> the stored procedure.
> Books online is a great resource for finding out things related to SQL
> Server, check out the topics "Setting Database Options", "Managing
> Permissions" and "Owners and Permissions". If Books online is not in your
> SQL
> Server program group on the start menu, it can be downloaded from
> http://www.microsoft.com/sql/techin...2000/books.mspx
> John
>
> "Jason" wrote:
>|||Hi
Adding users to the db_datareader will mean they can select all data from
any user table in the database, this may not be restictive enough if you hav
e
say configuration or sensitive information that you don't want them to see.
The best way to assign specific permissions would be to create a role
(sp_addrole) and assign the permissions to that role, then make an NT Group
or SQL Server user a member of the role (sp_addrolemember). The users can
then be added to the appropriate group rather than having to assign specific
permissions to each one.
John
"Jason" wrote:

> Dear John,
> From your reply, my understanding is that the behaviour depends on the use
r
> account used to create the ODBC connection.
> If I create a login that belongs to db_datareader and public database role
s
> AND use this account for ODBC connection, I will be able to SELECT from
> tables and cannot alter the data.
> On the other hand, is there any database role that allows a login to execu
te
> Stored Procedures (Instead of setting up one by one) ?
> Thanks
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:6EFF1E1A-C551-49E1-806B-6B1C9A22C13A@.microsoft.com...
>
>|||Dear John,
From my understanding, you suggest to create a application role that assign
permissions to tables / stored procedures.
Then create logins and add them to the role created before.
Jason
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...[vbcol=seagreen]
> Hi
> Adding users to the db_datareader will mean they can select all data from
> any user table in the database, this may not be restictive enough if you
> have
> say configuration or sensitive information that you don't want them to
> see.
> The best way to assign specific permissions would be to create a role
> (sp_addrole) and assign the permissions to that role, then make an NT
> Group
> or SQL Server user a member of the role (sp_addrolemember). The users can
> then be added to the appropriate group rather than having to assign
> specific
> permissions to each one.
> John
> "Jason" wrote:
>|||Hi Jason
Just a "normal" SQL Server role would probably be better as you wont need to
worry about a setting the application role and the password. If you are usin
g
windows authentication create a group and assign the NT logins for the users
that require access to that group. Then add the NT group as a member of the
SQL Server role (sp_addrolemember). If you are using SQL Server
authentication add the each SQL Server user to the SQL Server role.
Only allowing the users to access the data through Stored Procedure would
enable you to create a more restricted policy.
John
"Jason" wrote:

> Dear John,
> From my understanding, you suggest to create a application role that assig
n
> permissions to tables / stored procedures.
> Then create logins and add them to the role created before.
> Jason
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:F2EB7ECA-7D62-467F-8E65-F9D255499776@.microsoft.com...
>
>

Thursday, March 8, 2012

Can I use stored procedures with PHP via ODBC bridge?

Hey Everyone,

I am a stored procedures newbie, so I wanted to ask if it is possible
to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
server. I am simply use the commands from the php odbc library to
connect and execute the SQL commands, I am trying to avoid building
dynamic queries, so stored proceddures seem to be the answer. I know
that there are only certain environments stored procedures can be used
within. Thank you for all of your help.Storedprocs can be started through queries which should not bring any
problems in using them with PHP, but test it.
I don't know how the query_resource (return value) is handled in a
Stored proc but I believe any return values wll be returned in fieldlike
structures.
Anyway thats how it works in Pascal...
Working in PHP&MySQL platforms haven't given me the opportunity to test
that functionality in PHP.

Regards,
Toke Herkild

gene.ellis@.gmail.com wrote:
> Hey Everyone,
> I am a stored procedures newbie, so I wanted to ask if it is possible
> to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
> server. I am simply use the commands from the php odbc library to
> connect and execute the SQL commands, I am trying to avoid building
> dynamic queries, so stored proceddures seem to be the answer. I know
> that there are only certain environments stored procedures can be used
> within. Thank you for all of your help.|||Yes, it it is possible, and works OK.

Check out the latest PHP manual ==> Function Reference ==> Microsoft
SQL Server Functions ==> mssql_execute().

HTH,
Rob

Saturday, February 25, 2012

Can I use integrated security in an ODBC connection string without using a DSN?

Can I use integrated security in an ODBC connection string without using a
DSN?
If so, what would the syntax be for SQL Server and Oracle (if supported by
Oracle)?
TonyTrusted connection:
"Driver={SQL Server};Server=Aron1;Database=pubs;Trust
ed_Connection=yes;
"
from http://www.connectionstrings.com/ (really good source for
connectionstrings)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
news:O4upNWsbFHA.3492@.TK2MSFTNGP14.phx.gbl...
> Can I use integrated security in an ODBC connection string without using a
> DSN?
> If so, what would the syntax be for SQL Server and Oracle (if supported by
> Oracle)?
> Tony
>|||Thanks...
Do you know of a way to connect using integrated security with Oracle?
Tony
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:Onf$jAtbFHA.2936@.tk2msftngp13.phx.gbl...
> Trusted connection:
> "Driver={SQL Server};Server=Aron1;Database=pubs;Trust
ed_Connection=ye
s;"
> from http://www.connectionstrings.com/ (really good source for
> connectionstrings)
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
> news:O4upNWsbFHA.3492@.TK2MSFTNGP14.phx.gbl...
>|||YOu have to set a parameter in the SQLNet.Ora
http://www.windowsitpro.com/Windows...2280/42280.html
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
news:Oq36BPwbFHA.1044@.TK2MSFTNGP10.phx.gbl...
> Thanks...
> Do you know of a way to connect using integrated security with Oracle?
> Tony
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:Onf$jAtbFHA.2936@.tk2msftngp13.phx.gbl...
>

Can I use integrated security in an ODBC connection string without using a DSN?

Can I use integrated security in an ODBC connection string without using a
DSN?
If so, what would the syntax be for SQL Server and Oracle (if supported by
Oracle)?
Tony
Trusted connection:
"Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connect ion=yes;"
from http://www.connectionstrings.com/ (really good source for
connectionstrings)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
news:O4upNWsbFHA.3492@.TK2MSFTNGP14.phx.gbl...
> Can I use integrated security in an ODBC connection string without using a
> DSN?
> If so, what would the syntax be for SQL Server and Oracle (if supported by
> Oracle)?
> Tony
>
|||Thanks...
Do you know of a way to connect using integrated security with Oracle?
Tony
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:Onf$jAtbFHA.2936@.tk2msftngp13.phx.gbl...
> Trusted connection:
> "Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connect ion=yes;"
> from http://www.connectionstrings.com/ (really good source for
> connectionstrings)
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
> news:O4upNWsbFHA.3492@.TK2MSFTNGP14.phx.gbl...
>
|||YOu have to set a parameter in the SQLNet.Ora
http://www.windowsitpro.com/Windows/...280/42280.html
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Tony" <tonyng2@.spacecommand.net> schrieb im Newsbeitrag
news:Oq36BPwbFHA.1044@.TK2MSFTNGP10.phx.gbl...
> Thanks...
> Do you know of a way to connect using integrated security with Oracle?
> Tony
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:Onf$jAtbFHA.2936@.tk2msftngp13.phx.gbl...
>