Showing posts with label below. Show all posts
Showing posts with label below. Show all posts

Friday, March 30, 2012

ODBC Error

I am trying to reinstall MSQL Server 2000, but the
installation fails. The sqlstp.log has the message
below. I have reinstalled MDAC and the error persists. Can someone tell me
what is wrong and how to fix
it?
Sincerely,
Alvin
Starting Service ...
SQL_Latin1_General_CP1_CI_AS
-m -Q -T4022 -T3659
Connecting to Server ...
driver={sql
server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
on SQL_HANDLE_ENV failed
driver={sql
server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
on SQL_HANDLE_ENV failed
driver={sql
server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
on SQL_HANDLE_ENV failed
SQL Server configuration failed.Hi
What OS and Edition are you trying to install SQL Server on? Do you have
admin rights on the machine?
Regards
Mike
"Alvin" wrote:
> I am trying to reinstall MSQL Server 2000, but the
> installation fails. The sqlstp.log has the message
> below. I have reinstalled MDAC and the error persists. Can someone tell me
> what is wrong and how to fix
> it?
> Sincerely,
> Alvin
> Starting Service ...
> SQL_Latin1_General_CP1_CI_AS
> -m -Q -T4022 -T3659
> Connecting to Server ...
> driver={sql
> server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> on SQL_HANDLE_ENV failed
> driver={sql
> server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> on SQL_HANDLE_ENV failed
> driver={sql
> server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> on SQL_HANDLE_ENV failed
> SQL Server configuration failed.
>|||I am installing it on Server 2003 and yes, I have admin rights.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> What OS and Edition are you trying to install SQL Server on? Do you have
> admin rights on the machine?
> Regards
> Mike
> "Alvin" wrote:
> > I am trying to reinstall MSQL Server 2000, but the
> > installation fails. The sqlstp.log has the message
> > below. I have reinstalled MDAC and the error persists. Can someone tell me
> > what is wrong and how to fix
> > it?
> >
> > Sincerely,
> > Alvin
> >
> > Starting Service ...
> >
> > SQL_Latin1_General_CP1_CI_AS
> >
> > -m -Q -T4022 -T3659
> >
> > Connecting to Server ...
> >
> > driver={sql
> > server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> >
> > [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> > on SQL_HANDLE_ENV failed
> >
> > driver={sql
> > server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> >
> > [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> > on SQL_HANDLE_ENV failed
> >
> > driver={sql
> > server};server=DENISPUTNAMTOSH;UID=sa;PWD=;databas e=master
> >
> > [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle
> > on SQL_HANDLE_ENV failed
> >
> > SQL Server configuration failed.
> >
> >

ODBC Error

Does anyone have idea on how to reslove this error message
below.
Error Source 4, code 01000 10054
[microsoft][ODBC SQL SERVER Driver] [ TCP/IP Sockets]
ConnectionRead (recv())Hello!
This could be due to multiple reasons. Can you locate the ERRORLOG.* files
(found in the LOG sub-folder under the SQL Server installation folder) and
send it across? That might help establish if anything's wrong on the server
side.
Also:
- do you get this issue from all clients or is it specific to a set of
client(s)?
- do you receive this issue only when running a specific query? what are you
trying to execute when you experience this issue?
- are the client and server separated by any kind of network equipment like
a router / firewall?
- will the issue occur if you run the query locally on the server?
Thanks!
Arvind.
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This posting is provided "AS IS" with no warranties, and confers no rights.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
"Aboki" <hcokoli@.yahoo.com> wrote in message
news:6b8301c475a3$bfab9a70$a401280a@.phx.gbl...
> Does anyone have idea on how to reslove this error message
> below.
>
> Error Source 4, code 01000 10054
> [microsoft][ODBC SQL SERVER Driver] [ TCP/IP Sockets]
> ConnectionRead (recv())
>sql

ODBC DSN for SQL Server via script

Hi
I have the below script to create DSN for SQL Server. The problem is this
does not include a username and password option for SQL Server
authentication. Could someone please guide me how to add the username and
password option for authentication to this script?
Many Thanks
Regards
= Script Below ========================
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
strValueName = "My SQL Server"
strValue = "SQL Server"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
strValueName = "Database"
strValue = "My Database"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Driver"
strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Server"
strValue = "111.111.111.111"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Trusted_Connection"
strValue = "No"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValueAFAIK you can't programmatically store the password.
http://support.microsoft.com/kb/184608
--
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"John" wrote:
> Hi
> I have the below script to create DSN for SQL Server. The problem is this
> does not include a username and password option for SQL Server
> authentication. Could someone please guide me how to add the username and
> password option for authentication to this script?
> Many Thanks
> Regards
>
> = Script Below ========================> Const HKEY_LOCAL_MACHINE = &H80000002
> strComputer = "."
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\default:StdRegProv")
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
> strValueName = "My SQL Server"
> strValue = "SQL Server"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> strValueName = "Database"
> strValue = "My Database"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Driver"
> strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Server"
> strValue = "111.111.111.111"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Trusted_Connection"
> strValue = "No"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
>|||To add to Dave's response, the SQL Server ODBC driver does not store the SQL
password for security reasons; anyone with access to the DSN could then
connect to SQL Server. The password needs to be provided by the application
when connecting.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"John" <John@.nospam.infovis.co.uk> wrote in message
news:%23lObOfmiHHA.688@.TK2MSFTNGP03.phx.gbl...
> Hi
> I have the below script to create DSN for SQL Server. The problem is this
> does not include a username and password option for SQL Server
> authentication. Could someone please guide me how to add the username and
> password option for authentication to this script?
> Many Thanks
> Regards
>
> = Script Below ========================> Const HKEY_LOCAL_MACHINE = &H80000002
> strComputer = "."
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\default:StdRegProv")
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
> strValueName = "My SQL Server"
> strValue = "SQL Server"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> strValueName = "Database"
> strValue = "My Database"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Driver"
> strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Server"
> strValue = "111.111.111.111"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Trusted_Connection"
> strValue = "No"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
>|||what are you doing?
SQL linked tables in a MDB?
you should jsut use Access Data Projects, kid
"John" <John@.nospam.infovis.co.uk> wrote in message
news:%23lObOfmiHHA.688@.TK2MSFTNGP03.phx.gbl...
> Hi
> I have the below script to create DSN for SQL Server. The problem is this
> does not include a username and password option for SQL Server
> authentication. Could someone please guide me how to add the username and
> password option for authentication to this script?
> Many Thanks
> Regards
>
> = Script Below ========================> Const HKEY_LOCAL_MACHINE = &H80000002
> strComputer = "."
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\default:StdRegProv")
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
> strValueName = "My SQL Server"
> strValue = "SQL Server"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> strValueName = "Database"
> strValue = "My Database"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Driver"
> strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Server"
> strValue = "111.111.111.111"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Trusted_Connection"
> strValue = "No"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
>|||Dan
crap answers like that is why SQL Server is _STILL_ not secure.
We don't friggin care if you think that it's secure
We don't friggin care what your premise is.
It's goddamn ridiculous that MS refuses to take SQL authentication
seriously.
I GOT CANNED AND BLACKLISTED FROM MICROSOFT FOR COMPLAINING ABOUT SQL
AUTHENTICATION
We just want to create the passwords and use SQL Authentication
I've worked in 100 different SQL Server environments these past 10 years..
and 80% of the clients in the real world use SQL Authentication for
_SOMETHING_.
stfu and take your premise back to MS and tell them to stfu and fix SQL
Authentication
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:418F29B3-9C30-406D-80A5-6B4F1AE9758F@.microsoft.com...
> To add to Dave's response, the SQL Server ODBC driver does not store the
SQL
> password for security reasons; anyone with access to the DSN could then
> connect to SQL Server. The password needs to be provided by the
application
> when connecting.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "John" <John@.nospam.infovis.co.uk> wrote in message
> news:%23lObOfmiHHA.688@.TK2MSFTNGP03.phx.gbl...
> > Hi
> >
> > I have the below script to create DSN for SQL Server. The problem is
this
> > does not include a username and password option for SQL Server
> > authentication. Could someone please guide me how to add the username
and
> > password option for authentication to this script?
> >
> > Many Thanks
> >
> > Regards
> >
> >
> > = Script Below ========================> >
> > Const HKEY_LOCAL_MACHINE = &H80000002
> >
> > strComputer = "."
> >
> > Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
> > strComputer & "\root\default:StdRegProv")
> >
> > strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
> > strValueName = "My SQL Server"
> > strValue = "SQL Server"
> > objReg.SetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> >
> > strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> >
> > objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> >
> > strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> >
> > strValueName = "Database"
> > strValue = "My Database"
> > objReg.SetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> >
> > strValueName = "Driver"
> > strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
> > objReg.SetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> >
> > strValueName = "Server"
> > strValue = "111.111.111.111"
> > objReg.SetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> >
> > strValueName = "Trusted_Connection"
> > strValue = "No"
> > objReg.SetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> >
> >
>

Wednesday, March 28, 2012

ODBC driver for SQL server using mfc

Hi,
I am currently using ORACLE 9i but I am trying to move to SQL server.
Below is my code, I am getting very strenge error, I can retrieve all the
data from database, but when I do .Edit(), the code crashes. Eventhough, I
am opening the recordset dynaset, it still does not let me edit the
recordset. I have SQL server(8.00.194), MDAC(2.71.9030.0), ODBC32.dll(
version 3.520.9030.0). Is my ODBC drive old?
******************my code*********************************
m_compInStream = new CComponentsInStream(Database);
m_compInStream->Open(CRecordset::dynaset,"select * from
tblComponentsInStream where FLUIDSTREAMSID = '12' ORDER BY
COMPONENTSID",CRecordset::none);
m_compInStream->Edit(); //Crashes here...
************************************************** ***********
Your SQL Server version is the SQL 8.0 RTM version. I beleive the latest is
SP4, so you could try a newer one. Try
http://www.microsoft.com/downloads/r...etext=sql+serv
er&DisplayLang=en
You could also try doing a search on http://msdn.microsoft.com/ using
keywords "ODBC MFC". Perhaps there is some difference between Oracle and
SQL that doesn't allow this query.
| From: "Bhavin Patel" <bpatel@.epcon.com>
| Subject: ODBC driver for SQL server using mfc
| Date: Tue, 13 Sep 2005 00:18:07 -0500
| Lines: 18
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <uPipLKCuFHA.1028@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: h86.74.29.71.ip.alltel.net 71.29.74.86
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2700
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hi,
| I am currently using ORACLE 9i but I am trying to move to SQL server.
| Below is my code, I am getting very strenge error, I can retrieve all the
| data from database, but when I do .Edit(), the code crashes. Eventhough, I
| am opening the recordset dynaset, it still does not let me edit the
| recordset. I have SQL server(8.00.194), MDAC(2.71.9030.0), ODBC32.dll(
| version 3.520.9030.0). Is my ODBC drive old?
|
| ******************my code*********************************
| m_compInStream = new CComponentsInStream(Database);
| m_compInStream->Open(CRecordset::dynaset,"select * from
| tblComponentsInStream where FLUIDSTREAMSID = '12' ORDER BY
| COMPONENTSID",CRecordset::none);
| m_compInStream->Edit(); //Crashes here...
| ************************************************** ***********
|
|
|
|

ODBC driver for SQL server using mfc

Hi,
I am currently using ORACLE 9i but I am trying to move to SQL server.
Below is my code, I am getting very strenge error, I can retrieve all the
data from database, but when I do .Edit(), the code crashes. Eventhough, I
am opening the recordset dynaset, it still does not let me edit the
recordset. I have SQL server(8.00.194), MDAC(2.71.9030.0), ODBC32.dll(
version 3.520.9030.0). Is my ODBC drive old?
******************my code*********************************
m_compInStream = new CComponentsInStream(Database);
m_compInStream->Open(CRecordset::dynaset,"select * from
tblComponentsInStream where FLUIDSTREAMSID = '12' ORDER BY
COMPONENTSID",CRecordset::none);
m_compInStream->Edit(); //Crashes here...
****************************************
*********************Your SQL Server version is the SQL 8.0 RTM version. I beleive the latest is
SP4, so you could try a newer one. Try
http://www.microsoft.com/downloads/...eetext=sql+serv
er&DisplayLang=en
You could also try doing a search on http://msdn.microsoft.com/ using
keywords "ODBC MFC". Perhaps there is some difference between Oracle and
SQL that doesn't allow this query.
| From: "Bhavin Patel" <bpatel@.epcon.com>
| Subject: ODBC driver for SQL server using mfc
| Date: Tue, 13 Sep 2005 00:18:07 -0500
| Lines: 18
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <uPipLKCuFHA.1028@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: h86.74.29.71.ip.alltel.net 71.29.74.86
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2700
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hi,
| I am currently using ORACLE 9i but I am trying to move to SQL server.
| Below is my code, I am getting very strenge error, I can retrieve all the
| data from database, but when I do .Edit(), the code crashes. Eventhough, I
| am opening the recordset dynaset, it still does not let me edit the
| recordset. I have SQL server(8.00.194), MDAC(2.71.9030.0), ODBC32.dll(
| version 3.520.9030.0). Is my ODBC drive old?
|
| ******************my code*********************************
| m_compInStream = new CComponentsInStream(Database);
| m_compInStream->Open(CRecordset::dynaset,"select * from
| tblComponentsInStream where FLUIDSTREAMSID = '12' ORDER BY
| COMPONENTSID",CRecordset::none);
| m_compInStream->Edit(); //Crashes here...
| ****************************************
*********************
|
|
|
|sql

Monday, March 19, 2012

ODBC cannot connect to MSDE 2000a

Using MSDE 2000a (w/spk3a). XP Pro. Cannot connect w/ ODBC driver to server.
Have tried many things.
Below is the error when trying to connect via ODBC.
Help!
GIL
Microsoft SQL Server Login
Connection failed:
SQLState: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist
or access denied.
hi,
"Padji" <gil.pajany@.free.fr> ha scritto nel messaggio
news:410f60ea$0$1890$636a15ce@.news.free.fr...
> Using MSDE 2000a (w/spk3a). XP Pro. Cannot connect w/ ODBC driver to
server.
> Have tried many things.
> Below is the error when trying to connect via ODBC.
> Help!
> GIL
>
> --
> Microsoft SQL Server Login
> --
> Connection failed:
> SQLState: '01000'
> SQL Server Error: 10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not
exist
> or access denied.
>
>
please verify your instance has netwrok protocols enabled... run Server
Network Utility (svrnetcnexe) to check that and, eventually, enable TCP/IP
as needed..
eventually, run Client Network Utility (cliconfg.exe) and make sure TCP/IP
are enabled ... try to make an alias using TCP using SQL server name and
test connection. if it still fails, try creating an alias with the IP
address of the SQL server.
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I am having the exact same problem. I'm using SQL Server 2005 beta.
In the SQL manager utility I did what you suggested, which is to enable all
network protocols, and am getting the same issue.
It doesn't matter what client configuration I use for ODBC -- shared memory,
named pipes, tcp.
Should I uninstall the DB, delete all registry settings related to it, and
then reinstall?
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2n9m2eFti527U1@.uni-berlin.de...
> hi,
> "Padji" <gil.pajany@.free.fr> ha scritto nel messaggio
> news:410f60ea$0$1890$636a15ce@.news.free.fr...
> server.
> exist
> please verify your instance has netwrok protocols enabled... run Server
> Network Utility (svrnetcnexe) to check that and, eventually, enable TCP/IP
> as needed..
> eventually, run Client Network Utility (cliconfg.exe) and make sure TCP/IP
> are enabled ... try to make an alias using TCP using SQL server name and
> test connection. if it still fails, try creating an alias with the IP
> address of the SQL server.
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi,
"Yair Sageev" <geekyheeb-news@.yahoo.com> ha scritto nel messaggio
news:eFIcuAkeEHA.3792@.TK2MSFTNGP09.phx.gbl...
> I am having the exact same problem. I'm using SQL Server 2005 beta.
> In the SQL manager utility I did what you suggested, which is to enable
all
> network protocols, and am getting the same issue.
> It doesn't matter what client configuration I use for ODBC -- shared
memory,
> named pipes, tcp.
> Should I uninstall the DB, delete all registry settings related to it, and
> then reinstall?
>
before reinstalling, pleas have a look at
http://support.microsoft.com/default...06&Product=sql
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Wednesday, March 7, 2012

Obtaining Audit Information

Hi People

We want one trigger which captures the data as mentioned below.

Table Name

Date and Time

User

type

Mode of modification

TABLE_ABC

03/07/2007 12:00:04

XCS\Raoa

Update

Procedure

TABLE_DEF

03/07/2007 12:00:34

XCS\Raoa

Insert

Class Integration SSIS Package

TABLE_GHI

03/07/2007 12:01:04

XCS\Raoa

Insert

Procedure

TABLE_GHI

03/07/2007 12:01:34

XCS\Raoa

Update

XCS\Raoa (Manual)

I am not sure about how to achieve the last column. I hope u understand what exactly is expected. The idea is that, one should be able to track how a particular table was manipulate; whether it was manipulated using procedure or SSIS package or manually.

Could someone help me achieving this?

Regards

Abhi

Hi Abhi,

I think you are looking for a DDL trigger. Here is my example. We are monitoring the changes on views, procedures, etc. We are using this:

Code Snippet

USE [databasename]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[T_DDL_DDLEventLog](

[EventDate] [datetime] NOT NULL,

[UserName] [sysname] NOT NULL,

[ObjectName] [sysname] NOT NULL,

[CommandText] [varchar](max) NOT NULL

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

USE [databasename]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TRIGGER [DDL_Alter_Audit]

ON DATABASE

FOR ALTER_TABLE, ALTER_PROCEDURE, ALTER_FUNCTION, ALTER_VIEW, ALTER_TRIGGER

AS

DECLARE @.eventData XML

SET @.eventData = eventdata()

INSERT T_DDL_DDLEventLog (EventDate, UserName, ObjectName, CommandText)

SELECT

GETDATE() AS EventDate,

@.eventData.value('data(/EVENT_INSTANCE/LoginName)[1]', 'SYSNAME')

AS UserName,

@.eventData.value('data(/EVENT_INSTANCE/ObjectName)[1]', 'SYSNAME')

AS ObjectName,

@.eventData.value('data(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]',

'VARCHAR(MAX)') AS CommandText

GO

SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER OFF

GO

ENABLE TRIGGER [DDL_Alter_Audit] ON DATABASE

Also, you can find more informationabout DDL triggers in the BOL.

I hope it helps.

Regards,

Janos

|||

Thanks for replying Janos.

What does following statement return?

@.eventData.value('data(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]',

'VARCHAR(MAX)') AS CommandText

Anyways, I m looking for DML triggers. Whenever someone inserts/updates the table, I wanna know how that table was manipulated..was it manipulated using SSIS package or stored procedure or manually by some user. Is it possible to capture this information

|||

Hi,

CommandText returns the T-SQL script ran against the object. Eg.: In got a table called Table1. when I'm going to alter it, the Command text will contain the altering sql script, like ALTER TABLE Table1 .....

LoginName will return the credentila used to make the alter on the table and the ObjectName return Table1, in this case.

You can make this DDL trigger for all database events with DDL_DATABASE_LEVEL_EVENTS event, but this still monitors the objects, not monitoring your DML actions. You should write DML triggers for all your tables required audit.

Regards,

Janos

|||

Thanks for you reply Janos.. Cheers!!!

Obtaining Audit Information

Hi People

We want one trigger which captures the data as mentioned below.

Table Name

Date and Time

User

type

Mode of modification

TABLE_ABC

03/07/2007 12:00:04

XCS\Raoa

Update

Procedure

TABLE_DEF

03/07/2007 12:00:34

XCS\Raoa

Insert

Class Integration SSIS Package

TABLE_GHI

03/07/2007 12:01:04

XCS\Raoa

Insert

Procedure

TABLE_GHI

03/07/2007 12:01:34

XCS\Raoa

Update

XCS\Raoa (Manual)

I am not sure about how to achieve the last column. I hope u understand what exactly is expected. The idea is that, one should be able to track how a particular table was manipulate; whether it was manipulated using procedure or SSIS package or manually.

Could someone help me achieving this?

Regards

Abhi

Hi Abhi,

I think you are looking for a DDL trigger. Here is my example. We are monitoring the changes on views, procedures, etc. We are using this:

Code Snippet

USE [databasename]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[T_DDL_DDLEventLog](

[EventDate] [datetime] NOT NULL,

[UserName] [sysname] NOT NULL,

[ObjectName] [sysname] NOT NULL,

[CommandText] [varchar](max) NOT NULL

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

USE [databasename]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TRIGGER [DDL_Alter_Audit]

ON DATABASE

FOR ALTER_TABLE, ALTER_PROCEDURE, ALTER_FUNCTION, ALTER_VIEW, ALTER_TRIGGER

AS

DECLARE @.eventData XML

SET @.eventData = eventdata()

INSERT T_DDL_DDLEventLog (EventDate, UserName, ObjectName, CommandText)

SELECT

GETDATE() AS EventDate,

@.eventData.value('data(/EVENT_INSTANCE/LoginName)[1]', 'SYSNAME')

AS UserName,

@.eventData.value('data(/EVENT_INSTANCE/ObjectName)[1]', 'SYSNAME')

AS ObjectName,

@.eventData.value('data(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]',

'VARCHAR(MAX)') AS CommandText

GO

SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER OFF

GO

ENABLE TRIGGER [DDL_Alter_Audit] ON DATABASE

Also, you can find more informationabout DDL triggers in the BOL.

I hope it helps.

Regards,

Janos

|||

Thanks for replying Janos.

What does following statement return?

@.eventData.value('data(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]',

'VARCHAR(MAX)') AS CommandText

Anyways, I m looking for DML triggers. Whenever someone inserts/updates the table, I wanna know how that table was manipulated..was it manipulated using SSIS package or stored procedure or manually by some user. Is it possible to capture this information

|||

Hi,

CommandText returns the T-SQL script ran against the object. Eg.: In got a table called Table1. when I'm going to alter it, the Command text will contain the altering sql script, like ALTER TABLE Table1 .....

LoginName will return the credentila used to make the alter on the table and the ObjectName return Table1, in this case.

You can make this DDL trigger for all database events with DDL_DATABASE_LEVEL_EVENTS event, but this still monitors the objects, not monitoring your DML actions. You should write DML triggers for all your tables required audit.

Regards,

Janos

|||

Thanks for you reply Janos.. Cheers!!!